Cull me maybe

- Improved face occlusion for scaffolds
This commit is contained in:
simibubi 2023-02-22 16:58:12 +01:00
parent 23d3c54da1
commit 0ad875bb74
3 changed files with 45 additions and 20 deletions

View file

@ -64,7 +64,9 @@ public class MetalScaffoldingBlock extends ScaffoldingBlock implements IWrenchab
Direction dir) {
if (!neighborState.is(this))
return false;
return dir.getAxis() != Axis.Y && neighborState.getValue(BOTTOM);
if (!neighborState.getValue(BOTTOM) && state.getValue(BOTTOM))
return false;
return dir.getAxis() != Axis.Y;
}
}

View file

@ -8,15 +8,27 @@
"top": "create:block/funnel/brass_funnel_frame"
},
"elements": [
{
"name": "outside_nocull",
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "down"},
"east": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "down"},
"south": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "down"},
"west": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "down"},
"up": {"uv": [0, 0, 16, 16], "texture": "#top"}
}
},
{
"name": "outside",
"from": [0, 0, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#side"},
"east": {"uv": [0, 0, 16, 16], "texture": "#side"},
"south": {"uv": [0, 0, 16, 16], "texture": "#side"},
"west": {"uv": [0, 0, 16, 16], "texture": "#side"},
"north": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "north"},
"east": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "east"},
"south": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "south"},
"west": {"uv": [0, 0, 16, 16], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 0, 16, 16], "texture": "#top"}
}
},
@ -25,10 +37,10 @@
"from": [0, 0, 16],
"to": [16, 16, 0],
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#2"},
"east": {"uv": [0, 0, 16, 16], "texture": "#2"},
"south": {"uv": [0, 0, 16, 16], "texture": "#2"},
"west": {"uv": [0, 0, 16, 16], "texture": "#2"},
"north": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "south"},
"east": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "east"},
"south": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "north"},
"west": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "west"},
"up": {"uv": [0, 0, 16, 16], "texture": "#top"}
}
}

View file

@ -7,15 +7,27 @@
},
"elements": [
{
"name": "outside",
"from": [0, 8, 0],
"name": "top",
"from": [0, 13, 0],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [16, 0, 0, 8], "texture": "#side", "cullface": "north"},
"east": {"uv": [16, 0, 0, 8], "texture": "#side", "cullface": "east"},
"south": {"uv": [16, 0, 0, 8], "texture": "#side", "cullface": "south"},
"west": {"uv": [16, 0, 0, 8], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 0, 16, 16], "texture": "#particle"}
"north": {"uv": [16, 0, 0, 3], "texture": "#side", "cullface": "north"},
"east": {"uv": [16, 0, 0, 3], "texture": "#side", "cullface": "east"},
"south": {"uv": [16, 0, 0, 3], "texture": "#side", "cullface": "south"},
"west": {"uv": [16, 0, 0, 3], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 0, 16, 16], "texture": "#particle"},
"down": {"uv": [0, 0, 16, 16], "texture": "#particle"}
}
},
{
"name": "outside",
"from": [0, 8, 0],
"to": [16, 13, 16],
"faces": {
"north": {"uv": [16, 3, 0, 8], "texture": "#side", "cullface": "north"},
"east": {"uv": [16, 3, 0, 8], "texture": "#side", "cullface": "east"},
"south": {"uv": [16, 3, 0, 8], "texture": "#side", "cullface": "south"},
"west": {"uv": [16, 3, 0, 8], "texture": "#side", "cullface": "west"}
}
},
{
@ -24,10 +36,9 @@
"to": [0, 13, 16],
"faces": {
"north": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "north"},
"east": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "north"},
"south": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "north"},
"west": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "north"},
"up": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#particle"}
"east": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "west"},
"south": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "south"},
"west": {"uv": [16, 3, 0, 8], "texture": "#2", "cullface": "east"}
}
}
]