Update BlockBOPCoral.java
Fixed null itemStack causing crash. Fixes #529 and #519
This commit is contained in:
parent
e31395e99e
commit
075e54c1da
|
@ -76,7 +76,8 @@ public class BlockBOPCoral extends BOPBlock
|
||||||
@Override
|
@Override
|
||||||
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack itemStack)
|
public boolean canReplace(World world, int x, int y, int z, int side, ItemStack itemStack)
|
||||||
{
|
{
|
||||||
return world.getBlock(x, y + 1, z) == Blocks.water && this.canBlockStay(world, x, y, z, itemStack.getItemDamage());
|
int metadata = itemStack != null ? itemStack.getItemDamage() : 0;
|
||||||
|
return world.getBlock(x, y + 1, z) == Blocks.water && this.canBlockStay(world, x, y, z, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue