SPIGOT-4717: Fix adding recipes after clearRecipes is called

This commit is contained in:
md_5 2019-04-23 20:53:56 +10:00
parent 5fea790398
commit 0ec9b61de9
2 changed files with 3 additions and 2 deletions

View File

@ -59,7 +59,7 @@
}
- private static void a(Map<Recipes<?>, Map<MinecraftKey, IRecipe<?>>> map) {
+ private static void a(Map<Recipes<?>, it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<MinecraftKey, IRecipe<?>>> map) { // CraftBukkit
+ public static void a(Map<Recipes<?>, it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<MinecraftKey, IRecipe<?>>> map) { // CraftBukkit
map.clear();
Iterator iterator = IRegistry.RECIPE_TYPE.iterator();

View File

@ -49,6 +49,7 @@ import net.minecraft.server.BlockPosition;
import net.minecraft.server.BossBattleCustom;
import net.minecraft.server.CommandDispatcher;
import net.minecraft.server.CommandListenerWrapper;
import net.minecraft.server.CraftingManager;
import net.minecraft.server.DedicatedPlayerList;
import net.minecraft.server.DedicatedServer;
import net.minecraft.server.DedicatedServerProperties;
@ -1096,7 +1097,7 @@ public final class CraftServer implements Server {
@Override
public void clearRecipes() {
console.getCraftingManager().recipes.clear();
CraftingManager.a(console.getCraftingManager().recipes);
}
@Override