diff --git a/src/main/java/systems/alexander/bellsandwhistles/block/custom/MetalStepBlock.java b/src/main/java/systems/alexander/bellsandwhistles/block/custom/MetalStepBlock.java index fa38f92..bea4497 100644 --- a/src/main/java/systems/alexander/bellsandwhistles/block/custom/MetalStepBlock.java +++ b/src/main/java/systems/alexander/bellsandwhistles/block/custom/MetalStepBlock.java @@ -28,6 +28,16 @@ public boolean propagatesSkylightDown(BlockState pState, BlockGetter pReader, Bl return true; } + private boolean canAttachTo(BlockGetter pBlockReader, BlockPos pPos, Direction pDirection) { + BlockState blockstate = pBlockReader.getBlockState(pPos); + return true; + } + @Override + public boolean canSurvive(BlockState pState, LevelReader pLevel, BlockPos pPos) { + Direction direction = pState.getValue(FACING); + return this.canAttachTo(pLevel, pPos.relative(direction.getOpposite()), direction); + } + @Override public boolean isLadder(BlockState state, LevelReader level, BlockPos pos, LivingEntity entity) { return super.isLadder(state, level, pos, entity); diff --git a/src/main/resources/assets/bellsandwhistles/blockstates/corrugated_metro_panel.json b/src/main/resources/assets/bellsandwhistles/blockstates/corrugated_metro_panel.json index 39169fe..77f6b46 100644 --- a/src/main/resources/assets/bellsandwhistles/blockstates/corrugated_metro_panel.json +++ b/src/main/resources/assets/bellsandwhistles/blockstates/corrugated_metro_panel.json @@ -6,17 +6,17 @@ }, "facing=east": { "model": "bellsandwhistles:block/metro/corrugated_panel/block_side", - "y": 90, + "y": 270, "x": 180 }, "facing=north": { "model": "bellsandwhistles:block/metro/corrugated_panel/block_side", - "x": 180 + "x": 180, + "y": 180 }, "facing=south": { "model": "bellsandwhistles:block/metro/corrugated_panel/block_side", - "x": 180, - "y": 180 + "x": 180 }, "facing=up": { "model": "bellsandwhistles:block/metro/corrugated_panel/block_bottom" @@ -24,7 +24,7 @@ "facing=west": { "model": "bellsandwhistles:block/metro/corrugated_panel/block_side", "x": 180, - "y": 270 + "y": 90 } } } \ No newline at end of file diff --git a/src/main/resources/assets/bellsandwhistles/models/block/andesite_step.json b/src/main/resources/assets/bellsandwhistles/models/block/andesite_step.json new file mode 100644 index 0000000..b39afb3 --- /dev/null +++ b/src/main/resources/assets/bellsandwhistles/models/block/andesite_step.json @@ -0,0 +1,55 @@ +{ + "credit": "Made with Blockbench", + "ambientocclusion": false, + "render_type": "cutout", + "textures": { + "0": "bellsandwhistles:block/metal_rails/ladder_andesite_hoop", + "2": "bellsandwhistles:block/metal_rails/steps_andesite", + "particle": "bellsandwhistles:block/metal_rails/hand_rails_andesite" + }, + "elements": [ + { + "name": "hoop_right", + "from": [2, -0.75, 14], + "to": [4, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + }, + { + "name": "ladder", + "from": [1, -0.5, 12], + "to": [15, 0.5, 16], + "shade": false, + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 14, 9], "texture": "#2"}, + "east": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "west": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "up": {"uv": [0, 0, 14, 4], "texture": "#2"} + } + }, + { + "name": "hoop_left", + "from": [12, -0.75, 14], + "to": [14, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + } + ], + "groups": [ + { + "name": "ladder", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bellsandwhistles/models/block/brass_step.json b/src/main/resources/assets/bellsandwhistles/models/block/brass_step.json new file mode 100644 index 0000000..d290838 --- /dev/null +++ b/src/main/resources/assets/bellsandwhistles/models/block/brass_step.json @@ -0,0 +1,55 @@ +{ + "credit": "Made with Blockbench", + "ambientocclusion": false, + "render_type": "cutout", + "textures": { + "0": "bellsandwhistles:block/metal_rails/ladder_brass_hoop", + "2": "bellsandwhistles:block/metal_rails/steps_brass", + "particle": "bellsandwhistles:block/metal_rails/hand_rails_andesite" + }, + "elements": [ + { + "name": "hoop_right", + "from": [2, -0.75, 14], + "to": [4, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + }, + { + "name": "ladder", + "from": [1, -0.5, 12], + "to": [15, 0.5, 16], + "shade": false, + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 14, 9], "texture": "#2"}, + "east": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "west": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "up": {"uv": [0, 0, 14, 4], "texture": "#2"} + } + }, + { + "name": "hoop_left", + "from": [12, -0.75, 14], + "to": [14, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + } + ], + "groups": [ + { + "name": "ladder", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/bellsandwhistles/models/block/copper_step.json b/src/main/resources/assets/bellsandwhistles/models/block/copper_step.json new file mode 100644 index 0000000..bfebb5d --- /dev/null +++ b/src/main/resources/assets/bellsandwhistles/models/block/copper_step.json @@ -0,0 +1,55 @@ +{ + "credit": "Made with Blockbench", + "ambientocclusion": false, + "render_type": "cutout", + "textures": { + "0": "bellsandwhistles:block/metal_rails/ladder_copper_hoop", + "2": "bellsandwhistles:block/metal_rails/steps_copper", + "particle": "bellsandwhistles:block/metal_rails/hand_rails_andesite" + }, + "elements": [ + { + "name": "hoop_right", + "from": [2, -0.75, 14], + "to": [4, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + }, + { + "name": "ladder", + "from": [1, -0.5, 12], + "to": [15, 0.5, 16], + "shade": false, + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 8, 14, 9], "texture": "#2"}, + "east": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "west": {"uv": [4, 9, 0, 10], "texture": "#2"}, + "up": {"uv": [0, 0, 14, 4], "texture": "#2"} + } + }, + { + "name": "hoop_left", + "from": [12, -0.75, 14], + "to": [14, 1.25, 18], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 4, 16, 6], "texture": "#0", "cullface": "up"}, + "south": {"uv": [16, 4, 14, 6], "texture": "#0", "cullface": "up"}, + "up": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#0", "cullface": "up"} + } + } + ], + "groups": [ + { + "name": "ladder", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file