work around fences/walls/panes being weird

This commit is contained in:
quat1024 2023-07-11 03:34:13 -04:00
parent 73145ed111
commit c44f8dc6e9
6 changed files with 226 additions and 5 deletions

View File

@ -68,14 +68,11 @@ public class TemplatesClient implements ClientModInitializer {
provider.addTemplateModel(Templates.id("carpet_special"), new UnbakedAutoRetexturedModel(new Identifier("block/carpet")));
provider.addTemplateModel(Templates.id("cube_special"), new UnbakedAutoRetexturedModel(new Identifier("block/cube")));
provider.addTemplateModel(Templates.id("fence_post_special"), new UnbakedAutoRetexturedModel(new Identifier("block/fence_post")));
provider.addTemplateModel(Templates.id("fence_side_special"), new UnbakedAutoRetexturedModel(new Identifier("block/fence_side")));
provider.addTemplateModel(Templates.id("fence_gate_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_fence_gate")));
provider.addTemplateModel(Templates.id("fence_gate_open_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_fence_gate_open")));
provider.addTemplateModel(Templates.id("fence_gate_wall_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_fence_gate_wall")));
provider.addTemplateModel(Templates.id("fence_gate_wall_open_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_fence_gate_wall_open")));
provider.addTemplateModel(Templates.id("glass_pane_post_special"), new UnbakedAutoRetexturedModel(new Identifier("block/glass_pane_post")));
provider.addTemplateModel(Templates.id("glass_pane_side_special"), new UnbakedAutoRetexturedModel(new Identifier("block/glass_pane_side")));
provider.addTemplateModel(Templates.id("glass_pane_side_alt_special"), new UnbakedAutoRetexturedModel(new Identifier("block/glass_pane_side_alt")));
provider.addTemplateModel(Templates.id("glass_pane_noside_special"), new UnbakedAutoRetexturedModel(new Identifier("block/glass_pane_noside")));
provider.addTemplateModel(Templates.id("glass_pane_noside_alt_special"), new UnbakedAutoRetexturedModel(new Identifier("block/glass_pane_noside_alt")));
provider.addTemplateModel(Templates.id("pressure_plate_up_special"), new UnbakedAutoRetexturedModel(new Identifier("block/pressure_plate_up")));
@ -88,13 +85,17 @@ public class TemplatesClient implements ClientModInitializer {
provider.addTemplateModel(Templates.id("trapdoor_bottom_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_bottom")));
provider.addTemplateModel(Templates.id("trapdoor_top_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_top")));
provider.addTemplateModel(Templates.id("wall_post_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_post")));
provider.addTemplateModel(Templates.id("wall_side_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_side")));
provider.addTemplateModel(Templates.id("wall_side_tall_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_side_tall")));
//vanilla style models (using "special-sprite replacement" method)
provider.addTemplateModel(Templates.id("lever_special"), new UnbakedJsonRetexturedModel(Templates.id("block/lever")));
provider.addTemplateModel(Templates.id("trapdoor_open_special"), new UnbakedJsonRetexturedModel(Templates.id("block/trapdoor_open")));
provider.addTemplateModel(Templates.id("lever_on_special"), new UnbakedJsonRetexturedModel(Templates.id("block/lever_on")));
//these only exist because AutoRetexturedModels don't seem to rotate their textures the right way when rotated from a multipart blockstate
provider.addTemplateModel(Templates.id("fence_side_special"), new UnbakedJsonRetexturedModel(Templates.id("block/fence_side")));
provider.addTemplateModel(Templates.id("glass_pane_side_special"), new UnbakedJsonRetexturedModel(Templates.id("block/glass_pane_side")));
provider.addTemplateModel(Templates.id("glass_pane_side_alt_special"), new UnbakedAutoRetexturedModel(Templates.id("block/glass_pane_side_alt")));
provider.addTemplateModel(Templates.id("wall_side_special"), new UnbakedJsonRetexturedModel(Templates.id("block/wall_side")));
provider.addTemplateModel(Templates.id("wall_side_tall_special"), new UnbakedJsonRetexturedModel(Templates.id("block/wall_side_tall")));
//mesh models
provider.addTemplateModel(Templates.id("slope_special"), new UnbakedMeshRetexturedModel(Templates.id("block/slope_base"), SlopeBaseMesh::makeUpright));

View File

@ -0,0 +1,68 @@
{
"textures": {
"down": "templates:templates_special/down",
"up": "templates:templates_special/up",
"north": "templates:templates_special/north",
"south": "templates:templates_special/south",
"west": "templates:templates_special/west",
"east": "templates:templates_special/east"
},
"elements": [
{
"from": [7, 12, 0],
"to": [9, 15, 9],
"faces": {
"down": {
"uv": [7, 0, 9, 9],
"texture": "#down"
},
"up": {
"uv": [7, 0, 9, 9],
"texture": "#up"
},
"north": {
"uv": [7, 1, 9, 4],
"texture": "#north",
"cullface": "north"
},
"west": {
"uv": [0, 1, 9, 4],
"texture": "#west"
},
"east": {
"uv": [0, 1, 9, 4],
"texture": "#east"
}
},
"__comment": "top bar"
},
{
"from": [7, 6, 0],
"to": [9, 9, 9],
"faces": {
"down": {
"uv": [7, 0, 9, 9],
"texture": "#down"
},
"up": {
"uv": [7, 0, 9, 9],
"texture": "#up"
},
"north": {
"uv": [7, 7, 9, 10],
"texture": "#north",
"cullface": "north"
},
"west": {
"uv": [0, 7, 9, 10],
"texture": "#west"
},
"east": {
"uv": [0, 7, 9, 10],
"texture": "#east"
}
},
"__comment": "lower bar"
}
]
}

View File

@ -0,0 +1,40 @@
{
"ambientocclusion": false,
"textures": {
"down": "templates:templates_special/down",
"up": "templates:templates_special/up",
"north": "templates:templates_special/north",
"south": "templates:templates_special/south",
"west": "templates:templates_special/west",
"east": "templates:templates_special/east"
},
"elements": [
{
"from": [7, 0, 0],
"to": [9, 16, 7],
"faces": {
"down": {
"uv": [7, 0, 9, 7],
"texture": "#down"
},
"up": {
"uv": [7, 0, 9, 7],
"texture": "#up"
},
"north": {
"uv": [7, 0, 9, 16],
"texture": "#north",
"cullface": "north"
},
"west": {
"uv": [16, 0, 9, 16],
"texture": "#west"
},
"east": {
"uv": [9, 0, 16, 16],
"texture": "#east"
}
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"ambientocclusion": false,
"textures": {
"down": "templates:templates_special/down",
"up": "templates:templates_special/up",
"north": "templates:templates_special/north",
"south": "templates:templates_special/south",
"west": "templates:templates_special/west",
"east": "templates:templates_special/east"
},
"elements": [
{
"from": [7, 0, 9],
"to": [9, 16, 16],
"faces": {
"down": {
"uv": [7, 0, 9, 7],
"texture": "#down"
},
"up": {
"uv": [7, 0, 9, 7],
"texture": "#up"
},
"south": {
"uv": [7, 0, 9, 16],
"texture": "#south",
"cullface": "south"
},
"west": {
"uv": [7, 0, 0, 16],
"texture": "#west"
},
"east": {
"uv": [0, 0, 7, 16],
"texture": "#east"
}
}
}
]
}

View File

@ -0,0 +1,36 @@
{
"textures": {
"down": "templates:templates_special/down",
"up": "templates:templates_special/up",
"north": "templates:templates_special/north",
"south": "templates:templates_special/south",
"west": "templates:templates_special/west",
"east": "templates:templates_special/east"
},
"elements": [
{
"from": [5, 0, 0],
"to": [11, 14, 8],
"faces": {
"down": {
"texture": "#down",
"cullface": "down"
},
"up": {
"texture": "#up"
},
"north": {
"texture": "#north",
"cullface": "north"
},
"west": {
"texture": "#west"
},
"east": {
"texture": "#east"
}
},
"__comment": "wall"
}
]
}

View File

@ -0,0 +1,36 @@
{
"textures": {
"down": "templates:templates_special/down",
"up": "templates:templates_special/up",
"north": "templates:templates_special/north",
"south": "templates:templates_special/south",
"west": "templates:templates_special/west",
"east": "templates:templates_special/east"
},
"elements": [
{
"from": [5, 0, 0],
"to": [11, 16, 8],
"faces": {
"down": {
"texture": "#down",
"cullface": "down"
},
"up": {
"texture": "#up",
"cullface": "up"
},
"north": {
"texture": "#north",
"cullface": "north"
},
"west": {
"texture": "#west"
},
"east": {
"texture": "#east"
}
}
}
]
}