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 TypeMethodDescriptiondefault net.minecraft.world.item.Item.PropertiescustomDamage(CustomDamageHandler handler) Sets the custom damage handler of the item.default net.minecraft.world.item.Item.PropertiesequipmentSlot(EquipmentSlotProvider equipmentSlotProvider) Sets the equipment slot provider of the item.default @Nullable net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> itemId()Return the id of item that was defined byItem.Properties.setId(ResourceKey).default net.minecraft.world.item.Item.PropertiesmodelId(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
Sets the custom damage handler of the item. Note that this is only called on an ItemStack ifItemStack.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 byItem.Properties.setId(ResourceKey).- Returns:
- currently stored item id or null, if not set
-