use of net.tropicraft.core.common.block.huge_plant.HugePlantBlock in project Tropicraft by Tropicraft.
the class GrowableDoublePlantBlock method performBonemeal.
@Override
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
BlockPos lowerPos = state.getValue(HALF) == DoubleBlockHalf.LOWER ? pos : pos.below();
HugePlantBlock growBlock = this.growInto.get().get();
BlockState growState = growBlock.defaultBlockState();
if (growState.canSurvive(world, lowerPos)) {
growBlock.placeAt(world, lowerPos, Constants.BlockFlags.BLOCK_UPDATE);
}
}
use of net.tropicraft.core.common.block.huge_plant.HugePlantBlock in project Tropicraft by Tropicraft.
the class HugePlantBlockPlacer method place.
@Override
public void place(LevelAccessor world, BlockPos pos, BlockState state, Random random) {
HugePlantBlock block = (HugePlantBlock) state.getBlock();
block.placeAt(world, pos, Block.UPDATE_CLIENTS);
}
Aggregations