Removed color provider
This commit is contained in:
parent
2c8862a37b
commit
4040597a6d
475 changed files with 5411 additions and 7521 deletions
|
@ -37,44 +37,44 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
public static final BooleanProperty LEAF = BooleanProperty.create("leaf");
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final Map<Axis, VoxelShape> SHAPES = Maps.newEnumMap(Axis.class);
|
||||
|
||||
|
||||
public EndLotusStemBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS));
|
||||
this.registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false).setValue(SHAPE, TripleShape.MIDDLE).setValue(LEAF, false).setValue(FACING, Direction.UP));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return state.getValue(LEAF) ? SHAPES.get(Axis.Y) : SHAPES.get(state.getValue(FACING).getAxis());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING, WATERLOGGED, SHAPE, LEAF);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockState state) {
|
||||
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
LevelAccessor worldAccess = ctx.getLevel();
|
||||
BlockPos blockPos = ctx.getClickedPos();
|
||||
return this.defaultBlockState().setValue(WATERLOGGED, worldAccess.getFluidState(blockPos).getType() == Fluids.WATER).setValue(FACING, ctx.getClickedFace());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return BlocksHelper.rotateHorizontal(state, rotation, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return BlocksHelper.mirrorHorizontal(state, mirror, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
|
@ -82,12 +82,12 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
SHAPES.put(Axis.X, Block.box(0, 6, 6, 16, 10, 10));
|
||||
SHAPES.put(Axis.Y, Block.box(6, 0, 6, 10, 16, 10));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue