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 aijintermediary 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_13649(World world, PlayerEntity player, Hand hand) method_3367(ItemStack stack, World world, LivingEntity entity) Methods inherited from class net.minecraft.item.Item
addProperty, appendToItemGroup, appendTooltips, byRawId, canAddTo, canRepair, fromBlock, getBlockBreakingSpeed, getDefaultStack, 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_3356, method_3359, method_6326, onCraft, onEntityHit, onHit, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient, use
-
Field Details
-
eatingTime
public final int eatingTime- See Also:
- Mappings:
Namespace Name Mixin selector official aLaij;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 bLaij;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 cLaij;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 dLaij;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 eLaij;e:Zintermediary field_4201Lnet/minecraft/class_1065;field_4201:Znamed alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible:Z
-
field_12297
- Mappings:
Namespace Name Mixin selector official fLaij;f:Lva;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 nLaij;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>Laij;<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>Laij;<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 aLain;a(Laip;Lamu;Lvp;)Laip;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 aLaij;a(Laip;Lamu;Laed;)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 eLain;e(Laip;)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 fLain;f(Laip;)Lakc;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_13649
- Overrides:
method_13649in classItem- Mappings:
Namespace Name Mixin selector official aLain;a(Lamu;Laed;Lub;)Lue;intermediary method_13649Lnet/minecraft/class_1069;method_13649(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;named method_13649Lnet/minecraft/item/Item;method_13649(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
getHungerPoints
- Mappings:
Namespace Name Mixin selector official hLaij;h(Laip;)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 iLaij;i(Laip;)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 gLaij;g()Zintermediary method_3339Lnet/minecraft/class_1065;method_3339()Znamed isCokkableLnet/minecraft/item/FoodItem;isCokkable()Z
-
method_11371
- Mappings:
Namespace Name Mixin selector official aLaij;a(Lva;F)Laij;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 hLaij;h()Laij;intermediary method_3340Lnet/minecraft/class_1065;method_3340()Lnet/minecraft/class_1065;named alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible()Lnet/minecraft/item/FoodItem;
-