Fix properties being recreated for several blocks (#2238)
This commit is contained in:
parent
7ba962196b
commit
a4bceb32a8
4 changed files with 8 additions and 14 deletions
|
@ -54,8 +54,8 @@ import java.util.function.ToIntFunction;
|
||||||
|
|
||||||
public class LampBlock extends BaseBlockEntityProvider {
|
public class LampBlock extends BaseBlockEntityProvider {
|
||||||
|
|
||||||
public static DirectionProperty FACING = Properties.FACING;
|
public static final DirectionProperty FACING = Properties.FACING;
|
||||||
public static BooleanProperty ACTIVE;
|
public static final BooleanProperty ACTIVE = BooleanProperty.of("active");
|
||||||
protected final VoxelShape[] shape;
|
protected final VoxelShape[] shape;
|
||||||
|
|
||||||
private final int cost;
|
private final int cost;
|
||||||
|
@ -116,7 +116,6 @@ public class LampBlock extends BaseBlockEntityProvider {
|
||||||
// Block
|
// Block
|
||||||
@Override
|
@Override
|
||||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||||
ACTIVE = BooleanProperty.of("active");
|
|
||||||
builder.add(FACING, ACTIVE);
|
builder.add(FACING, ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ import techreborn.utils.MessageIDs;
|
||||||
|
|
||||||
public class PlayerDetectorBlock extends BlockMachineBase {
|
public class PlayerDetectorBlock extends BlockMachineBase {
|
||||||
|
|
||||||
public static EnumProperty<PlayerDetectorType> TYPE;
|
public static final EnumProperty<PlayerDetectorType> TYPE = EnumProperty.of("type", PlayerDetectorType.class);
|
||||||
|
|
||||||
public PlayerDetectorBlock() {
|
public PlayerDetectorBlock() {
|
||||||
super(Block.Settings.of(Material.METAL).strength(2f, 2f), true);
|
super(Block.Settings.of(Material.METAL).strength(2f, 2f), true);
|
||||||
|
@ -143,7 +143,6 @@ public class PlayerDetectorBlock extends BlockMachineBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||||
TYPE = EnumProperty.of("type", PlayerDetectorType.class);
|
|
||||||
builder.add(TYPE);
|
builder.add(TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
public class ResinBasinBlock extends BaseBlockEntityProvider {
|
public class ResinBasinBlock extends BaseBlockEntityProvider {
|
||||||
|
|
||||||
public static DirectionProperty FACING = Properties.HORIZONTAL_FACING;
|
public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING;
|
||||||
public static BooleanProperty POURING = BooleanProperty.of("pouring");
|
public static final BooleanProperty POURING = BooleanProperty.of("pouring");
|
||||||
public static BooleanProperty FULL = BooleanProperty.of("full");
|
public static final BooleanProperty FULL = BooleanProperty.of("full");
|
||||||
Supplier<BlockEntity> blockEntityClass;
|
Supplier<BlockEntity> blockEntityClass;
|
||||||
|
|
||||||
public ResinBasinBlock(Supplier<BlockEntity> blockEntityClass) {
|
public ResinBasinBlock(Supplier<BlockEntity> blockEntityClass) {
|
||||||
|
@ -51,9 +51,6 @@ public class ResinBasinBlock extends BaseBlockEntityProvider {
|
||||||
// Block
|
// Block
|
||||||
@Override
|
@Override
|
||||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||||
FACING = DirectionProperty.of("facing", Direction.Type.HORIZONTAL);
|
|
||||||
POURING = BooleanProperty.of("pouring");
|
|
||||||
FULL = BooleanProperty.of("full");
|
|
||||||
builder.add(FACING, POURING, FULL);
|
builder.add(FACING, POURING, FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ import org.jetbrains.annotations.Nullable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockAlarm extends BaseBlockEntityProvider {
|
public class BlockAlarm extends BaseBlockEntityProvider {
|
||||||
public static DirectionProperty FACING = Properties.FACING;
|
public static final DirectionProperty FACING = Properties.FACING;
|
||||||
public static BooleanProperty ACTIVE;
|
public static final BooleanProperty ACTIVE = BooleanProperty.of("active");
|
||||||
protected final VoxelShape[] shape;
|
protected final VoxelShape[] shape;
|
||||||
|
|
||||||
public BlockAlarm() {
|
public BlockAlarm() {
|
||||||
|
@ -107,7 +107,6 @@ public class BlockAlarm extends BaseBlockEntityProvider {
|
||||||
// Block
|
// Block
|
||||||
@Override
|
@Override
|
||||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||||
ACTIVE = BooleanProperty.of("active");
|
|
||||||
builder.add(FACING, ACTIVE);
|
builder.add(FACING, ACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue