How to check for a armor id and or display name?

Started by Darth Feanor on

Topic category: Help with modding (Java Edition)

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to check for a armor id and or display name?

So, I want to check for if a player is wearing a certain armor part, not with the normal box where you just select the item, I mean write in its id like "minecraft:diamond_helmet" can we do that somehow?

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alternitivly a way to get…
Mon, 04/29/2019 - 01:12

Alternitivly a way to get the display name of the armor worn in slot (whatever)

Last seen on 00:53, 14. Mar 2024
Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To my knowledge, there is no…
Mon, 04/29/2019 - 02:54

To my knowledge, there is no way to find the ID of an item on an entity. If you want to find if they have armor on, or how much armor value an entity has, use the "Armor value of provided entity", located in the "Entity procedures" tab. Good luck on your searches!

Last seen on 14:52, 1. Oct 2020
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why do you need to type it…
Mon, 04/29/2019 - 14:49

Why do you need to type it in? What's wrong with selecting the item?

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Because the armor I wish to…
Sat, 05/04/2019 - 23:11

Because the armor I wish to use is from another mod. So I want it to give a achivement for equiping my DR. Strange suit but am unable to find a way to do this with MCreator.

Last seen on 20:43, 14. Feb 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dependencies allow you to do…
Sun, 05/05/2019 - 13:16

Dependencies allow you to do that... Though I don't know how to do that just yet myself as I'm soon going to test it out.

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, if you really want to,…
Sun, 05/05/2019 - 18:40

Well, if you really want to, you can get the ResourceLocation suing Item.REGISTRY.getNameForObject(item), convert the ResourceLocation to string and then compare the string to whatever you want, like this:

Item item = stack.getItem();
if(Item.REGISTRY.getNameForObject(item).toString().equals("minecraft:diamond_helmet")){
//do stuff here
}

 

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah... that kinda lost me…
Wed, 05/08/2019 - 18:08

yeah... that kinda lost me there. I get sorta the point but now the implimentation.

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
not*  
Wed, 05/08/2019 - 18:09

not*