diff options
author | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-17 12:41:03 +1100 |
commit | c25ddf063a808e3adb749e22017661f403c5fb7e (patch) | |
tree | b2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/RecipesFurnace.patch | |
parent | 51263e97187a84338f89698eef187284055a682a (diff) | |
download | craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip |
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/RecipesFurnace.patch')
-rw-r--r-- | nms-patches/RecipesFurnace.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nms-patches/RecipesFurnace.patch b/nms-patches/RecipesFurnace.patch index 9c2f9bf8..62124ddc 100644 --- a/nms-patches/RecipesFurnace.patch +++ b/nms-patches/RecipesFurnace.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/RecipesFurnace.java +++ b/net/minecraft/server/RecipesFurnace.java -@@ -9,8 +9,10 @@ +@@ -8,8 +8,10 @@ public class RecipesFurnace { private static final RecipesFurnace a = new RecipesFurnace(); @@ -12,7 +12,7 @@ public static RecipesFurnace getInstance() { return RecipesFurnace.a; -@@ -55,6 +57,12 @@ +@@ -54,6 +56,12 @@ this.registerRecipe(Blocks.QUARTZ_ORE, new ItemStack(Items.QUARTZ), 0.2F); } @@ -25,9 +25,9 @@ public void registerRecipe(Block block, ItemStack itemstack, float f) { this.a(Item.getItemOf(block), itemstack, f); } -@@ -70,13 +78,23 @@ +@@ -68,13 +76,23 @@ + } - @Nullable public ItemStack getResult(ItemStack itemstack) { - Iterator iterator = this.recipes.entrySet().iterator(); + // CraftBukkit start - initialize to customRecipes @@ -39,19 +39,19 @@ do { if (!iterator.hasNext()) { -- return null; +- return ItemStack.a; + // CraftBukkit start - fall back to vanilla recipes + if (!vanilla && !this.recipes.isEmpty()) { + iterator = this.recipes.entrySet().iterator(); + vanilla = true; + } else { -+ return null; ++ return ItemStack.a; + } + // CraftBukkit end } entry = (Entry) iterator.next(); -@@ -94,13 +112,23 @@ +@@ -92,13 +110,23 @@ } public float b(ItemStack itemstack) { |