Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
0708fa363b
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
37 Zeilen
1.5 KiB
Diff
37 Zeilen
1.5 KiB
Diff
From 4e0ec3705a7a3096cd1ff04b9119d483b1020252 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 16 Jun 2018 16:23:38 -0400
|
|
Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors
|
|
|
|
This code was causing NPE's in saving player data, potentially related to reloads.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
|
index 121e1fd53..0e66bdda8 100644
|
|
--- a/src/main/java/net/minecraft/server/RecipeBookServer.java
|
|
+++ b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
|
@@ -79,6 +79,10 @@ public class RecipeBookServer extends RecipeBook {
|
|
|
|
while (iterator.hasNext()) {
|
|
MinecraftKey minecraftkey = (MinecraftKey) iterator.next();
|
|
+ // Paper start - ignore missing recipes
|
|
+ final Optional<? extends IRecipe<?>> recipe = this.l.a(minecraftkey);
|
|
+ if (!recipe.isPresent()) continue;
|
|
+ // Paper end
|
|
|
|
nbttaglist.add(new NBTTagString(minecraftkey.toString()));
|
|
}
|
|
@@ -89,6 +93,10 @@ public class RecipeBookServer extends RecipeBook {
|
|
|
|
while (iterator1.hasNext()) {
|
|
MinecraftKey minecraftkey1 = (MinecraftKey) iterator1.next();
|
|
+ // Paper start - ignore missing recipes
|
|
+ final Optional<? extends IRecipe<?>> recipe = this.l.a(minecraftkey1);
|
|
+ if (!recipe.isPresent()) continue;
|
|
+ // Paper end
|
|
|
|
nbttaglist1.add(new NBTTagString(minecraftkey1.toString()));
|
|
}
|
|
--
|
|
2.22.0
|
|
|