Interface FabricItem.Properties

Enclosing interface:
FabricItem

public static interface FabricItem.Properties
Fabric-provided extensions for Item.Properties. This interface is automatically implemented on all item properties via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default net.minecraft.world.item.Item.Properties
    Sets the custom damage handler of the item.
    default net.minecraft.world.item.Item.Properties
    equipmentSlot(EquipmentSlotProvider equipmentSlotProvider)
    Sets the equipment slot provider of the item.
    default @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item>
    Return the id of item that was defined by Item.Properties.setId(ResourceKey).
    default net.minecraft.world.item.Item.Properties
    modelId(net.minecraft.resources.Identifier modelId)
    Sets the model of the item to static Identifier.
  • Method Details

    • equipmentSlot

      default net.minecraft.world.item.Item.Properties equipmentSlot(EquipmentSlotProvider equipmentSlotProvider)
      Sets the equipment slot provider of the item.
      Parameters:
      equipmentSlotProvider - the equipment slot provider
      Returns:
      this builder
    • customDamage

      default net.minecraft.world.item.Item.Properties customDamage(CustomDamageHandler handler)
      Sets the custom damage handler of the item. Note that this is only called on an ItemStack if ItemStack.isDamageableItem() returns true.
      See Also:
    • modelId

      default net.minecraft.world.item.Item.Properties modelId(net.minecraft.resources.Identifier modelId)
      Sets the model of the item to static Identifier.
      Parameters:
      modelId - the model id item should use
      Returns:
      this builder
    • itemId

      default @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> itemId()
      Return the id of item that was defined by Item.Properties.setId(ResourceKey).
      Returns:
      currently stored item id or null, if not set