Search in sources :

Example 1 with DoublePlantBlock

use of net.minecraft.world.level.block.DoublePlantBlock in project Tropicraft by Tropicraft.

the class GrowableSinglePlantBlock method performBonemeal.

@Override
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
    DoublePlantBlock growBlock = this.growInto.get().get();
    BlockState growState = growBlock.defaultBlockState();
    if (growState.canSurvive(world, pos) && world.isEmptyBlock(pos.above())) {
        DoublePlantBlock.placeAt(world, growState, pos, Block.UPDATE_CLIENTS);
    }
}
Also used : BlockState(net.minecraft.world.level.block.state.BlockState) DoublePlantBlock(net.minecraft.world.level.block.DoublePlantBlock)

Aggregations

DoublePlantBlock (net.minecraft.world.level.block.DoublePlantBlock)1 BlockState (net.minecraft.world.level.block.state.BlockState)1