Skip to content

Commit

Permalink
Support animated textures
Browse files Browse the repository at this point in the history
- Just uses the legacy model in these cases
- Add automatic resource extraction from mods
  • Loading branch information
Motschen committed Dec 10, 2024
1 parent 9d25b72 commit e92e8e9
Show file tree
Hide file tree
Showing 17 changed files with 1,698 additions and 2 deletions.
Binary file modified Better-Leaves-Lite-1.0.zip
Binary file not shown.
196 changes: 196 additions & 0 deletions assets/betterleaves/models/block/leaves_legacy1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"credit": "made by Motschen",
"parent": "block/block",
"textures": {
"0": "block/oak_leaves",
"particle": "#0"
},
"elements": [
{
"name": "normal_block",
"from": [0, 0, 0],
"to": [16, 16, 16],
"shade": false,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "north", "tintindex": 0},
"east": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "east", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "south", "tintindex": 0},
"west": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "west", "tintindex": 0},
"up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up", "tintindex": 0},
"down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down", "tintindex": 0}
}
},
{
"from": [2.4, -6, 5.2],
"to": [20.4, -3, 5.21],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [2, 3, -2]},
"faces": {
"north": {"uv": [0, 8, 16, 11], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 1, 16, 4], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [2.4, 20, 5.2],
"to": [20.4, 23, 5.21],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [2, 25, -2]},
"faces": {
"north": {"uv": [0, 3.05, 16, 5.95], "texture": "#0", "tintindex": 0, "cullface": "up"},
"south": {"uv": [0, 3.05, 16, 5.95], "texture": "#0", "tintindex": 0, "cullface": "up"}
}
},
{
"from": [22.4, -1, 9.3],
"to": [25.4, 18, 9.31],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [12, 7, 2]},
"faces": {
"north": {"uv": [13, 0, 16, 16], "texture": "#0", "tintindex": 0, "cullface": "east"},
"south": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0, "cullface": "east"}
}
},
{
"from": [-2.6, -1, 0.5],
"to": [0.4, 18, 0.51],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [-9, 7, -7]},
"faces": {
"north": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0, "cullface": "west"},
"south": {"uv": [0, 0, 3, 16], "texture": "#0", "tintindex": 0, "cullface": "west"}
}
},
{
"from": [7, 4, 7.99],
"to": [23, 20, 8],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [9, 7, 0]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [7, -3, 7.99],
"to": [23, 4, 8],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [9, 0, 0]},
"faces": {
"north": {"uv": [0, 0, 16, 7], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 16, 7], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-1, -3, 7.99],
"to": [7, 4, 8],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [9, 0, 0]},
"faces": {
"north": {"uv": [0, 0, 8, 7], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 8, 7], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-1, 4, 7.99],
"to": [7, 20, 8],
"shade": false,
"rotation": {"angle": -22.5, "axis": "y", "origin": [9, 7, 0]},
"faces": {
"north": {"uv": [0.05, 0, 7.95, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 8, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [-5, -7, 16.6],
"to": [14, -4, 16.61],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-5, 4, 8]},
"faces": {
"north": {"uv": [0, 12, 16, 15], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 7, 16, 10], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.6, 21, 17],
"to": [13.4, 23, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 9, 7]},
"faces": {
"north": {"uv": [0, 14.05, 16, 15.95], "texture": "#0", "tintindex": 0, "cullface": "up"},
"south": {"uv": [0, 14.05, 16, 15.95], "texture": "#0", "tintindex": 0, "cullface": "up"}
}
},
{
"from": [16, -2, 17],
"to": [20, 19, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 4, 7]},
"faces": {
"north": {"uv": [0, 0, 4, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [9.05, 0, 12.95, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [-5.85, -2, 16.25],
"to": [-2.85, 19, 16.26],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-2, 4, 14]},
"faces": {
"north": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [13, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [0, 5, 17],
"to": [16, 21, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 4, 7]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [0, -4, 17],
"to": [16, 5, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, -5, 7]},
"faces": {
"north": {"uv": [0, 0, 16, 9], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 16, 9], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.675, -4, 25],
"to": [3.325, 5, 25.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-14, -5, 15]},
"faces": {
"north": {"uv": [7, 7, 16, 16], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [7, 7, 16, 16], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.675, 5, 25],
"to": [3.325, 21, 25.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-14, 4, 15]},
"faces": {
"north": {"uv": [0, 0, 10, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [7, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
}
],
"groups": [0,
{
"name": "bushy_leaves",
"origin": [8, 8, 8],
"children": [1, 2, 3, 4, 5, 6, 7, 8]
},
{
"name": "bushy_leaves2",
"origin": [8, 8, 8],
"children": [9, 10, 11, 12, 13, 14, 15, 16]
}
]
}
196 changes: 196 additions & 0 deletions assets/betterleaves/models/block/leaves_legacy2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
"credit": "made by Motschen",
"parent": "block/block",
"textures": {
"0": "block/oak_leaves",
"particle": "#0"
},
"elements": [
{
"name": "normal_block",
"from": [0, 0, 0],
"to": [16, 16, 16],
"shade": false,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "north", "tintindex": 0},
"east": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "east", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "south", "tintindex": 0},
"west": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "west", "tintindex": 0},
"up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up", "tintindex": 0},
"down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down", "tintindex": 0}
}
},
{
"from": [6.4, -6, 4.2],
"to": [24.4, -3, 4.21],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [6, 3, 0]},
"faces": {
"north": {"uv": [0, 8, 16, 11], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 1, 16, 4], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [6.4, 20, 4.4],
"to": [24.4, 23, 4.41],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [6, 25, 0]},
"faces": {
"north": {"uv": [0, 3.05, 16, 5.95], "texture": "#0", "tintindex": 0, "cullface": "up"},
"south": {"uv": [0, 3.05, 16, 5.95], "texture": "#0", "tintindex": 0, "cullface": "up"}
}
},
{
"from": [26.4, -1, 12.7],
"to": [29.4, 18, 12.71],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [16, 7, 4]},
"faces": {
"north": {"uv": [13, 0, 16, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [0.3, -1, -3.8],
"to": [3.3, 18, -3.79],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [-4, 7, -5]},
"faces": {
"north": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 3, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [11, 4, 9.99],
"to": [27, 20, 10],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [13, 7, 2]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [11, -3, 9.99],
"to": [27, 4, 10],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [13, 0, 2]},
"faces": {
"north": {"uv": [0, 0, 16, 7], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 16, 7], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [3, -3, 9.99],
"to": [11, 4, 10],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [13, 0, 2]},
"faces": {
"north": {"uv": [0, 0, 8, 7], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 8, 7], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [3, 4, 9.99],
"to": [11, 20, 10],
"shade": false,
"rotation": {"angle": -45, "axis": "y", "origin": [13, 7, 2]},
"faces": {
"north": {"uv": [0.05, 0, 7.95, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 8, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [-5, -7, 16.6],
"to": [14, -4, 16.61],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-5, 4, 8]},
"faces": {
"north": {"uv": [0, 12, 16, 15], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 7, 16, 10], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.6, 21, 17],
"to": [13.4, 23, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 9, 7]},
"faces": {
"north": {"uv": [0, 14.05, 16, 15.95], "texture": "#0", "tintindex": 0, "cullface": "up"},
"south": {"uv": [0, 14.05, 16, 15.95], "texture": "#0", "tintindex": 0, "cullface": "up"}
}
},
{
"from": [16, -2, 17],
"to": [20, 19, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 4, 7]},
"faces": {
"north": {"uv": [0, 0, 4, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [9.05, 0, 12.95, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [-5.85, -2, 16.25],
"to": [-2.85, 19, 16.26],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-2, 4, 14]},
"faces": {
"north": {"uv": [0.05, 0, 2.95, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [13, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [0, 5, 17],
"to": [16, 21, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, 4, 7]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [0, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
},
{
"from": [0, -4, 17],
"to": [16, 5, 17.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-6, -5, 7]},
"faces": {
"north": {"uv": [0, 0, 16, 9], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [0, 0, 16, 9], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.675, -4, 25],
"to": [3.325, 5, 25.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-14, -5, 15]},
"faces": {
"north": {"uv": [7, 7, 16, 16], "texture": "#0", "tintindex": 0, "cullface": "down"},
"south": {"uv": [7, 7, 16, 16], "texture": "#0", "tintindex": 0, "cullface": "down"}
}
},
{
"from": [-5.675, 5, 25],
"to": [3.325, 21, 25.01],
"shade": false,
"rotation": {"angle": 45, "axis": "y", "origin": [-14, 4, 15]},
"faces": {
"north": {"uv": [0, 0, 10, 16], "texture": "#0", "tintindex": 0},
"south": {"uv": [7, 0, 16, 16], "texture": "#0", "tintindex": 0}
}
}
],
"groups": [0,
{
"name": "bushy_leaves",
"origin": [8, 8, 8],
"children": [1, 2, 3, 4, 5, 6, 7, 8]
},
{
"name": "bushy_leaves2",
"origin": [8, 8, 8],
"children": [9, 10, 11, 12, 13, 14, 15, 16]
}
]
}
Loading

0 comments on commit e92e8e9

Please sign in to comment.