Package net.minecraft.item
Class AppleItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.FoodItem
net.minecraft.item.AppleItem
public class AppleItem extends FoodItem
- Mappings:
Namespace Name official ztintermediary net/minecraft/class_2051named net/minecraft/item/AppleItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
Fields inherited from class net.minecraft.item.FoodItem
eatingTimeFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors Constructor Description AppleItem(int hungerPoints, float saturation, boolean cookable) -
Method Summary
Modifier and Type Method Description voidappendItemStacks(Item item, ItemGroup group, List<ItemStack> list)Registers an item's sub itemsprotected voideat(ItemStack stack, World world, PlayerEntity player)RaritygetRarity(ItemStack stack)Returns the rarity of the current Item.booleanhasEnchantmentGlint(ItemStack stack)Returns whether the current item has an enchantment glint.Methods inherited from class net.minecraft.item.FoodItem
alwaysEdible, getHungerPoints, getMaxUseTime, getSaturation, getUseAction, isCokkable, onFinishUse, onStartUse, setStatusEffectMethods inherited from class net.minecraft.item.Item
appendTooltip, byRawId, canRepair, canUseOnEntity, fromBlock, getAttributeModifierMap, getDisplayColor, getDisplayName, getEnchantability, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMeta, getMiningSpeedMultiplier, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFood, isHandheld, isNetworkSynced, isUnbreakable, onBlockBroken, onCraft, onEntityHit, onHit, onUseStopped, postProcessTag, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncTagToClient, use
-
Constructor Details
-
AppleItem
public AppleItem(int hungerPoints, float saturation, boolean cookable)- Mappings:
Namespace Name Mixin selector official <init>Lzs;<init>(IFZ)Vintermediary <init>Lnet/minecraft/class_2050;<init>(IFZ)Vnamed <init>Lnet/minecraft/item/FoodItem;<init>(IFZ)V
-
-
Method Details
-
hasEnchantmentGlint
Returns whether the current item has an enchantment glint. Used by enchanted golden apples and enchanted items.- Overrides:
hasEnchantmentGlintin classItem- See Also:
net.minecraft.item.GoldenAppleItem- Mappings:
Namespace Name Mixin selector official fLzw;f(Lzx;)Zintermediary method_8288Lnet/minecraft/class_2054;method_8288(Lnet/minecraft/class_2056;)Znamed hasEnchantmentGlintLnet/minecraft/item/Item;hasEnchantmentGlint(Lnet/minecraft/item/ItemStack;)Z
-
getRarity
Returns the rarity of the current Item. Used by golden apples, enchanted items and potions.- Overrides:
getRarityin classItem- Parameters:
stack- The item in an ItemStack form- Returns:
- The rarity of the ItemStack
- See Also:
net.minecraft.item.GoldenAppleItem,PotionItem- Mappings:
Namespace Name Mixin selector official gLzw;g(Lzx;)Laaj;intermediary method_8290Lnet/minecraft/class_2054;method_8290(Lnet/minecraft/class_2056;)Lnet/minecraft/class_12;named getRarityLnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
eat
- Overrides:
eatin classFoodItem- Mappings:
Namespace Name Mixin selector official cLzs;c(Lzx;Ladm;Lwn;)Vintermediary method_8238Lnet/minecraft/class_2050;method_8238(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Vnamed eatLnet/minecraft/item/FoodItem;eat(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)V
-
appendItemStacks
@Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> list)Registers an item's sub items- Overrides:
appendItemStacksin classItem- Parameters:
item- The Item instancegroup- The ItemGrouplist- The list of sub items- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzw;Lyz;Ljava/util/List;)Vintermediary method_8255Lnet/minecraft/class_2054;method_8255(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)Vnamed appendItemStacksLnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)V
-