summaryrefslogtreecommitdiffstats
path: root/nms-patches/CraftingManager.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/CraftingManager.patch')
-rw-r--r--nms-patches/CraftingManager.patch13
1 files changed, 3 insertions, 10 deletions
diff --git a/nms-patches/CraftingManager.patch b/nms-patches/CraftingManager.patch
index c0544eaa..3a7c82ec 100644
--- a/nms-patches/CraftingManager.patch
+++ b/nms-patches/CraftingManager.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/CraftingManager.java
+++ b/net/minecraft/server/CraftingManager.java
-@@ -9,16 +9,22 @@
+@@ -9,10 +9,16 @@
import java.util.Iterator;
import java.util.List;
@@ -17,13 +17,6 @@
public static CraftingManager getInstance() {
return CraftingManager.a;
- }
-
-- private CraftingManager() {
-+ public CraftingManager() { // PAIL: Public
- (new RecipesTools()).a(this);
- (new RecipesWeapons()).a(this);
- (new RecipeIngots()).a(this);
@@ -167,7 +173,12 @@
this.registerShapedRecipe(new ItemStack(Blocks.DAYLIGHT_DETECTOR), new Object[] { "GGG", "QQQ", "WWW", Character.valueOf('G'), Blocks.GLASS, Character.valueOf('Q'), Items.QUARTZ, Character.valueOf('W'), Blocks.WOODEN_SLAB});
this.registerShapedRecipe(new ItemStack(Blocks.HOPPER), new Object[] { "I I", "ICI", " I ", Character.valueOf('I'), Items.IRON_INGOT, Character.valueOf('C'), Blocks.CHEST});
@@ -49,10 +42,10 @@
irecipe = (IRecipe) iterator.next();
} while (!irecipe.a(inventorycrafting, world));
-- return irecipe.a(inventorycrafting);
+- return irecipe.craftItem(inventorycrafting);
+ // CraftBukkit start - INVENTORY_PRE_CRAFT event
+ inventorycrafting.currentRecipe = irecipe;
-+ ItemStack result = irecipe.a(inventorycrafting);
++ ItemStack result = irecipe.craftItem(inventorycrafting);
+ return CraftEventFactory.callPreCraftEvent(inventorycrafting, result, lastCraftView, false);
+ // CraftBukkit end
}