Green Grove Sigil fix.

Fixed the Green Grove sigil so that it checs if a plant can grow first.
This commit is contained in:
WayofTime 2020-11-15 12:09:18 -05:00
parent 71ba0229c5
commit 6f7cd030e6

View file

@ -27,8 +27,7 @@ public class ItemSigilGreenGrove extends ItemSigilToggleableBase
if (PlayerHelper.isFakePlayer(player)) if (PlayerHelper.isFakePlayer(player))
return false; return false;
if (NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess() if (NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, SoulTicket.item(stack, world, player, getLpUsed())).isSuccess() && applyBonemeal(stack, world, blockPos, player))
&& applyBonemeal(stack, world, blockPos, player))
{ {
if (!world.isRemote) if (!world.isRemote)
{ {
@ -70,6 +69,8 @@ public class ItemSigilGreenGrove extends ItemSigilToggleableBase
if (worldIn.rand.nextInt(50) == 0) if (worldIn.rand.nextInt(50) == 0)
{ {
BlockState preBlockState = worldIn.getBlockState(blockPos); BlockState preBlockState = worldIn.getBlockState(blockPos);
if (((IGrowable) state.getBlock()).canGrow(serverWorld, blockPos, preBlockState, worldIn.isRemote))
{
((IGrowable) state.getBlock()).grow(serverWorld, worldIn.rand, blockPos, state); ((IGrowable) state.getBlock()).grow(serverWorld, worldIn.rand, blockPos, state);
BlockState newState = worldIn.getBlockState(blockPos); BlockState newState = worldIn.getBlockState(blockPos);
@ -82,6 +83,7 @@ public class ItemSigilGreenGrove extends ItemSigilToggleableBase
} }
} }
} }
}
} }