mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Player sensitive version of Block.getPickBlock Closes #1348
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user