Player sensitive version of Block.getPickBlock Closes #1348

This commit is contained in:
Lex Manos committed 2014-11-04 18:27:02 -08:00
1 parent ef0e0d7393
commit 47305ff691
2 files changed
+22 -17

No files matched your search

@@ -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);