Update BlockBOPFruit.java
Fixed null itemStack causing crash. Fixes #529 and #519
This commit is contained in:
parent
58c2c29da3
commit
0a502a54f1
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ public class BlockBOPFruit extends BOPBlockWorldDecor
|
||||||
@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)
|
||||||
{
|
{
|
||||||
int metadata = itemStack.getItemDamage();
|
int metadata = itemStack != null ? itemStack.getItemDamage() : 0;
|
||||||
|
|
||||||
return this.isValidPosition(world, x, y, z, metadata);
|
return this.isValidPosition(world, x, y, z, metadata);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue