Started by
Darth Feanor
on
Topic category: Help with Minecraft modding (Java Edition)
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?
Alternitivly a way to get the display name of the armor worn in slot (whatever)
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!
Why do you need to type it in? What's wrong with selecting the item?
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.
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.
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:
yeah... that kinda lost me there. I get sorta the point but now the implimentation.
not*