Skip to content

Commit

Permalink
Fix crashing due to checking a block if it has the AGE property when …
Browse files Browse the repository at this point in the history
…it wont. Closes #409, #407
  • Loading branch information
alexbegt committed Dec 31, 2017
1 parent 7d1988a commit 2e3485d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -79,7 +79,7 @@ public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random ra
@Override
public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable)
{
if (plantable instanceof BlockOverworldBerryBush)
if (plantable instanceof BlockOverworldBerryBush && state.getPropertyKeys().contains(AGE))
{
return (state.getValue(AGE) > 2);
}
Expand Down

0 comments on commit 2e3485d

Please sign in to comment.