Update BlockBOPPlant.java
Fixed null itemStack causing crash. Fixes #529 and #519
This commit is contained in:
parent
0a502a54f1
commit
a953962f6b
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
|
||||||
@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;
|
||||||
|
|
||||||
if (metadata == 5 || metadata == 13 || metadata == 15)
|
if (metadata == 5 || metadata == 13 || metadata == 15)
|
||||||
return this.isValidPosition(world, x, y, z, metadata);
|
return this.isValidPosition(world, x, y, z, metadata);
|
||||||
|
|
Loading…
Reference in a new issue