4
4
5
5
# Goal: Write Datapack that sets up all display items
6
6
VERSION = (1 , 0 , 0 ) # Major, Minor, Fix per semantic versioning v2 https://semver.org/
7
- MC_PACK_VERSION = 26
7
+ MC_PACK_VERSION = 41
8
8
DIR_OUTPUT = "./output"
9
9
DIR_DATA = f"{ DIR_OUTPUT } /data"
10
10
DIR_PACK = f"{ DIR_DATA } /summon-stands"
@@ -58,9 +58,9 @@ def getPos(x, y, z):
58
58
def getItem (type , element , material = None , trim = None ):
59
59
# {id:"minecraft:leather_helmet", Count: 1b, tag: {Damage: 0, Trim: {material: "minecraft:iron", pattern: "minecraft:sentry"}}}
60
60
retValue = "{"
61
- retValue += f'id: "minecraft:{ type } _{ element } ", Count:1b '
61
+ retValue += f'id: "minecraft:{ type } _{ element } ", count: 1 '
62
62
if trim != None :
63
- retValue += ", tag : { Trim: "
63
+ retValue += ", components : { \" minecraft:trim \" : "
64
64
retValue += "{"
65
65
retValue += f'material: "minecraft:{ material } ", pattern: "minecraft:{ trim } "'
66
66
retValue += "}"
@@ -146,7 +146,7 @@ def main():
146
146
print ("Writing Pack meta data" )
147
147
mcmeta = {
148
148
"pack" : {
149
- "pack_format" : 26 ,
149
+ "pack_format" : MC_PACK_VERSION ,
150
150
"description" : "Summon armor stands with all trims in all armor types."
151
151
}
152
152
}
@@ -163,4 +163,28 @@ def main():
163
163
164
164
165
165
if __name__ == "__main__" :
166
- main ()
166
+ main ()
167
+
168
+
169
+ # 41 + component base format for Armor Items
170
+ # This can be retrived by doing `/data get entity <entity id> ArmorItems
171
+ """
172
+ Armor Stand has the following entity data:
173
+ [
174
+ {},
175
+ {},
176
+ {},
177
+ {
178
+ components:
179
+ {
180
+ "minecraft:trim":
181
+ {
182
+ material: "minecraft:redstone",
183
+ pattern: "minecraft:sentry"
184
+ }
185
+ },
186
+ count: 1,
187
+ id: "minecraft:iron_helmet"
188
+ }
189
+ ]
190
+ """
0 commit comments