Removed color provider
This commit is contained in:
parent
2c8862a37b
commit
4040597a6d
475 changed files with 5411 additions and 7521 deletions
|
@ -35,38 +35,32 @@ import java.util.EnumMap;
|
|||
public class SmaragdantCrystalShardBlock extends BaseAttachedBlock implements IRenderTyped, SimpleWaterloggedBlock, LiquidBlockContainer {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
|
||||
|
||||
public SmaragdantCrystalShardBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE)
|
||||
.materialColor(MaterialColor.COLOR_GREEN)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.luminance(15)
|
||||
.sound(SoundType.AMETHYST_CLUSTER)
|
||||
.requiresCorrectToolForDrops()
|
||||
.noCollission());
|
||||
super(FabricBlockSettings.of(Material.STONE).materialColor(MaterialColor.COLOR_GREEN).breakByTool(FabricToolTags.PICKAXES).luminance(15).sound(SoundType.AMETHYST_CLUSTER).requiresCorrectToolForDrops().noCollission());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
super.createBlockStateDefinition(stateManager);
|
||||
stateManager.add(WATERLOGGED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlaceLiquid(BlockGetter world, BlockPos pos, BlockState state, Fluid fluid) {
|
||||
return !state.getValue(WATERLOGGED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean placeLiquid(LevelAccessor world, BlockPos pos, BlockState state, FluidState fluidState) {
|
||||
return !state.getValue(WATERLOGGED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
BlockState state = super.getStateForPlacement(ctx);
|
||||
|
@ -78,24 +72,24 @@ public class SmaragdantCrystalShardBlock extends BaseAttachedBlock implements IR
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockState state) {
|
||||
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : Fluids.EMPTY.defaultFluidState();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return BOUNDING_SHAPES.get(state.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
Direction direction = state.getValue(FACING);
|
||||
BlockPos blockPos = pos.relative(direction.getOpposite());
|
||||
return world.getBlockState(blockPos).isFaceSturdy(world, blockPos, direction);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
BOUNDING_SHAPES.put(Direction.UP, Shapes.box(0.125, 0.0, 0.125, 0.875F, 0.875F, 0.875F));
|
||||
BOUNDING_SHAPES.put(Direction.DOWN, Shapes.box(0.125, 0.125, 0.125, 0.875F, 1.0, 0.875F));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue