Update for minor remapping changes.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2015-07-30 16:56:52 +10:00
parent 332e77d249
commit c35a7254c5
24 changed files with 135 additions and 189 deletions

View File

@@ -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
}