Package net.fabricmc.fabric.api.item.v1
Class FabricItemSettings
java.lang.Object
net.minecraft.item.Item.Settings
net.fabricmc.fabric.api.item.v1.FabricItemSettings
public class FabricItemSettings
extends net.minecraft.item.Item.Settings
Fabric's version of Item.Settings. Adds additional methods and hooks
not found in the original class.
To use it, simply replace new Item.Settings()
with
new FabricItemSettings()
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncustomDamage
(CustomDamageHandler handler) Sets the custom damage handler of the item.equipmentSlot
(EquipmentSlotProvider equipmentSlotProvider) Sets the equipment slot provider of the item.food
(net.minecraft.item.FoodComponent foodComponent) group
(net.minecraft.item.ItemGroup group) maxCount
(int maxCount) maxDamage
(int maxDamage) maxDamageIfAbsent
(int maxDamage) rarity
(net.minecraft.util.Rarity rarity) recipeRemainder
(net.minecraft.item.Item recipeRemainder)
-
Constructor Details
-
FabricItemSettings
public FabricItemSettings()
-
-
Method Details
-
equipmentSlot
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.isDamageable()
returns true.- See Also:
-
food
- Overrides:
food
in classnet.minecraft.item.Item.Settings
-
maxCount
- Overrides:
maxCount
in classnet.minecraft.item.Item.Settings
-
maxDamageIfAbsent
- Overrides:
maxDamageIfAbsent
in classnet.minecraft.item.Item.Settings
-
maxDamage
- Overrides:
maxDamage
in classnet.minecraft.item.Item.Settings
-
recipeRemainder
- Overrides:
recipeRemainder
in classnet.minecraft.item.Item.Settings
-
group
- Overrides:
group
in classnet.minecraft.item.Item.Settings
-
rarity
- Overrides:
rarity
in classnet.minecraft.item.Item.Settings
-
fireproof
- Overrides:
fireproof
in classnet.minecraft.item.Item.Settings
-