Package dev.architectury.extensions
Interface ItemExtension
public interface ItemExtension
Extensions to
Item
, implement this on to your item.-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable net.minecraft.world.entity.EquipmentSlot
getCustomEquipmentSlot
(net.minecraft.world.item.ItemStack stack) Returns theEquipmentSlot
forItemStack
.default void
tickArmor
(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) Invoked every tick when this item is equipped.
-
Method Details
-
tickArmor
default void tickArmor(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player) Invoked every tick when this item is equipped.- Parameters:
stack
- the item stackplayer
- the player wearing the armor
-
getCustomEquipmentSlot
@Nullable default @Nullable net.minecraft.world.entity.EquipmentSlot getCustomEquipmentSlot(net.minecraft.world.item.ItemStack stack) Returns theEquipmentSlot
forItemStack
.- Parameters:
stack
- the item stack- Returns:
- the
EquipmentSlot
, returnnull
to default to vanilla'sLivingEntity.getEquipmentSlotForItem(ItemStack)
-