Skip to content

Commit 7099345

Browse files
committed
Fix horse armor texture handling and update updateJSONURL in configuration
1 parent 05c47d2 commit 7099345

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ StartupEvents.registry("item", (event) => {
2020
event.create("test_paxel", "paxel");
2121

2222
// Below this point are currently have broken textures
23-
event.create("test_horse_armor", "horse_armor").material("gold");
24-
//.armorTexture("minecraft:item/diamond_horse_armor");
25-
event.create("test_wolf_armor", "wolf_armor").material("gold");
2623
event.create("test_bow", "bow");
2724
event.create("test_crossbow", "crossbow");
2825
event.create("fishing_rod", "fishing_rod");
@@ -40,6 +37,19 @@ StartupEvents.registry("item", (event) => {
4037
```
4138
![img.png](.github/assets/img.png)
4239

40+
An example of horse armor with the diamond item texture and armor texture.
41+
```js
42+
StartupEvents.registry("item", (event) => {
43+
event
44+
.create("test_horse_armor", "horse_armor")
45+
.material("diamond")
46+
.armorTexture(
47+
"minecraft:textures/entity/horse/armor/horse_armor_diamond"
48+
)
49+
.texture("minecraft:item/diamond_horse_armor");
50+
});
51+
52+
```
4353
### To Do
4454
Fix Bow, Crossbow, and Fishing Rod textures in different states.
4555

src/main/kotlin/dev/bluemethyst/mods/toolsjs/kubejs/builders/HorseArmorBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class HorseArmorBuilder(i: ResourceLocation?) : ItemBuilder(i) {
2121

2222
@Info(value = "The texture you want to use for the horse armor")
2323
fun armorTexture(texture: ResourceLocation): HorseArmorBuilder {
24-
this.texture = texture
24+
this.texture = ResourceLocation.parse("$texture.png")
2525
return this
2626
}
2727

src/main/templates/META-INF/neoforge.mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ version="${mod_version}" #mandatory
2828
displayName="${mod_name}" #mandatory
2929

3030
# A URL to query for updates for this mod. See the JSON update specification https://docs.neoforged.net/docs/misc/updatechecker/
31-
updateJSONURL="https://github.com/Bluemethyst/ToolsJS/blob/1.21.1/update.json" #optional
31+
updateJSONURL="https://raw.githubusercontent.com/Bluemethyst/ToolsJS/refs/heads/1.21.1/update.json" #optional
3232

3333
# A URL for the "homepage" for this mod, displayed in the mod UI
3434
displayURL="https://modrinth.com/mods/toolsjs/" #optional

0 commit comments

Comments
 (0)