Search in sources :

Example 1 with TripleShape

use of ru.bclib.blocks.BlockProperties.TripleShape in project BCLib by paulevsGitch.

the class TripleTerrainBlock method getStateForPlacement.

@Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
    Direction dir = ctx.getClickedFace();
    TripleShape shape = dir == Direction.UP ? TripleShape.BOTTOM : dir == Direction.DOWN ? TripleShape.TOP : TripleShape.MIDDLE;
    return defaultBlockState().setValue(SHAPE, shape);
}
Also used : TripleShape(ru.bclib.blocks.BlockProperties.TripleShape) Direction(net.minecraft.core.Direction)

Aggregations

Direction (net.minecraft.core.Direction)1 TripleShape (ru.bclib.blocks.BlockProperties.TripleShape)1