diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index 102f4415cd..285581fac4 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -205,14 +205,14 @@ } protected ItemStack func_149644_j(int p_149644_1_) -@@ -1116,6 +1155,1099 @@ +@@ -1116,6 +1155,1104 @@ return null; } + /* ======================================== FORGE START =====================================*/ + //For ForgeInternal use Only! + protected ThreadLocal harvesters = new ThreadLocal(); -+ private ThreadLocal silk_check_meta = new ThreadLocal(); ++ private ThreadLocal silk_check_meta = new ThreadLocal(); + /** + * Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15 + * @@ -380,7 +380,7 @@ + * @param x X Position + * @param y Y position + * @param z Z position -+ * @param willHarvest True if Block.harvestBlock will be called after this, if the return in true. ++ * @param willHarvest True if Block.harvestBlock will be called after this, if the return in true. + * Can be useful to delay the destruction of tile entities till after harvestBlock + * @return True if the block is actually destroyed. + */ @@ -845,6 +845,11 @@ + * @param target The full target the player is looking at + * @return A ItemStack to add to the player's inventory, Null if nothing should be added. + */ ++ public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) ++ { ++ return getPickBlock(target, world, x, y, z); ++ } ++ @Deprecated + public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) + { + Item item = func_149694_d(world, x, y, z); @@ -1047,7 +1052,7 @@ + } + else if (entity instanceof EntityDragon) + { -+ return this != Blocks.field_150343_Z && this != Blocks.field_150377_bs && this != Blocks.field_150357_h; ++ return this != Blocks.field_150343_Z && this != Blocks.field_150377_bs && this != Blocks.field_150357_h; + } + + return true; @@ -1141,7 +1146,7 @@ + + /** + * Gathers how much experience this block drops when broken. -+ * ++ * + * @param world The world + * @param metadata + * @param fortune @@ -1184,7 +1189,7 @@ + * If this block should be notified of weak changes. + * Weak changes are changes 1 block away through a solid block. + * Similar to comparators. -+ * ++ * + * @param world The current world + * @param x X Position + * @param y Y position @@ -1201,7 +1206,7 @@ + private int[] harvestLevel = new int[]{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; + /** + * Sets or removes the tool and level required to harvest this block. -+ * ++ * + * @param toolClass Class + * @param level Harvest level: + * Wood: 0 @@ -1220,7 +1225,7 @@ + + /** + * Sets or removes the tool and level required to harvest this block. -+ * ++ * + * @param toolClass Class + * @param level Harvest level: + * Wood: 0 @@ -1237,9 +1242,9 @@ + } + + /** -+ * Queries the class of tool required to harvest this block, if null is returned ++ * Queries the class of tool required to harvest this block, if null is returned + * we assume that anything can harvest this block. -+ * ++ * + * @param metadata + * @return + */ @@ -1251,7 +1256,7 @@ + /** + * Queries the harvest level of this item stack for the specifred tool class, + * Returns -1 if this tool is not of the specified type -+ * ++ * + * @param stack This item stack instance + * @return Harvest level, or -1 if not the specified tool type. + */ @@ -1261,9 +1266,9 @@ + } + + /** -+ * Checks if the specified tool type is efficient on this block, ++ * Checks if the specified tool type is efficient on this block, + * meaning that it digs at full speed. -+ * ++ * + * @param type + * @param metadata + * @return diff --git a/src/main/java/net/minecraftforge/common/ForgeHooks.java b/src/main/java/net/minecraftforge/common/ForgeHooks.java index 6b88913676..ce11752564 100644 --- a/src/main/java/net/minecraftforge/common/ForgeHooks.java +++ b/src/main/java/net/minecraftforge/common/ForgeHooks.java @@ -224,7 +224,7 @@ public class ForgeHooks return false; } - result = block.getPickBlock(target, world, x, y, z); + result = block.getPickBlock(target, world, x, y, z, player); } else { @@ -475,10 +475,10 @@ public class ForgeHooks { itemstack.setTagCompound(nbt); } - if (blockSnapshots.size() > 1) + if (blockSnapshots.size() > 1) { placeEvent = ForgeEventFactory.onPlayerMultiBlockPlace(player, blockSnapshots, net.minecraftforge.common.util.ForgeDirection.getOrientation(side)); - } + } else if (blockSnapshots.size() == 1) { placeEvent = ForgeEventFactory.onPlayerBlockPlace(player, blockSnapshots.get(0), net.minecraftforge.common.util.ForgeDirection.getOrientation(side)); @@ -540,7 +540,7 @@ public class ForgeHooks container.stackSizeToBeUsedInRepair = e.materialCost; return false; } - + public static float onAnvilRepair(EntityPlayer player, ItemStack output, ItemStack left, ItemStack right) { AnvilRepairEvent e = new AnvilRepairEvent(player, left, right, output);