EquipmentSlotProvider

public interface EquipmentSlotProvider

A provider for the preferred equipment slot of an item. This can be used to give non-armor items, such as blocks, an armor slot that they can go in.

Equipment slot providers can be set with equipmentSlot.

Note that items extending net.minecraft.item.ArmorItem don't need to use this as there's getSlotType.

Functions

getPreferredEquipmentSlot
Link copied to clipboard
abstract EquipmentSlot getPreferredEquipmentSlot(ItemStack stack)
Gets the preferred equipment slot for an item stack.

Sources

jvm source
Link copied to clipboard