Package net.minecraft.item
Class FoodItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.FoodItem
- All Implemented Interfaces:
Itemable
- Direct Known Subclasses:
AppleItem,ChorusFruitItem,class_3550,CropItem,FishItem,StewItem
- Mappings:
Namespace Name official asvintermediary net/minecraft/class_1065named net/minecraft/item/FoodItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final booleanprivate floatprivate StatusEffectInstanceprivate booleanprivate final intprivate final floatFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER, BLOCK_ITEMS, itemGroup, RANDOM -
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, beforeBlockBreak, byRawId, canAddTo, canRepair, computeTranslationKey, fromBlock, getBlockBreakingSpeed, getDefaultStack, getEnchantability, getItem, getItemGroup, getMaxCount, getMaxDamage, getProperty, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, hasEnchantmentGlint, hasProperties, inventoryTick, isDamageable, isEnchantable, isFood, isNetworkSynced, method_16075, method_16080, method_3346, method_3353, method_3356, method_3359, method_3383, method_6326, onCraft, onEntityHit, onHit, postProcessNbt, registerBlockItem, setup, shouldSyncNbtToClient, useOnBlock
-
Field Details
-
hungerPoints
private final int hungerPoints- Mappings:
Namespace Name Mixin selector official aLasv;a: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 bLasv;b: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 cLasv;c: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 dLasv;d:Zintermediary field_4201Lnet/minecraft/class_1065;field_4201:Znamed alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible:Z
-
field_17184
private boolean field_17184- Mappings:
Namespace Name Mixin selector official eLasv;e:Zintermediary field_17184Lnet/minecraft/class_1065;field_17184:Znamed field_17184Lnet/minecraft/item/FoodItem;field_17184:Z
-
field_12297
- Mappings:
Namespace Name Mixin selector official kLasv;k:Laek;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 lLasv;l:Fintermediary field_4206Lnet/minecraft/class_1065;field_4206:Fnamed effectChanceLnet/minecraft/item/FoodItem;effectChance:F
-
-
Constructor Details
-
FoodItem
-
-
Method Details
-
method_3367
- Overrides:
method_3367in classItem- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Lafa;)Late;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 aLasv;a(Late;Laxy;Laog;)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 cLata;c(Late;)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 dLata;d(Late;)Lauo;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 aLata;a(Laxy;Laog;Ladk;)Ladn;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 eLasv;e(Late;)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 fLasv;f(Late;)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 dLasv;d()Zintermediary method_3339Lnet/minecraft/class_1065;method_3339()Znamed isCokkableLnet/minecraft/item/FoodItem;isCokkable()Z
-
method_11371
- Mappings:
Namespace Name Mixin selector official aLasv;a(Laek;F)Lasv;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 eLasv;e()Lasv;intermediary method_3340Lnet/minecraft/class_1065;method_3340()Lnet/minecraft/class_1065;named alwaysEdibleLnet/minecraft/item/FoodItem;alwaysEdible()Lnet/minecraft/item/FoodItem;
-
method_16065
- Mappings:
Namespace Name Mixin selector official fLasv;f()Lasv;intermediary method_16065Lnet/minecraft/class_1065;method_16065()Lnet/minecraft/class_1065;named method_16065Lnet/minecraft/item/FoodItem;method_16065()Lnet/minecraft/item/FoodItem;
-