From 421c1728c81e2f729dff88da2ac96535d2b8e5e8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 15 Jul 2018 10:00:00 +1000 Subject: Update to Minecraft 1.13-pre7 --- nms-patches/RecipesFurnace.patch | 80 ---------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 nms-patches/RecipesFurnace.patch (limited to 'nms-patches/RecipesFurnace.patch') diff --git a/nms-patches/RecipesFurnace.patch b/nms-patches/RecipesFurnace.patch deleted file mode 100644 index ccc7b333..00000000 --- a/nms-patches/RecipesFurnace.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- a/net/minecraft/server/RecipesFurnace.java -+++ b/net/minecraft/server/RecipesFurnace.java -@@ -8,8 +8,10 @@ - public class RecipesFurnace { - - private static final RecipesFurnace a = new RecipesFurnace(); -- public final Map recipes = Maps.newHashMap(); -+ public Map recipes = Maps.newHashMap(); - private final Map experience = Maps.newHashMap(); -+ public Map customRecipes = Maps.newHashMap(); // CraftBukkit - add field -+ public Map customExperience = Maps.newHashMap(); // CraftBukkit - add field - - public static RecipesFurnace getInstance() { - return RecipesFurnace.a; -@@ -94,6 +96,13 @@ - this.a(new ItemStack(Blocks.STAINED_HARDENED_CLAY, 1, EnumColor.BLACK.getColorIndex()), new ItemStack(Blocks.dQ), 0.1F); - } - -+ // CraftBukkit start - add method -+ public void registerRecipe(ItemStack itemstack, ItemStack itemstack1, float f) { -+ this.customRecipes.put(itemstack, itemstack1); -+ this.customExperience.put(itemstack, f); -+ } -+ // CraftBukkit end -+ - public void registerRecipe(Block block, ItemStack itemstack, float f) { - this.a(Item.getItemOf(block), itemstack, f); - } -@@ -108,13 +117,23 @@ - } - - public ItemStack getResult(ItemStack itemstack) { -- Iterator iterator = this.recipes.entrySet().iterator(); -+ // CraftBukkit start - initialize to customRecipes -+ boolean vanilla = false; -+ Iterator> iterator = this.customRecipes.entrySet().iterator(); -+ // CraftBukkit end - - Entry entry; - - do { - if (!iterator.hasNext()) { -- return ItemStack.a; -+ // CraftBukkit start - fall back to vanilla recipes -+ if (!vanilla && !this.recipes.isEmpty()) { -+ iterator = this.recipes.entrySet().iterator(); -+ vanilla = true; -+ } else { -+ return ItemStack.a; -+ } -+ // CraftBukkit end - } - - entry = (Entry) iterator.next(); -@@ -132,13 +151,23 @@ - } - - public float b(ItemStack itemstack) { -- Iterator iterator = this.experience.entrySet().iterator(); -+ // CraftBukkit start - initialize to customRecipes -+ boolean vanilla = false; -+ Iterator> iterator = this.customExperience.entrySet().iterator(); -+ // CraftBukkit end - - Entry entry; - - do { - if (!iterator.hasNext()) { -- return 0.0F; -+ // CraftBukkit start - fall back to vanilla recipes -+ if (!vanilla && !this.experience.isEmpty()) { -+ iterator = this.experience.entrySet().iterator(); -+ vanilla = true; -+ } else { -+ return 0.0F; -+ } -+ // CraftBukkit end - } - - entry = (Entry) iterator.next(); -- cgit v1.2.3