1.21.8
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_bottom"
|
||||
},
|
||||
"facing=east,half=bottom,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_top"
|
||||
},
|
||||
"facing=east,half=top,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 90
|
||||
},
|
||||
"facing=north,half=bottom,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_bottom"
|
||||
},
|
||||
"facing=north,half=bottom,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open"
|
||||
},
|
||||
"facing=north,half=top,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_top"
|
||||
},
|
||||
"facing=north,half=top,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open"
|
||||
},
|
||||
"facing=south,half=bottom,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_bottom"
|
||||
},
|
||||
"facing=south,half=bottom,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_top"
|
||||
},
|
||||
"facing=south,half=top,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_bottom"
|
||||
},
|
||||
"facing=west,half=bottom,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,open=false": {
|
||||
"model": "minecraft:block/oak_trapdoor_top"
|
||||
},
|
||||
"facing=west,half=top,open=true": {
|
||||
"model": "minecraft:block/oak_trapdoor_open",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:block/template_trapdoor_open",
|
||||
"textures": {
|
||||
"texture": "minecraft:block/oak_trapdoor"
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
{ "parent": "block/block",
|
||||
"display": {
|
||||
"gui": {
|
||||
"rotation": [ 30, 45, 0 ],
|
||||
"translation": [ 0, -1, 0],
|
||||
"scale":[ 0.8, 0.8, 0.8 ]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [ 0, 0, 0 ],
|
||||
"translation": [ 0, -3, -6],
|
||||
"scale":[ 1, 1, 1]
|
||||
}
|
||||
},
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "__comment": "Left-hand post",
|
||||
"from": [ 0, 5, 7 ],
|
||||
"to": [ 2, 16, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Right-hand post",
|
||||
"from": [ 14, 5, 7 ],
|
||||
"to": [ 16, 16, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of left-hand gate door",
|
||||
"from": [ 6, 6, 7 ],
|
||||
"to": [ 8, 15, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6, 7, 8, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 6, 7, 8, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 1, 8, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 6, 1, 8, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of right-hand gate door",
|
||||
"from": [ 8, 6, 7 ],
|
||||
"to": [ 10, 15, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 8, 7, 10, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 8, 7, 10, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 8, 1, 10, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 8, 1, 10, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 2, 6, 7 ],
|
||||
"to": [ 6, 9, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 2, 7, 6, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 2, 7, 6, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 2, 12, 7 ],
|
||||
"to": [ 6, 15, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 2, 1, 6, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 2, 1, 6, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of right-hand gate door",
|
||||
"from": [ 10, 6, 7 ],
|
||||
"to": [ 14, 9, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 10, 7, 14, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 10, 7, 14, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of right-hand gate door",
|
||||
"from": [ 10, 12, 7 ],
|
||||
"to": [ 14, 15, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 10, 1, 14, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 10, 1, 14, 4 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
{
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "__comment": "Left-hand post",
|
||||
"from": [ 0, 5, 7 ],
|
||||
"to": [ 2, 16, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Right-hand post",
|
||||
"from": [ 14, 5, 7 ],
|
||||
"to": [ 16, 16, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of left-hand gate door",
|
||||
"from": [ 0, 6, 13 ],
|
||||
"to": [ 2, 15, 15 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 1, 2, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 1, 2, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of right-hand gate door",
|
||||
"from": [ 14, 6, 13 ],
|
||||
"to": [ 16, 15, 15 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 1, 16, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 1, 16, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 0, 6, 9 ],
|
||||
"to": [ 2, 9, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 0, 12, 9 ],
|
||||
"to": [ 2, 15, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 14, 6, 9 ],
|
||||
"to": [ 16, 9, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 14, 12, 9 ],
|
||||
"to": [ 16, 15, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"ambientocclusion": true,
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "__comment": "Left-hand post",
|
||||
"from": [ 0, 2, 7 ],
|
||||
"to": [ 2, 13, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Right-hand post",
|
||||
"from": [ 14, 2, 7 ],
|
||||
"to": [ 16, 13, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of left-hand gate door",
|
||||
"from": [ 6, 3, 7 ],
|
||||
"to": [ 8, 12, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 6, 7, 8, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 6, 7, 8, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 6, 1, 8, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 6, 1, 8, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of right-hand gate door",
|
||||
"from": [ 8, 3, 7 ],
|
||||
"to": [ 10, 12, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 8, 7, 10, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 8, 7, 10, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 8, 1, 10, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 8, 1, 10, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 1, 9, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 2, 3, 7 ],
|
||||
"to": [ 6, 6, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 2, 7, 6, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 2, 7, 6, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 2, 9, 7 ],
|
||||
"to": [ 6, 12, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 2, 7, 6, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 2, 1, 6, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 2, 1, 6, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of right-hand gate door",
|
||||
"from": [ 10, 3, 7 ],
|
||||
"to": [ 14, 6, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 10, 7, 14, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 10, 7, 14, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of right-hand gate door",
|
||||
"from": [ 10, 9, 7 ],
|
||||
"to": [ 14, 12, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 10, 7, 14, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 10, 1, 14, 4 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 10, 1, 14, 4 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"ambientocclusion": true,
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "__comment": "Left-hand post",
|
||||
"from": [ 0, 2, 7 ],
|
||||
"to": [ 2, 13, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 7, 2, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 0, 2, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Right-hand post",
|
||||
"from": [ 14, 2, 7 ],
|
||||
"to": [ 16, 13, 9 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 7, 16, 9 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 0, 16, 11 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 7, 0, 9, 11 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of left-hand gate door",
|
||||
"from": [ 0, 3, 13 ],
|
||||
"to": [ 2, 12, 15 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 13, 2, 15 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 1, 2, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 1, 2, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Inner vertical post of right-hand gate door",
|
||||
"from": [ 14, 3, 13 ],
|
||||
"to": [ 16, 12, 15 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 13, 16, 15 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 14, 1, 16, 10 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 14, 1, 16, 10 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 0, 3, 9 ],
|
||||
"to": [ 2, 6, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 0, 9, 9 ],
|
||||
"to": [ 2, 12, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 9, 2, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Lower horizontal bar of left-hand gate door",
|
||||
"from": [ 14, 3, 9 ],
|
||||
"to": [ 16, 6, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 7, 15, 10 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{ "__comment": "Upper horizontal bar of left-hand gate door",
|
||||
"from": [ 14, 9, 9 ],
|
||||
"to": [ 16, 12, 13 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 14, 9, 16, 13 ], "texture": "#texture" },
|
||||
"west": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" },
|
||||
"east": { "uv": [ 13, 1, 15, 4 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{ "parent": "block/thin_block",
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 3, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "down" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||
"north": { "uv": [ 0, 16, 16, 13 ], "texture": "#texture", "cullface": "north" },
|
||||
"south": { "uv": [ 0, 16, 16, 13 ], "texture": "#texture", "cullface": "south" },
|
||||
"west": { "uv": [ 0, 16, 16, 13 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 0, 16, 16, 13 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"textures": {
|
||||
"particle": "#texture"
|
||||
},
|
||||
"elements": [
|
||||
{ "from": [ 0, 0, 13 ],
|
||||
"to": [ 16, 16, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 13, 16, 16 ], "texture": "#texture", "cullface": "down" },
|
||||
"up": { "uv": [ 0, 16, 16, 13 ], "texture": "#texture", "cullface": "up" },
|
||||
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "cullface": "south" },
|
||||
"west": { "uv": [ 16, 0, 13, 16 ], "texture": "#texture", "cullface": "west" },
|
||||
"east": { "uv": [ 13, 0, 16, 16 ], "texture": "#texture", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,121 +2,134 @@ package com.straice.smoothdoors.client.ui;
|
||||
|
||||
import com.straice.smoothdoors.config.SddConfig;
|
||||
import com.straice.smoothdoors.config.SddConfigManager;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.Element;
|
||||
import net.minecraft.client.gui.Selectable;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.gui.widget.ClickableWidget;
|
||||
import net.minecraft.client.gui.widget.ElementListWidget;
|
||||
import net.minecraft.client.gui.widget.SliderWidget;
|
||||
import net.minecraft.client.gui.widget.ThreePartsLayoutWidget;
|
||||
import net.minecraft.screen.ScreenTexts;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class SddConfigScreen extends Screen {
|
||||
private static final int ITEM_HEIGHT = 24;
|
||||
private static final int ROW_WIDTH = 310;
|
||||
private static final int COLUMN_WIDTH = 150;
|
||||
private static final int COLUMN_GAP = 10;
|
||||
|
||||
private final Screen parent;
|
||||
private final SddConfig cfg;
|
||||
private final ThreePartsLayoutWidget layout = new ThreePartsLayoutWidget(this);
|
||||
private SettingsList list;
|
||||
|
||||
public SddConfigScreen(Screen parent) {
|
||||
super(Text.literal("Smooth Double Doors"));
|
||||
super(Text.literal("Smooth Double Doors Settings"));
|
||||
this.parent = parent;
|
||||
this.cfg = SddConfigManager.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
int centerX = this.width / 2;
|
||||
initHeader();
|
||||
initBody();
|
||||
initFooter();
|
||||
|
||||
int colW = 118;
|
||||
int gap = 4;
|
||||
int leftX = centerX - colW - gap;
|
||||
int rightX = centerX + gap;
|
||||
|
||||
int y = this.height / 4;
|
||||
int h = 20;
|
||||
|
||||
// ===== DOUBLE SYNC (2 columns) =====
|
||||
|
||||
// Doors row
|
||||
addDrawableChild(toggle(leftX, y, colW, h,
|
||||
() -> "Doors | Use: " + (cfg.connectDoors ? "ON" : "OFF"),
|
||||
() -> cfg.connectDoors = !cfg.connectDoors));
|
||||
|
||||
addDrawableChild(toggle(rightX, y, colW, h,
|
||||
() -> "Doors | Redstone: " + (cfg.redstoneDoubleDoors ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleDoors = !cfg.redstoneDoubleDoors));
|
||||
|
||||
y += 24;
|
||||
|
||||
// Trapdoors row
|
||||
addDrawableChild(toggle(leftX, y, colW, h,
|
||||
() -> "Traps | Use: " + (cfg.connectTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.connectTrapdoors = !cfg.connectTrapdoors));
|
||||
|
||||
addDrawableChild(toggle(rightX, y, colW, h,
|
||||
() -> "Traps | Redstone: " + (cfg.redstoneDoubleTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleTrapdoors = !cfg.redstoneDoubleTrapdoors));
|
||||
|
||||
y += 24;
|
||||
|
||||
// Fence gates row
|
||||
addDrawableChild(toggle(leftX, y, colW, h,
|
||||
() -> "Gates | Use: " + (cfg.connectFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.connectFenceGates = !cfg.connectFenceGates));
|
||||
|
||||
addDrawableChild(toggle(rightX, y, colW, h,
|
||||
() -> "Gates | Redstone: " + (cfg.redstoneDoubleFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleFenceGates = !cfg.redstoneDoubleFenceGates));
|
||||
|
||||
y += 34;
|
||||
|
||||
// ===== ANIMATIONS =====
|
||||
addDrawableChild(toggle(centerX - 120, y, 240, h,
|
||||
() -> "Animation Doors: " + (cfg.animateDoors ? "ON" : "OFF"),
|
||||
() -> cfg.animateDoors = !cfg.animateDoors));
|
||||
y += 24;
|
||||
|
||||
addDrawableChild(toggle(centerX - 120, y, 240, h,
|
||||
() -> "Animation Traps: " + (cfg.animateTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.animateTrapdoors = !cfg.animateTrapdoors));
|
||||
y += 24;
|
||||
|
||||
addDrawableChild(toggle(centerX - 120, y, 240, h,
|
||||
() -> "Animation Gates: " + (cfg.animateFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.animateFenceGates = !cfg.animateFenceGates));
|
||||
y += 34;
|
||||
|
||||
// ===== SPEED =====
|
||||
addDrawableChild(new SpeedSlider(centerX - 120, y, 240, h,
|
||||
"Speed Doors", cfg.doorSpeed, v -> {
|
||||
cfg.doorSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}));
|
||||
y += 24;
|
||||
|
||||
addDrawableChild(new SpeedSlider(centerX - 120, y, 240, h,
|
||||
"Speed Traps", cfg.trapdoorSpeed, v -> {
|
||||
cfg.trapdoorSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}));
|
||||
y += 24;
|
||||
|
||||
addDrawableChild(new SpeedSlider(centerX - 120, y, 240, h,
|
||||
"Speed Gates", cfg.fenceGateSpeed, v -> {
|
||||
cfg.fenceGateSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}));
|
||||
y += 40;
|
||||
|
||||
addDrawableChild(ButtonWidget.builder(Text.literal("Done"), btn -> {
|
||||
SddConfigManager.save();
|
||||
if (this.client != null) this.client.setScreen(parent);
|
||||
}).dimensions(centerX - 120, y, 240, h).build());
|
||||
layout.forEachChild(this::addDrawableChild);
|
||||
refreshWidgetPositions();
|
||||
}
|
||||
|
||||
private ButtonWidget toggle(int x, int y, int w, int h, java.util.function.Supplier<String> label,
|
||||
Runnable action) {
|
||||
return ButtonWidget.builder(Text.literal(label.get()), btn -> {
|
||||
action.run();
|
||||
btn.setMessage(Text.literal(label.get()));
|
||||
private void initHeader() {
|
||||
layout.addHeader(this.title, this.textRenderer);
|
||||
}
|
||||
|
||||
private void initBody() {
|
||||
if (this.client == null) return;
|
||||
list = layout.addBody(new SettingsList(this.client, this.width, layout));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(COLUMN_WIDTH, () -> "Doors | Use: " + (cfg.connectDoors ? "ON" : "OFF"),
|
||||
() -> cfg.connectDoors = !cfg.connectDoors),
|
||||
toggle(COLUMN_WIDTH, () -> "Doors | Redstone: " + (cfg.redstoneDoubleDoors ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleDoors = !cfg.redstoneDoubleDoors)
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(COLUMN_WIDTH, () -> "Traps | Use: " + (cfg.connectTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.connectTrapdoors = !cfg.connectTrapdoors),
|
||||
toggle(COLUMN_WIDTH, () -> "Traps | Redstone: " + (cfg.redstoneDoubleTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleTrapdoors = !cfg.redstoneDoubleTrapdoors)
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(COLUMN_WIDTH, () -> "Gates | Use: " + (cfg.connectFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.connectFenceGates = !cfg.connectFenceGates),
|
||||
toggle(COLUMN_WIDTH, () -> "Gates | Redstone: " + (cfg.redstoneDoubleFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.redstoneDoubleFenceGates = !cfg.redstoneDoubleFenceGates)
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(ROW_WIDTH, () -> "Animation Doors: " + (cfg.animateDoors ? "ON" : "OFF"),
|
||||
() -> cfg.animateDoors = !cfg.animateDoors),
|
||||
null
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(ROW_WIDTH, () -> "Animation Traps: " + (cfg.animateTrapdoors ? "ON" : "OFF"),
|
||||
() -> cfg.animateTrapdoors = !cfg.animateTrapdoors),
|
||||
null
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
toggle(ROW_WIDTH, () -> "Animation Gates: " + (cfg.animateFenceGates ? "ON" : "OFF"),
|
||||
() -> cfg.animateFenceGates = !cfg.animateFenceGates),
|
||||
null
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
new SpeedSlider(ROW_WIDTH, "Speed Doors", cfg.doorSpeed, v -> {
|
||||
cfg.doorSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}),
|
||||
null
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
new SpeedSlider(ROW_WIDTH, "Speed Traps", cfg.trapdoorSpeed, v -> {
|
||||
cfg.trapdoorSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}),
|
||||
null
|
||||
));
|
||||
|
||||
list.addEntry(new SettingsEntry(
|
||||
new SpeedSlider(ROW_WIDTH, "Speed Gates", cfg.fenceGateSpeed, v -> {
|
||||
cfg.fenceGateSpeed = v;
|
||||
SddConfigManager.save();
|
||||
}),
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
private void initFooter() {
|
||||
layout.addFooter(ButtonWidget.builder(ScreenTexts.DONE, btn -> {
|
||||
SddConfigManager.save();
|
||||
}).dimensions(x, y, w, h).build();
|
||||
if (this.client != null) this.client.setScreen(parent);
|
||||
}).width(200).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void refreshWidgetPositions() {
|
||||
layout.refreshPositions();
|
||||
if (list != null) {
|
||||
list.position(this.width, layout);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,6 +138,73 @@ public class SddConfigScreen extends Screen {
|
||||
if (this.client != null) this.client.setScreen(parent);
|
||||
}
|
||||
|
||||
private ButtonWidget toggle(int width, java.util.function.Supplier<String> label, Runnable action) {
|
||||
return ButtonWidget.builder(Text.literal(label.get()), btn -> {
|
||||
action.run();
|
||||
btn.setMessage(Text.literal(label.get()));
|
||||
SddConfigManager.save();
|
||||
}).dimensions(0, 0, width, 20).build();
|
||||
}
|
||||
|
||||
private static final class SettingsList extends ElementListWidget<SettingsEntry> {
|
||||
SettingsList(MinecraftClient client, int width, ThreePartsLayoutWidget layout) {
|
||||
super(client, width, layout.getContentHeight(), layout.getHeaderHeight(), ITEM_HEIGHT);
|
||||
this.centerListVertically = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addEntry(SettingsEntry entry) {
|
||||
return super.addEntry(entry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowWidth() {
|
||||
return ROW_WIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
private static final class SettingsEntry extends ElementListWidget.Entry<SettingsEntry> {
|
||||
private final ClickableWidget left;
|
||||
private final ClickableWidget right;
|
||||
private final List<ClickableWidget> widgets;
|
||||
|
||||
SettingsEntry(ClickableWidget left, ClickableWidget right) {
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
this.widgets = (right == null) ? List.of(left) : List.of(left, right);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(DrawContext context, int index, int y, int x, int entryWidth, int entryHeight,
|
||||
int mouseX, int mouseY, boolean hovered, float delta) {
|
||||
if (right == null) {
|
||||
left.setX(x);
|
||||
left.setY(y);
|
||||
left.render(context, mouseX, mouseY, delta);
|
||||
return;
|
||||
}
|
||||
|
||||
int leftX = x;
|
||||
int rightX = x + COLUMN_WIDTH + COLUMN_GAP;
|
||||
left.setX(leftX);
|
||||
left.setY(y);
|
||||
right.setX(rightX);
|
||||
right.setY(y);
|
||||
left.render(context, mouseX, mouseY, delta);
|
||||
right.render(context, mouseX, mouseY, delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Element> children() {
|
||||
return widgets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Selectable> selectableChildren() {
|
||||
return widgets;
|
||||
}
|
||||
}
|
||||
|
||||
private static class SpeedSlider extends SliderWidget {
|
||||
private final String label;
|
||||
private final java.util.function.Consumer<Float> onApply;
|
||||
@@ -137,9 +217,9 @@ public class SddConfigScreen extends Screen {
|
||||
return v;
|
||||
}
|
||||
|
||||
SpeedSlider(int x, int y, int w, int h, String label, float speed,
|
||||
SpeedSlider(int width, String label, float speed,
|
||||
java.util.function.Consumer<Float> onApply) {
|
||||
super(x, y, w, h, Text.literal(label), toValue(speed));
|
||||
super(0, 0, width, 20, Text.literal(label), toValue(speed));
|
||||
this.label = label;
|
||||
this.onApply = onApply;
|
||||
updateMessage();
|
||||
@@ -156,4 +236,4 @@ public class SddConfigScreen extends Screen {
|
||||
onApply.accept(toSpeed(this.value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ public class SddConfig {
|
||||
public boolean redstoneDoubleDoors = true;
|
||||
|
||||
public boolean connectTrapdoors = false;
|
||||
public boolean redstoneDoubleTrapdoors = true;
|
||||
public boolean redstoneDoubleTrapdoors = false;
|
||||
|
||||
public boolean connectFenceGates = true;
|
||||
public boolean redstoneDoubleFenceGates = true;
|
||||
public boolean connectFenceGates = false;
|
||||
public boolean redstoneDoubleFenceGates = false;
|
||||
|
||||
public boolean animateDoors = true;
|
||||
public boolean animateTrapdoors = true;
|
||||
|
||||
Reference in New Issue
Block a user