haselkern / Minecraft-ArmorStand

This tool generates a summon command, to summon an armorstand in a desired pose.
https://haselkern.com/Minecraft-ArmorStand/
GNU General Public License v2.0
120 stars 25 forks source link

1.20.5 support #49

Closed bauerbach closed 3 months ago

bauerbach commented 6 months ago

Mojang changed how entity data tags work in 1.20.5, meaning the /give commands provided by this tool no longer work. Can you please add support for 1.20.5?

Hashir103 commented 5 months ago

In 1.20.5+ the EntityTag property given on the site needs to be updated to the new component tags which would mean requiring the item/entity ID now in the data as well and changing the syntax.

1.16-1.20.4 Give Command (found on the site)

/give @p armor_stand{EntityTag:{Invulnerable:1b,NoBasePlate:1b}} 1

1.20.5+ Give Command

/give @p armor_stand[entity_data={id:"armor_stand",Invulnerable:1b,NoBasePlate:1b}]


It is worth noting that even though both Summon/Give will work with this change, there are other issues with the armor stands such as player heads, leather colour etc. All of these properties need to be modified to comply with the component tag syntax. Check the 1.20.5 Patch notes to see every change made if someone has the time for a comprehensive update.

For example, player heads:

1.16-1.20.4 Give Command (found on the site)

/give @p armor_stand{EntityTag:{Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,ShowArms:1b,ArmorItems:[{},{},{},{id:"player_head",Count:1b,tag:{SkullOwner:"Hash1r"}}],HandItems:[{},{}],Pose:{LeftLeg:[265f,0f,0f],RightLeg:[264f,0f,0f],LeftArm:[310f,0f,0f],RightArm:[307f,0f,0f]}}}

1.20.5+ Give Command

/give @p armor_stand[entity_data={id:"armor_stand",Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,ShowArms:1b,ArmorItems:[{},{},{},{id:"player_head",Count:1b,components:{profile:{name:"Hash1r"}}}],HandItems:[{},{}],Pose:{LeftLeg:[265f,0f,0f],RightLeg:[264f,0f,0f],LeftArm:[310f,0f,0f],RightArm:[307f,0f,0f]}}]

BerryCutePixels commented 4 months ago

For anyone else looking in the future here's the new updated code if you want to use armor stands for invisible text, just replace "armor_stand" after custom_name with whatever you want (remove Marker:1b if you want the text to float above the armor stand instead of being positioned under it)

/give @p armor_stand[entity_data={id:"armor_stand",Invisible:1b,Invulnerable:1b,NoBasePlate:1b,CustomNameVisible:1b,PersistenceRequired:1b,NoGravity:1b,Marker:1b},custom_name=armor_stand]