Lotus fix

This commit is contained in:
paulevsGitch 2020-10-22 16:34:50 +03:00
parent c48071a551
commit 26533e7a3e

View file

@ -63,6 +63,12 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
BlocksHelper.setWithoutUpdate(world, bpos, flower); BlocksHelper.setWithoutUpdate(world, bpos, flower);
bpos.setY(bpos.getY() - 1); bpos.setY(bpos.getY() - 1);
stem = world.getBlockState(bpos); stem = world.getBlockState(bpos);
if (stem.isOf(BlockRegistry.END_LOTUS_STEM)) {
stem = BlockRegistry.END_LOTUS_STEM.getDefaultState();
if (!world.getBlockState(bpos.north()).getFluidState().isEmpty()) {
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
}
}
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP)); BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP));
} }
} }