Update getPickBlock() to use the new non-deprecated version.

This commit is contained in:
Halvor Lyche Strandvoll committed 2015-07-08 12:34:02 +02:00
1 parent 13f27b6732
commit 037e1e553f
5 files changed
+14 -15

No files matched your search

@@ -129,7 +129,7 @@ public class BlockCardboardBox extends BlockContainer
public ItemStack dismantleBlock(World world, int x, int y, int z, boolean returnBlock)
{
ItemStack itemStack = getPickBlock(null, world, x, y, z);
ItemStack itemStack = getPickBlock(null, world, x, y, z, null);
world.setBlockToAir(x, y, z);
@@ -149,7 +149,7 @@ public class BlockCardboardBox extends BlockContainer
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player)
{
TileEntityCardboardBox tileEntity = (TileEntityCardboardBox)world.getTileEntity(x, y, z);
@@ -176,7 +176,7 @@ public class BlockCardboardBox extends BlockContainer
double motionY = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
double motionZ = (world.rand.nextFloat() * motion) + (1.0F - motion) * 0.5D;
EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, getPickBlock(null, world, x, y, z));
EntityItem entityItem = new EntityItem(world, x + motionX, y + motionY, z + motionZ, getPickBlock(null, world, x, y, z, player));
world.spawnEntityInWorld(entityItem);
}