summaryrefslogtreecommitdiffstats
path: root/nms-patches/RecipesFurnace.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/RecipesFurnace.patch')
-rw-r--r--nms-patches/RecipesFurnace.patch14
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) {