Skip to content

Commit

Permalink
3d tintable sword
Browse files Browse the repository at this point in the history
  • Loading branch information
29cmb committed Nov 30, 2024
1 parent 08126a2 commit 9783b80
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 0 deletions.
109 changes: 109 additions & 0 deletions assets/cmbminigames/models/cosmetic/swords/generic_sword.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"0": "cmbminigames:block/cosmetic/swords/generic/texture",
"particle": "cmbminigames:block/cosmetic/swords/generic/texture"
},
"elements": [
{
"from": [7, 0, 7],
"to": [9, 2, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 7]},
"faces": {
"north": {"uv": [7, 5, 8, 6], "texture": "#0", "tintindex": 0},
"east": {"uv": [7, 6, 8, 7], "texture": "#0", "tintindex": 0},
"south": {"uv": [7, 7, 8, 8], "texture": "#0", "tintindex": 0},
"west": {"uv": [0, 8, 1, 9], "texture": "#0", "tintindex": 0},
"up": {"uv": [9, 1, 8, 0], "texture": "#0", "tintindex": 0},
"down": {"uv": [2, 8, 1, 9], "texture": "#0", "tintindex": 0}
}
},
{
"from": [7.5, 1, 7.5],
"to": [8.5, 7, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 7]},
"faces": {
"north": {"uv": [6, 2, 6.5, 5.5], "texture": "#0"},
"east": {"uv": [6, 5.5, 6.5, 9], "texture": "#0"},
"south": {"uv": [6.5, 2, 7, 5.5], "texture": "#0"},
"west": {"uv": [6.5, 5.5, 7, 9], "texture": "#0"},
"up": {"uv": [9.5, 0.5, 9, 0], "texture": "#0"},
"down": {"uv": [9.5, 0.5, 9, 1], "texture": "#0"}
}
},
{
"from": [7, 6, 5],
"to": [9, 8, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 6, 7]},
"faces": {
"north": {"uv": [8, 1, 9, 2], "texture": "#0"},
"east": {"uv": [5, 0, 8, 1], "texture": "#0", "tintindex": 0},
"south": {"uv": [2, 8, 3, 9], "texture": "#0"},
"west": {"uv": [5, 1, 8, 2], "texture": "#0", "tintindex": 0},
"up": {"uv": [6, 5, 5, 2], "texture": "#0", "tintindex": 0},
"down": {"uv": [6, 5, 5, 8], "texture": "#0", "tintindex": 0}
}
},
{
"from": [7, 7.5, 3.25],
"to": [9, 9.5, 5.25],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 7.5, 1.25]},
"faces": {
"north": {"uv": [8, 2, 9, 3], "texture": "#0", "tintindex": 0},
"east": {"uv": [3, 8, 4, 9], "texture": "#0", "tintindex": 0},
"south": {"uv": [8, 3, 9, 4], "texture": "#0"},
"west": {"uv": [4, 8, 5, 9], "texture": "#0", "tintindex": 0},
"up": {"uv": [9, 5, 8, 4], "texture": "#0", "tintindex": 0},
"down": {"uv": [6, 8, 5, 9], "texture": "#0", "tintindex": 0}
}
},
{
"from": [7, 5.65, 11.05],
"to": [9, 7.65, 13.05],
"rotation": {"angle": -22.5, "axis": "x", "origin": [7, 5.65, 10.05]},
"faces": {
"north": {"uv": [8, 5, 9, 6], "texture": "#0"},
"east": {"uv": [8, 6, 9, 7], "texture": "#0", "tintindex": 0},
"south": {"uv": [7, 8, 8, 9], "texture": "#0", "tintindex": 0},
"west": {"uv": [8, 7, 9, 8], "texture": "#0", "tintindex": 0},
"up": {"uv": [9, 9, 8, 8], "texture": "#0", "tintindex": 0},
"down": {"uv": [1, 9, 0, 10], "texture": "#0", "tintindex": 0}
}
},
{
"from": [7.45, 7, 6.5],
"to": [8.45, 23, 9.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7.45, 7, 6.5]},
"faces": {
"north": {"uv": [3, 0, 3.75, 8], "texture": "#0", "tintindex": 0},
"east": {"uv": [0, 0, 1.5, 8], "texture": "#0", "tintindex": 0},
"south": {"uv": [4, 0, 4.75, 8], "texture": "#0", "tintindex": 0},
"west": {"uv": [1.5, 0, 3, 8], "texture": "#0", "tintindex": 0},
"up": {"uv": [7.75, 3.5, 7, 2], "texture": "#0"},
"down": {"uv": [7.75, 3.5, 7, 5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [0, 2.25, 0]
},
"thirdperson_lefthand": {
"translation": [0, 2.5, 0]
},
"firstperson_righthand": {
"translation": [1, 2, 0],
"scale": [0.7, 0.7, 0.7]
},
"firstperson_lefthand": {
"translation": [0, 2.5, 0],
"scale": [0.7, 0.7, 0.7]
},
"gui": {
"rotation": [90, 46.5, -90],
"translation": [-1.25, -1.75, 0],
"scale": [0.7, 0.7, 0.7]
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions assets/minecraft/models/item/diamond_sword.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "minecraft:item/diamond_sword"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "cmbminigames:cosmetic/swords/generic_sword"
}
]
}

0 comments on commit 9783b80

Please sign in to comment.