Skip to content

Commit 03c2a5e

Browse files
committed
Some fixes
1 parent c5b5a37 commit 03c2a5e

File tree

8 files changed

+387
-203
lines changed

8 files changed

+387
-203
lines changed

src/main/resources/datapack-1.12.x/mappings/generationsteps.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 128 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,147 @@
11
templates:
22
- template: armor.java.ftl
3-
name: "@SRCROOT/@BASEPACKAGEPATH/item/Item@NAME.java"
3+
name: "@SRCROOT/@BASEPACKAGEPATH/item/@NAMEItem.java"
4+
5+
# Helmet item model
46
- template: json/item.json.ftl
57
writer: json
6-
condition: enableHelmet
7-
deleteWhenConditionFalse: true
88
variables: "item=helmet"
9-
name: "@MODASSETSROOT/models/item/@registrynamehelmet.json"
9+
condition:
10+
- enableHelmet
11+
- "hasHelmetNormalModel()"
12+
name: "@MODASSETSROOT/models/item/@registryname_helmet.json"
13+
- template: json/tool.json.ftl
14+
writer: json
15+
variables: "item=helmet"
16+
condition:
17+
- enableHelmet
18+
- "hasHelmetToolModel()"
19+
name: "@MODASSETSROOT/models/item/@registryname_helmet.json"
20+
- template: json/item_cmodel.json.ftl
21+
writer: json
22+
variables: "item=helmet"
23+
condition:
24+
- enableHelmet
25+
- "helmetItemRenderType #= 1"
26+
name: "@MODASSETSROOT/models/item/@registryname_helmet.json"
27+
- template: json/item_cmodel_obj.json.ftl
28+
writer: json
29+
condition:
30+
- enableHelmet
31+
- "helmetItemRenderType #= 2"
32+
variables: "item=helmet"
33+
name: "@MODASSETSROOT/models/item/@registryname_helmet.json"
34+
35+
# Body item model
1036
- template: json/item.json.ftl
1137
writer: json
12-
condition: enableBody
13-
deleteWhenConditionFalse: true
1438
variables: "item=body"
15-
name: "@MODASSETSROOT/models/item/@registrynamebody.json"
39+
condition:
40+
- enableBody
41+
- "hasBodyNormalModel()"
42+
name: "@MODASSETSROOT/models/item/@registryname_chestplate.json"
43+
- template: json/tool.json.ftl
44+
writer: json
45+
variables: "item=body"
46+
condition:
47+
- enableBody
48+
- "hasBodyToolModel()"
49+
name: "@MODASSETSROOT/models/item/@registryname_chestplate.json"
50+
- template: json/item_cmodel.json.ftl
51+
writer: json
52+
variables: "item=body"
53+
condition:
54+
- enableBody
55+
- "bodyItemRenderType #= 1"
56+
name: "@MODASSETSROOT/models/item/@registryname_chestplate.json"
57+
- template: json/item_cmodel_obj.json.ftl
58+
writer: json
59+
condition:
60+
- enableBody
61+
- "bodyItemRenderType #= 2"
62+
variables: "item=body"
63+
name: "@MODASSETSROOT/models/item/@registryname_chestplate.json"
64+
65+
# Leggings item model
1666
- template: json/item.json.ftl
1767
writer: json
18-
condition: enableLeggings
19-
deleteWhenConditionFalse: true
2068
variables: "item=leggings"
21-
name: "@MODASSETSROOT/models/item/@registrynamelegs.json"
69+
condition:
70+
- enableLeggings
71+
- "hasLeggingsNormalModel()"
72+
name: "@MODASSETSROOT/models/item/@registryname_leggings.json"
73+
- template: json/tool.json.ftl
74+
writer: json
75+
variables: "item=leggings"
76+
condition:
77+
- enableLeggings
78+
- "hasLeggingsToolModel()"
79+
name: "@MODASSETSROOT/models/item/@registryname_leggings.json"
80+
- template: json/item_cmodel.json.ftl
81+
writer: json
82+
variables: "item=leggings"
83+
condition:
84+
- enableLeggings
85+
- "leggingsItemRenderType #= 1"
86+
name: "@MODASSETSROOT/models/item/@registryname_leggings.json"
87+
- template: json/item_cmodel_obj.json.ftl
88+
writer: json
89+
condition:
90+
- enableLeggings
91+
- "leggingsItemRenderType #= 2"
92+
variables: "item=leggings"
93+
name: "@MODASSETSROOT/models/item/@registryname_leggings.json"
94+
95+
# Boots item model
2296
- template: json/item.json.ftl
2397
writer: json
24-
condition: enableBoots
25-
deleteWhenConditionFalse: true
2698
variables: "item=boots"
27-
name: "@MODASSETSROOT/models/item/@registrynameboots.json"
99+
condition:
100+
- enableBoots
101+
- "hasBootsNormalModel()"
102+
name: "@MODASSETSROOT/models/item/@registryname_boots.json"
103+
- template: json/tool.json.ftl
104+
writer: json
105+
variables: "item=boots"
106+
condition:
107+
- enableBoots
108+
- "hasBootsToolModel()"
109+
name: "@MODASSETSROOT/models/item/@registryname_boots.json"
110+
- template: json/item_cmodel.json.ftl
111+
writer: json
112+
variables: "item=boots"
113+
condition:
114+
- enableBoots
115+
- "bootsItemRenderType #= 1"
116+
name: "@MODASSETSROOT/models/item/@registryname_boots.json"
117+
- template: json/item_cmodel_obj.json.ftl
118+
writer: json
119+
condition:
120+
- enableBoots
121+
- "bootsItemRenderType #= 2"
122+
variables: "item=boots"
123+
name: "@MODASSETSROOT/models/item/@registryname_boots.json"
28124

29125
localizationkeys:
30-
- key: item.@registrynamehelmet.name
126+
- key: item.@modid.@registryname_helmet.name
31127
mapto: helmetName
32-
- key: item.@registrynamebody.name
128+
condition: enableHelmet
129+
- key: item.@modid.@registryname_chestplate.name
33130
mapto: bodyName
34-
- key: item.@registrynamelegs.name
131+
condition: enableBody
132+
- key: item.@modid.@registryname_leggings.name
35133
mapto: leggingsName
36-
- key: item.@registrynameboots.name
37-
mapto: bootsName
134+
condition: enableLeggings
135+
- key: item.@modid.@registryname_boots.name
136+
mapto: bootsName
137+
condition: enableBoots
138+
- fromlist: data.getHelmetFixedSpecialInformation()
139+
key: item.@modid.@registryname_helmet.description_@item_index
140+
- fromlist: data.getBodyFixedSpecialInformation()
141+
key: item.@modid.@registryname_chestplate.description_@item_index
142+
- fromlist: data.getLeggingsFixedSpecialInformation()
143+
key: item.@modid.@registryname_leggings.description_@item_index
144+
- fromlist: data.getBootsFixedSpecialInformation()
145+
key: item.@modid.@registryname_boots.description_@item_index
146+
147+
field_exclusions: [repairItems, knockbackResistance, helmetImmuneToFire, bodyImmuneToFire, leggingsImmuneToFire, bootsImmuneToFire, helmetPiglinNeutral, bodyPiglinNeutral, leggingsPiglinNeutral, bootsPiglinNeutral]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
global_templates:
2+
- template: elementinits/items.java.ftl
3+
name: "@SRCROOT/@BASEPACKAGEPATH/init/@JavaModNameItems.java"

0 commit comments

Comments
 (0)