Vertical model
This commit is contained in:
@@ -88,17 +88,17 @@ public class CableBlock extends Block {
|
|||||||
boolean up = state.get(UP);
|
boolean up = state.get(UP);
|
||||||
boolean down = state.get(DOWN);
|
boolean down = state.get(DOWN);
|
||||||
|
|
||||||
if (north || (south && !east && !west))
|
if (north || (south && !east && !west && !up && !down))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 0, 10, 10, 6));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 0, 10, 10, 6));
|
||||||
if (south || (north && !east && !west))
|
if (south || (north && !east && !west && !up && !down))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 10, 10, 10, 16));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 10, 10, 10, 16));
|
||||||
if (east || (!north && !south && west))
|
if (east || (!north && !south && west && !up && !down))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(10, 6, 6, 16, 10, 10));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(10, 6, 6, 16, 10, 10));
|
||||||
if (west || (!north && !south && east))
|
if (west || (!north && !south && east && !up && !down))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(0, 6, 6, 6, 10, 10));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(0, 6, 6, 6, 10, 10));
|
||||||
if (up)
|
if (up || (down && !north && !south && !east && !west))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 6, 10, 16, 10));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 6, 10, 16, 10));
|
||||||
if (down)
|
if (down || (up && !north && !south && !east && !west))
|
||||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 0, 6, 10, 6, 10));
|
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 0, 6, 10, 6, 10));
|
||||||
|
|
||||||
return shape;
|
return shape;
|
||||||
|
|||||||
@@ -2,14 +2,20 @@
|
|||||||
"multipart": [
|
"multipart": [
|
||||||
{ "apply": { "model": "redstone-rewired:block/cable_core" } },
|
{ "apply": { "model": "redstone-rewired:block/cable_core" } },
|
||||||
|
|
||||||
|
{ "when": { "up": "true" }, "apply": { "model": "redstone-rewired:block/cable_up" } },
|
||||||
|
{ "when": { "down": "true" }, "apply": { "model": "redstone-rewired:block/cable_down" } },
|
||||||
|
|
||||||
|
{ "when": { "north": "false", "south": "false", "east": "false", "west": "false", "up": "true", "down": "false" }, "apply": { "model": "redstone-rewired:block/cable_down" } },
|
||||||
|
{ "when": { "north": "false", "south": "false", "east": "false", "west": "false", "up": "false", "down": "true" }, "apply": { "model": "redstone-rewired:block/cable_up" } },
|
||||||
|
|
||||||
{ "when": { "north": "true" }, "apply": { "model": "redstone-rewired:block/cable_north" } },
|
{ "when": { "north": "true" }, "apply": { "model": "redstone-rewired:block/cable_north" } },
|
||||||
{ "when": { "south": "true" }, "apply": { "model": "redstone-rewired:block/cable_south" } },
|
{ "when": { "south": "true" }, "apply": { "model": "redstone-rewired:block/cable_south" } },
|
||||||
{ "when": { "east": "true" }, "apply": { "model": "redstone-rewired:block/cable_east" } },
|
{ "when": { "east": "true" }, "apply": { "model": "redstone-rewired:block/cable_east" } },
|
||||||
{ "when": { "west": "true" }, "apply": { "model": "redstone-rewired:block/cable_west" } },
|
{ "when": { "west": "true" }, "apply": { "model": "redstone-rewired:block/cable_west" } },
|
||||||
|
|
||||||
{ "when": { "north": "true", "south": "false", "east": "false", "west": "false" }, "apply": { "model": "redstone-rewired:block/cable_south" } },
|
{ "when": { "north": "true", "south": "false", "east": "false", "west": "false", "up": "false", "down": "false" }, "apply": { "model": "redstone-rewired:block/cable_south" } },
|
||||||
{ "when": { "north": "false", "south": "true", "east": "false", "west": "false" }, "apply": { "model": "redstone-rewired:block/cable_north" } },
|
{ "when": { "north": "false", "south": "true", "east": "false", "west": "false", "up": "false", "down": "false" }, "apply": { "model": "redstone-rewired:block/cable_north" } },
|
||||||
{ "when": { "north": "false", "south": "false", "east": "true", "west": "false" }, "apply": { "model": "redstone-rewired:block/cable_west" } },
|
{ "when": { "north": "false", "south": "false", "east": "true", "west": "false", "up": "false", "down": "false" }, "apply": { "model": "redstone-rewired:block/cable_west" } },
|
||||||
{ "when": { "north": "false", "south": "false", "east": "false", "west": "true" }, "apply": { "model": "redstone-rewired:block/cable_east" } }
|
{ "when": { "north": "false", "south": "false", "east": "false", "west": "true", "up": "false", "down": "false" }, "apply": { "model": "redstone-rewired:block/cable_east" } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.21.6",
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"texture_size": [32, 32],
|
||||||
|
"textures": {
|
||||||
|
"0": "redstone-rewired:block/cable",
|
||||||
|
"particle": "redstone-rewired:block/cable"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [6.75, 0, 6.75],
|
||||||
|
"to": [9.25, 6.75, 9.25],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [6.75, 6.75, 6.75]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3, 3, 1.5, 11], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 8, 1.5], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [1.5, 11, 0, 3], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 1.5, 8, 3], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [3, 3, 4.5, 4.5], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [3, 4.5, 4.5, 6], "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.21.6",
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"texture_size": [32, 32],
|
||||||
|
"textures": {
|
||||||
|
"0": "redstone-rewired:block/cable",
|
||||||
|
"particle": "redstone-rewired:block/cable"
|
||||||
|
},
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [6.75, 9.25, 6.75],
|
||||||
|
"to": [9.25, 16, 9.25],
|
||||||
|
"rotation": {"angle": 0, "axis": "x", "origin": [6.75, 6.75, 6.75]},
|
||||||
|
"faces": {
|
||||||
|
"north": {"uv": [3, 3, 1.5, 11], "rotation": 180, "texture": "#0"},
|
||||||
|
"east": {"uv": [0, 0, 8, 1.5], "rotation": 270, "texture": "#0"},
|
||||||
|
"south": {"uv": [1.5, 11, 0, 3], "texture": "#0"},
|
||||||
|
"west": {"uv": [0, 1.5, 8, 3], "rotation": 90, "texture": "#0"},
|
||||||
|
"up": {"uv": [3, 3, 4.5, 4.5], "rotation": 180, "texture": "#0"},
|
||||||
|
"down": {"uv": [3, 4.5, 4.5, 6], "texture": "#0"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user