diff --git a/src/api/java/blusunrize/immersiveengineering/api/IEProperties.java b/src/api/java/blusunrize/immersiveengineering/api/IEProperties.java index 8f22ef026c..b676485141 100644 --- a/src/api/java/blusunrize/immersiveengineering/api/IEProperties.java +++ b/src/api/java/blusunrize/immersiveengineering/api/IEProperties.java @@ -34,6 +34,7 @@ public class IEProperties public static final BooleanProperty MULTIBLOCKSLAVE = BooleanProperty.create("multiblockslave"); public static final BooleanProperty ACTIVE = BooleanProperty.create("active"); + public static final BooleanProperty OPEN = BooleanProperty.create("open"); public static final BooleanProperty MIRRORED = BooleanProperty.create("mirrored"); public static final BooleanProperty UP = BooleanProperty.create("up"); diff --git a/src/datagen/java/blusunrize/immersiveengineering/data/blockstates/BlockStates.java b/src/datagen/java/blusunrize/immersiveengineering/data/blockstates/BlockStates.java index 1dd7ab098e..65f177cd21 100644 --- a/src/datagen/java/blusunrize/immersiveengineering/data/blockstates/BlockStates.java +++ b/src/datagen/java/blusunrize/immersiveengineering/data/blockstates/BlockStates.java @@ -716,11 +716,11 @@ private void createLadderBlock(Supplier b, ModelFile model, Mod { builder.partialState() .with(IEProperties.FACING_HORIZONTAL, d) - .with(IEProperties.ACTIVE, false) + .with(IEProperties.OPEN, false) .setModels(new ConfiguredModel(model, 0, getAngle(d, 180), true)); builder.partialState() .with(IEProperties.FACING_HORIZONTAL, d) - .with(IEProperties.ACTIVE, true) + .with(IEProperties.OPEN, true) .setModels(new ConfiguredModel(modelOpen, 0, getAngle(d, 180), false)); } } diff --git a/src/generated/resources/.cache/619000d5325dea258e481d2612f9a5c790da2123 b/src/generated/resources/.cache/619000d5325dea258e481d2612f9a5c790da2123 index 16b7630159..f8285528d9 100644 --- a/src/generated/resources/.cache/619000d5325dea258e481d2612f9a5c790da2123 +++ b/src/generated/resources/.cache/619000d5325dea258e481d2612f9a5c790da2123 @@ -1,4 +1,4 @@ -// 1.20.4 2024-06-22T00:22:03.445668485 Block States: immersiveengineering +// 1.20.4 2024-06-22T13:47:08.394186785 Block States: immersiveengineering 4c68c9f8b259aa39377c5dc7dc91979f52266b4e assets/immersiveengineering/blockstates/acetaldehyde_fluid_block.json 62840bb00a251db76f13a7006027e4fb82f42f91 assets/immersiveengineering/blockstates/alloybrick.json 895fb4016c6f7b5b3f1cf1a8313d3e15fc231b33 assets/immersiveengineering/blockstates/alu_catwalk.json @@ -92,9 +92,9 @@ f8edfde0f5a8dc99feed13aee70951709c8f467f assets/immersiveengineering/blockstates bf4d6eb88053d78f01d0628281f4ae2060a0caac assets/immersiveengineering/blockstates/logic_unit.json e50c413bfe13e4c723bb68a28752461bdf5f2ca6 assets/immersiveengineering/blockstates/machine_interface.json 579478c3a149414d8a0152db0ec3f6d12793c616 assets/immersiveengineering/blockstates/metal_barrel.json -2f3b47fa7ce54087affb21d71b39294149b2e87f assets/immersiveengineering/blockstates/metal_ladder_alu.json +327567e03fed5e1a8dd950ab507a226fddf91aec assets/immersiveengineering/blockstates/metal_ladder_alu.json 285612fb6ca7f4d27d80296958889a11dfc83ca0 assets/immersiveengineering/blockstates/metal_ladder_none.json -d479691bc45ddbacdefd0fa6b78ef6d56dac5d52 assets/immersiveengineering/blockstates/metal_ladder_steel.json +18cc49d1762ca4b232d24182003ddbefba660d00 assets/immersiveengineering/blockstates/metal_ladder_steel.json 2923135747c5483c8b0041352af77b14a06d668d assets/immersiveengineering/blockstates/ore_aluminum.json 32c52a72005e0e58345a6329c10f946be7a22f4d assets/immersiveengineering/blockstates/ore_lead.json 8054f7c8d0cee21e7f73efd433270cfe0a0933e5 assets/immersiveengineering/blockstates/ore_nickel.json diff --git a/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_alu.json b/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_alu.json index c77de05c12..adff0e37a5 100644 --- a/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_alu.json +++ b/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_alu.json @@ -1,36 +1,36 @@ { "variants": { - "active=false,facing=east": { + "facing=east,open=false": { "model": "immersiveengineering:block/metal_ladder_alu", "uvlock": true, "y": 90 }, - "active=false,facing=north": { + "facing=east,open=true": { + "model": "immersiveengineering:block/metal_ladder_alu_open", + "y": 90 + }, + "facing=north,open=false": { "model": "immersiveengineering:block/metal_ladder_alu", "uvlock": true }, - "active=false,facing=south": { + "facing=north,open=true": { + "model": "immersiveengineering:block/metal_ladder_alu_open" + }, + "facing=south,open=false": { "model": "immersiveengineering:block/metal_ladder_alu", "uvlock": true, "y": 180 }, - "active=false,facing=west": { + "facing=south,open=true": { + "model": "immersiveengineering:block/metal_ladder_alu_open", + "y": 180 + }, + "facing=west,open=false": { "model": "immersiveengineering:block/metal_ladder_alu", "uvlock": true, "y": 270 }, - "active=true,facing=east": { - "model": "immersiveengineering:block/metal_ladder_alu_open", - "y": 90 - }, - "active=true,facing=north": { - "model": "immersiveengineering:block/metal_ladder_alu_open" - }, - "active=true,facing=south": { - "model": "immersiveengineering:block/metal_ladder_alu_open", - "y": 180 - }, - "active=true,facing=west": { + "facing=west,open=true": { "model": "immersiveengineering:block/metal_ladder_alu_open", "y": 270 } diff --git a/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_steel.json b/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_steel.json index 38d553c5d9..46385fda12 100644 --- a/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_steel.json +++ b/src/generated/resources/assets/immersiveengineering/blockstates/metal_ladder_steel.json @@ -1,36 +1,36 @@ { "variants": { - "active=false,facing=east": { + "facing=east,open=false": { "model": "immersiveengineering:block/metal_ladder_steel", "uvlock": true, "y": 90 }, - "active=false,facing=north": { + "facing=east,open=true": { + "model": "immersiveengineering:block/metal_ladder_steel_open", + "y": 90 + }, + "facing=north,open=false": { "model": "immersiveengineering:block/metal_ladder_steel", "uvlock": true }, - "active=false,facing=south": { + "facing=north,open=true": { + "model": "immersiveengineering:block/metal_ladder_steel_open" + }, + "facing=south,open=false": { "model": "immersiveengineering:block/metal_ladder_steel", "uvlock": true, "y": 180 }, - "active=false,facing=west": { + "facing=south,open=true": { + "model": "immersiveengineering:block/metal_ladder_steel_open", + "y": 180 + }, + "facing=west,open=false": { "model": "immersiveengineering:block/metal_ladder_steel", "uvlock": true, "y": 270 }, - "active=true,facing=east": { - "model": "immersiveengineering:block/metal_ladder_steel_open", - "y": 90 - }, - "active=true,facing=north": { - "model": "immersiveengineering:block/metal_ladder_steel_open" - }, - "active=true,facing=south": { - "model": "immersiveengineering:block/metal_ladder_steel_open", - "y": 180 - }, - "active=true,facing=west": { + "facing=west,open=true": { "model": "immersiveengineering:block/metal_ladder_steel_open", "y": 270 } diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/MetalLadderBlock.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/MetalLadderBlock.java index b5433c3413..1e37839e93 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/MetalLadderBlock.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/MetalLadderBlock.java @@ -94,7 +94,7 @@ public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, Co else { Direction ladderSide = state.getValue(LadderBlock.FACING); - return state.getValue(IEProperties.ACTIVE) ? Shapes.joinUnoptimized(base, FRAMES_OPEN.get(ladderSide), BooleanOp.OR) : Shapes.joinUnoptimized(base, FRAMES.get(ladderSide), BooleanOp.OR); + return state.getValue(IEProperties.OPEN) ? Shapes.joinUnoptimized(base, FRAMES_OPEN.get(ladderSide), BooleanOp.OR) : Shapes.joinUnoptimized(base, FRAMES.get(ladderSide), BooleanOp.OR); } } @@ -104,7 +104,7 @@ public BlockState getStateForPlacement(BlockPlaceContext ctx) { BlockState baseState = super.getStateForPlacement(ctx); if(baseState==null) return baseState; - baseState = baseState.setValue(IEProperties.ACTIVE, false); + baseState = baseState.setValue(IEProperties.OPEN, false); if(type==CoverType.NONE) return baseState; else @@ -122,7 +122,7 @@ public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) @Override protected void createBlockStateDefinition(StateDefinition.Builder state) { - state.add(FACING, WATERLOGGED, IEProperties.ACTIVE); + state.add(FACING, WATERLOGGED, IEProperties.OPEN); } @Override @@ -131,7 +131,7 @@ public InteractionResult useHammer(BlockState state, Level world, BlockPos pos, if (player==null) return InteractionResult.FAIL; if(type!=CoverType.NONE&&player.isShiftKeyDown()) { - boolean b = world.setBlockAndUpdate(pos, state.setValue(IEProperties.ACTIVE, !state.getValue(IEProperties.ACTIVE))); + boolean b = world.setBlockAndUpdate(pos, state.setValue(IEProperties.OPEN, !state.getValue(IEProperties.OPEN))); if(b) return InteractionResult.SUCCESS; else