Package net.minecraft.item
Class FoodItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.FoodItem
- Direct Known Subclasses:
AppleItem,ChorusFruitItem,CropItem,FishItem,StewItem
- Mappings:
Namespace Name official adkintermediary net/minecraft/class_1065named net/minecraft/item/FoodItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final booleanfinal intprivate floatprivate StatusEffectInstanceprivate final intprivate final floatFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voideat(ItemStack stack, World world, PlayerEntity player) intgetHungerPoints(ItemStack stack) intgetMaxUseTime(ItemStack stack) floatgetSaturation(ItemStack stack) getUseAction(ItemStack stack) Returns the UseAction for an item when the item is used.booleanmethod_11371(StatusEffectInstance statusEffectInstance, float float2) method_11373(ItemStack itemStack, World world, PlayerEntity playerEntity, Hand hand) method_3367(ItemStack stack, World world, LivingEntity entity) Methods inherited from class net.minecraft.item.Item
addProperty, appendItemStacks, appendTooltip, byRawId, canRepair, fromBlock, getBlockBreakingSpeed, getDisplayName, getEnchantability, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMeta, getProperty, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, hasEnchantmentGlint, hasProperties, hasSubTypes, inventoryTick, isDamageable, isEnchantable, isFood, isHandheld, isNetworkSynced, isUnbreakable, method_3346, method_3353, method_3355, method_3356, method_3359, method_6326, onCraft, onEntityHit, onHit, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient
-
Field Details
-
eatingTime
public final int eatingTime- See Also:
- Mappings:
Namespace Name Mixin selector official aLadk;a:Iintermediary field_4198Lnet/minecraft/class_1065;field_4198:Inamed eatingTimeLnet/minecraft/item/FoodItem;eatingTime:I
-
hungerPoints
private final int hungerPoints- Mappings:
Namespace Name Mixin selector official bLadk;b:Iintermediary field_4199Lnet/minecraft/class_1065;field_4199:Inamed hungerPointsLnet/minecraft/item/FoodItem;hungerPoints:I
-
saturation
private final float saturation- Mappings:
Namespace Name Mixin selector official cLadk;c:Fintermediary field_4202Lnet/minecraft/class_1065;field_4202:Fnamed saturationLnet/minecraft/item/FoodItem;saturation:F
-
cookable
private final boolean cookable- Mappings:
Namespace Name Mixin selector official dLadk;d:Zintermediary field_4200Lnet/minecraft/class_1065;field_4200:Znamed cookableLnet/minecraft/item/FoodItem;cookable:Z
-
alwaysEdible
private boolean alwaysEdible- Mappings:
Namespace Name Mixin selector official eLadk;e:Zintermediary field_4201Lnet/minecraft/class_1065;field_4201:Znamed alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible:Z
-
field_12297
- Mappings:
Namespace Name Mixin selector official fLadk;f:Lrl;intermediary field_12297Lnet/minecraft/class_1065;field_12297:Lnet/minecraft/class_861;named field_12297Lnet/minecraft/item/FoodItem;field_12297:Lnet/minecraft/entity/effect/StatusEffectInstance;
-
effectChance
private float effectChance- Mappings:
Namespace Name Mixin selector official nLadk;n:Fintermediary field_4206Lnet/minecraft/class_1065;field_4206:Fnamed effectChanceLnet/minecraft/item/FoodItem;effectChance:F
-
-
Constructor Details
-
FoodItem
public FoodItem(int hungerPoints, float saturation, boolean cookable) - Mappings:
Namespace Name Mixin selector official <init>Ladk;<init>(IFZ)Vintermediary <init>Lnet/minecraft/class_1065;<init>(IFZ)Vnamed <init>Lnet/minecraft/item/FoodItem;<init>(IFZ)V
-
FoodItem
public FoodItem(int hungerPoints, boolean cookable) - Mappings:
Namespace Name Mixin selector official <init>Ladk;<init>(IZ)Vintermediary <init>Lnet/minecraft/class_1065;<init>(IZ)Vnamed <init>Lnet/minecraft/item/FoodItem;<init>(IZ)V
-
-
Method Details
-
method_3367
- Overrides:
method_3367in classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Laht;Lsa;)Ladq;intermediary method_3367Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;named method_3367Lnet/minecraft/item/Item;method_3367(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
-
eat
- Mappings:
Namespace Name Mixin selector official aLadk;a(Ladq;Laht;Lzj;)Vintermediary method_3336Lnet/minecraft/class_1065;method_3336(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Vnamed eatLnet/minecraft/item/FoodItem;eat(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)V
-
getMaxUseTime
- Overrides:
getMaxUseTimein classItem- Mappings:
Namespace Name Mixin selector official eLado;e(Ladq;)Iintermediary method_3350Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
getUseAction
Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.- Overrides:
getUseActionin classItem- Parameters:
stack- The ItemStack that was used- See Also:
- Mappings:
Namespace Name Mixin selector official fLado;f(Ladq;)Lafa;intermediary method_3366Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
method_11373
public TypedActionResult<ItemStack> method_11373(ItemStack itemStack, World world, PlayerEntity playerEntity, Hand hand) - Overrides:
method_11373in classItem- Mappings:
Namespace Name Mixin selector official aLado;a(Ladq;Laht;Lzj;Lqm;)Lqp;intermediary method_11373Lnet/minecraft/class_1069;method_11373(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;named method_11373Lnet/minecraft/item/Item;method_11373(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
getHungerPoints
- Mappings:
Namespace Name Mixin selector official hLadk;h(Ladq;)Iintermediary method_6360Lnet/minecraft/class_1065;method_6360(Lnet/minecraft/class_1071;)Inamed getHungerPointsLnet/minecraft/item/FoodItem;getHungerPoints(Lnet/minecraft/item/ItemStack;)I
-
getSaturation
- Mappings:
Namespace Name Mixin selector official iLadk;i(Ladq;)Fintermediary method_6361Lnet/minecraft/class_1065;method_6361(Lnet/minecraft/class_1071;)Fnamed getSaturationLnet/minecraft/item/FoodItem;getSaturation(Lnet/minecraft/item/ItemStack;)F
-
isCokkable
public boolean isCokkable()- Mappings:
Namespace Name Mixin selector official gLadk;g()Zintermediary method_3339Lnet/minecraft/class_1065;method_3339()Znamed isCokkableLnet/minecraft/item/FoodItem;isCokkable()Z
-
method_11371
- Mappings:
Namespace Name Mixin selector official aLadk;a(Lrl;F)Ladk;intermediary method_11371Lnet/minecraft/class_1065;method_11371(Lnet/minecraft/class_861;F)Lnet/minecraft/class_1065;named method_11371Lnet/minecraft/item/FoodItem;method_11371(Lnet/minecraft/entity/effect/StatusEffectInstance;F)Lnet/minecraft/item/FoodItem;
-
alwaysEdible
- Mappings:
Namespace Name Mixin selector official hLadk;h()Ladk;intermediary method_3340Lnet/minecraft/class_1065;method_3340()Lnet/minecraft/class_1065;named alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible()Lnet/minecraft/item/FoodItem;
-