TransWikia.com

Detect if armourstand have nothing on head?

Arqade Asked on June 19, 2021

Detect if armourstand have nothing on head?
i am making map where peaople can place armourstand into armourstand and i want to repair it with peaople grab the head and then they can grab it from another on one block but firt i need to kill armourstand without the head i am using java edition 1.16.5

2 Answers

I'm not sure exactly what you want, but this might solve your issue. You can test if the armor stand does not have a player head:

execute if entity @e[type=armor_stand,nbt=!{ArmorItems:[{id:"minecraft:player_head"}]},sort=nearest,limit=1]

Correct answer by ginkgo on June 19, 2021

Well I don't believe there is really a way to test that, but here is a list of things you can do:

  1. Make the armor unbreakable:

    /give {player} {item} {amount} {Unbreakable:1}

Ex:

/give Player iron_boots 1{Unbreakable:1} 
  1. Let the player buy whatever item they need to repair the armor

  2. Replace the armor every few minutes:

    /replaceitem {player} slot.armor.{Feet,Chest, Etc} {Item}

Ex:

/replaceitem Player slot.armor.head diamond_helmet 

You can repeat that command for every armor slot using a command block.

That's all I can think of at the moment, but I hope it helps! If you have any additional questions feel free to ask me.

Answered by Crazed on June 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP