Check if an item can be worn by an entity (and more)

Started by AtomicShadow2006 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check if an item can be worn by an entity (and more)

I was making a mod, but I came across an issue regarding checking if an item is of a certain type. I was trying to see if an item can be worn. I know that I can use a tag to group every armor piece in the game and check if the item is part of the tag group, but I want my mod to be compatible with other mods as well that add their own armor, tools, and weapons. How can I check if an armor is of a certain type (such as armor, swords, axes, pickaxes, bows, etc.)?