Skip to content

Commit

Permalink
Optimizations for some block models (#2508)
Browse files Browse the repository at this point in the history
Co-authored-by: muzikbike <[email protected]>
  • Loading branch information
jellysquid3 and muzikbike committed Oct 26, 2024
1 parent 6afecee commit d3aed21
Show file tree
Hide file tree
Showing 28 changed files with 2,155 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
These block models are based on the original game's assets, but with various optimizations applied to reduce
the number of vertices.

The texture mapping of these block models is identical to the originals, so that resource packs which replace the
textures of blocks will not look any different.

If you are a resource pack author and find that your models or textures no longer work correctly with these changes,
please let us know.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parent": "minecraft:block/block",
"textures": {
"particle": "block/glass",
"glass": "block/glass",
"beacon": "block/beacon",
"obsidian": "block/obsidian"
},
"elements": [
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "north" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "east" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "south" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "west" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "up" },
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#glass", "cullface": "down" }
}
},
{
"from": [ 2, 0.1, 2 ],
"to": [ 14, 3, 14 ],
"faces": {
"north": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
"east": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
"south": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
"west": { "uv": [ 2, 13, 14, 16 ], "texture": "#obsidian" },
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#obsidian" },
"down": { "uv": [ 2, 2, 14, 14 ], "texture": "#obsidian", "cullface": "down" }
}
},
{
"from": [ 3, 3, 3 ],
"to": [ 13, 14, 13 ],
"faces": {
"north": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
"east": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
"south": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
"west": { "uv": [ 3, 2, 13, 13 ], "texture": "#beacon" },
"up": { "uv": [ 3, 3, 13, 13 ], "texture": "#beacon" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"parent": "minecraft:block/block",
"textures": {
"rim": "block/composter_top",
"particle": "block/composter_side",
"outside": "block/composter_side",
"inside": "block/composter_bottom"
},
"elements": [
{
"from": [ 0, 0, 0 ],
"to": [ 16, 16, 16 ],
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#outside", "cullface": "north" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#outside", "cullface": "east" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#outside", "cullface": "south" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#outside", "cullface": "west" },
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#inside", "cullface": "down" }
}
},
{
"from": [ 0, 16, 0 ],
"to": [ 14, 16, 2 ],
"faces": {
"up": { "uv": [ 0, 0, 14, 2 ], "texture": "#rim", "cullface": "up" }
}
},
{
"from": [ 14, 16, 0 ],
"to": [ 16, 16, 14 ],
"faces": {
"up": { "uv": [ 14, 0, 16, 14 ], "texture": "#rim", "cullface": "up" }
}
},
{
"from": [ 2, 16, 14 ],
"to": [ 16, 16, 16 ],
"faces": {
"up": { "uv": [ 2, 14, 16, 16 ], "texture": "#rim", "cullface": "up" }
}
},
{
"from": [ 0, 16, 2 ],
"to": [ 2, 16, 16 ],
"faces": {
"up": { "uv": [ 0, 2, 2, 16 ], "texture": "#rim", "cullface": "up" }
}
},
{
"from": [ 2, 2, 2 ],
"to": [ 14, 16, 2 ],
"faces": {
"south": { "uv": [ 2, 0, 14, 14 ], "texture": "#outside" }
}
},
{
"from": [ 14, 2, 2 ],
"to": [ 14, 16, 14 ],
"faces": {
"west": { "uv": [ 2, 0, 14, 14 ], "texture": "#outside" }
}
},
{
"from": [ 2, 2, 14 ],
"to": [ 14, 16, 14 ],
"faces": {
"north": { "uv": [ 2, 0, 14, 14 ], "texture": "#outside" }
}
},
{
"from": [ 2, 2, 2 ],
"to": [ 2, 16, 14 ],
"faces": {
"east": { "uv": [ 2, 0, 14, 14 ], "texture": "#outside" }
}
},
{
"from": [ 2, 2, 2 ],
"to": [ 14, 2, 14 ],
"faces": {
"up": { "uv": [ 2, 2, 14, 14 ], "texture": "#inside" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"ambientocclusion": false,
"textures": {
"particle": "block/flower_pot",
"flowerpot": "block/flower_pot",
"dirt": "block/dirt"
},
"elements": [
{
"from": [ 5, 0, 5 ],
"to": [ 11, 6, 11 ],
"faces": {
"north": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"east": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"south": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"west": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" }
}
},
{
"from": [ 5, 0, 5 ],
"to": [ 10, 6, 6 ],
"faces": {
"up": { "uv": [ 5, 5, 10, 6 ], "texture": "#flowerpot" },
"down": { "uv": [ 5, 10, 10, 11 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 10, 0, 5 ],
"to": [ 11, 6, 10 ],
"faces": {
"up": { "uv": [ 10, 5, 11, 10 ], "texture": "#flowerpot" },
"down": { "uv": [ 10, 6, 11, 11 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 6, 0, 10 ],
"to": [ 11, 6, 11 ],
"faces": {
"up": { "uv": [ 6, 10, 11, 11 ], "texture": "#flowerpot" },
"down": { "uv": [ 6, 5, 11, 6 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 5, 0, 6 ],
"to": [ 6, 6, 11 ],
"faces": {
"up": { "uv": [ 5, 6, 6, 11 ], "texture": "#flowerpot" },
"down": { "uv": [ 5, 5, 6, 10 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 6, 4, 6 ],
"to": [ 10, 6, 6 ],
"faces": {
"south": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 10, 4, 6 ],
"to": [ 10, 6, 10 ],
"faces": {
"west": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 4, 10 ],
"to": [ 10, 6, 10 ],
"faces": {
"north": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 4, 6 ],
"to": [ 6, 6, 10 ],
"faces": {
"east": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 0, 6 ],
"to": [ 10, 4, 10 ],
"faces": {
"up": { "uv": [ 6, 6, 10, 10 ], "texture": "#dirt" },
"down": { "uv": [ 6, 12, 10, 16 ], "texture": "#flowerpot", "cullface": "down" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"ambientocclusion": false,
"textures": {
"particle": "block/flower_pot",
"flowerpot": "block/flower_pot",
"dirt": "block/dirt"
},
"elements": [
{
"from": [ 5, 0, 5 ],
"to": [ 11, 6, 11 ],
"faces": {
"north": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"east": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"south": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" },
"west": { "uv": [ 5, 10, 11, 16 ], "texture": "#flowerpot" }
}
},
{
"from": [ 5, 0, 5 ],
"to": [ 10, 6, 6 ],
"faces": {
"up": { "uv": [ 5, 5, 10, 6 ], "texture": "#flowerpot" },
"down": { "uv": [ 5, 10, 10, 11 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 10, 0, 5 ],
"to": [ 11, 6, 10 ],
"faces": {
"up": { "uv": [ 10, 5, 11, 10 ], "texture": "#flowerpot" },
"down": { "uv": [ 10, 6, 11, 11 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 6, 0, 10 ],
"to": [ 11, 6, 11 ],
"faces": {
"up": { "uv": [ 6, 10, 11, 11 ], "texture": "#flowerpot" },
"down": { "uv": [ 6, 5, 11, 6 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 5, 0, 6 ],
"to": [ 6, 6, 11 ],
"faces": {
"up": { "uv": [ 5, 6, 6, 11 ], "texture": "#flowerpot" },
"down": { "uv": [ 5, 5, 6, 10 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 6, 4, 6 ],
"to": [ 10, 6, 6 ],
"faces": {
"south": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 10, 4, 6 ],
"to": [ 10, 6, 10 ],
"faces": {
"west": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 4, 10 ],
"to": [ 10, 6, 10 ],
"faces": {
"north": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 4, 6 ],
"to": [ 6, 6, 10 ],
"faces": {
"east": { "uv": [ 6, 10, 10, 12 ], "texture": "#flowerpot" }
}
},
{
"from": [ 6, 0, 6 ],
"to": [ 10, 4, 10 ],
"faces": {
"up": { "uv": [ 6, 6, 10, 10 ], "texture": "#dirt" },
"down": { "uv": [ 6, 12, 10, 16 ], "texture": "#flowerpot", "cullface": "down" }
}
},
{
"from": [ 8, 4, 2.6 ],
"to": [ 8, 16, 13.4 ],
"shade": false,
"rotation": { "angle": 45, "axis": "y", "origin": [ 8, 8, 8 ], "rescale": true },
"faces": {
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" }
}
},
{
"from": [ 8, 4, 2.6 ],
"to": [ 8, 16, 13.4 ],
"shade": false,
"rotation": { "angle": -45, "axis": "y", "origin": [ 8, 8, 8 ], "rescale": true },
"faces": {
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" },
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#plant" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"textures": {
"particle": "block/heavy_core",
"all": "block/heavy_core"
},
"elements": [
{
"from": [ 4, 0, 4 ],
"to": [ 12, 8, 12 ],
"faces": {
"north": { "uv": [ 0, 8, 8, 16 ], "texture": "#all" },
"east": { "uv": [ 0, 8, 8, 16 ], "texture": "#all" },
"south": { "uv": [ 0, 8, 8, 16 ], "texture": "#all" },
"west": { "uv": [ 0, 8, 8, 16 ], "texture": "#all" },
"up": { "uv": [ 0, 0, 8, 8 ], "texture": "#all" },
"down": { "uv": [ 8, 0, 16, 8 ], "texture": "#all", "cullface": "down" }
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [ 45, 45, 0 ],
"translation": [ 0, 3, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
},
"ground": {
"translation": [ 0, 3, 0 ],
"scale": [ 0.5, 0.5, 0.5 ]
},
"gui": {
"rotation": [ 30, 225, 0 ],
"translation": [ 0, 3, 0 ]
},
"fixed": {
"rotation": [ 0, 180, 0 ],
"translation": [ 0, 4, 0 ]
}
}
}
Loading

0 comments on commit d3aed21

Please sign in to comment.