Code style changes, entities fixes
This commit is contained in:
parent
9d604b2d25
commit
44962e18b6
377 changed files with 5038 additions and 4914 deletions
|
@ -19,7 +19,7 @@ import ru.betterend.registry.EndBlocks;
|
|||
|
||||
public class GlowingPillarLuminophorBlock extends BaseBlock {
|
||||
public static final BooleanProperty NATURAL = EndBlockProperties.NATURAL;
|
||||
|
||||
|
||||
public GlowingPillarLuminophorBlock() {
|
||||
super(FabricBlockSettings.of(Material.LEAVES)
|
||||
.materialColor(MaterialColor.COLOR_ORANGE)
|
||||
|
@ -29,12 +29,12 @@ public class GlowingPillarLuminophorBlock extends BaseBlock {
|
|||
.sound(SoundType.GRASS));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(NATURAL, false));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return !state.getValue(NATURAL) || world.getBlockState(pos.below()).is(EndBlocks.GLOWING_PILLAR_ROOTS);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction facing, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
|
@ -44,7 +44,7 @@ public class GlowingPillarLuminophorBlock extends BaseBlock {
|
|||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(NATURAL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue