Package net.minecraft.item
Class PotionItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.PotionItem
public class PotionItem extends Item
- Mappings:
Namespace Name official aaiintermediary net/minecraft/class_11named net/minecraft/item/PotionItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
Fields Modifier and Type Field Description private Map<Integer,List<StatusEffectInstance>>STATUS_EFFECTS_1private static Map<List<StatusEffectInstance>,Integer>STATUS_EFFECTS_2Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors Constructor Description PotionItem() -
Method Summary
Modifier and Type Method Description voidappendItemStacks(Item item, ItemGroup group, List<ItemStack> list)Registers an item's sub itemsvoidappendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced)intgetDisplayColor(ItemStack stack, int color)StringgetDisplayName(ItemStack stack)intgetMaxUseTime(ItemStack stack)UseActiongetUseAction(ItemStack stack)Returns the UseAction for an item when the item is used.booleanhasEnchantmentGlint(ItemStack stack)Returns whether the current item has an enchantment glint.List<StatusEffectInstance>method_15(int int2)static booleanmethod_16(int int2)intmethod_17(int int2)booleanmethod_18(int int2)List<StatusEffectInstance>method_19(ItemStack itemStack)ItemStackonFinishUse(ItemStack stack, World world, PlayerEntity player)ItemStackonStartUse(ItemStack stack, World world, PlayerEntity player)Methods inherited from class net.minecraft.item.Item
byRawId, canRepair, canUseOnEntity, fromBlock, getAttributeModifierMap, getEnchantability, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMeta, getMiningSpeedMultiplier, getRarity, 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
-
Field Details
-
STATUS_EFFECTS_2
- Mappings:
Namespace Name Mixin selector official bLaai;b:Ljava/util/Map;intermediary field_40Lnet/minecraft/class_11;field_40:Ljava/util/Map;named STATUS_EFFECTS_2Lnet/minecraft/item/PotionItem;STATUS_EFFECTS_2:Ljava/util/Map;
-
STATUS_EFFECTS_1
- Mappings:
Namespace Name Mixin selector official aLaai;a:Ljava/util/Map;intermediary field_39Lnet/minecraft/class_11;field_39:Ljava/util/Map;named STATUS_EFFECTS_1Lnet/minecraft/item/PotionItem;STATUS_EFFECTS_1:Ljava/util/Map;
-
-
Constructor Details
-
PotionItem
public PotionItem()- Mappings:
Namespace Name Mixin selector official <init>Lzw;<init>()Vintermediary <init>Lnet/minecraft/class_2054;<init>()Vnamed <init>Lnet/minecraft/item/Item;<init>()V
-
-
Method Details
-
method_19
- Mappings:
Namespace Name Mixin selector official hLaai;h(Lzx;)Ljava/util/List;intermediary method_19Lnet/minecraft/class_11;method_19(Lnet/minecraft/class_2056;)Ljava/util/List;named method_19Lnet/minecraft/item/PotionItem;method_19(Lnet/minecraft/item/ItemStack;)Ljava/util/List;
-
method_15
- Mappings:
Namespace Name Mixin selector official eLaai;e(I)Ljava/util/List;intermediary method_15Lnet/minecraft/class_11;method_15(I)Ljava/util/List;named method_15Lnet/minecraft/item/PotionItem;method_15(I)Ljava/util/List;
-
onFinishUse
- Overrides:
onFinishUsein classItem- Mappings:
Namespace Name Mixin selector official bLzw;b(Lzx;Ladm;Lwn;)Lzx;intermediary method_8273Lnet/minecraft/class_2054;method_8273(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;named onFinishUseLnet/minecraft/item/Item;onFinishUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
getMaxUseTime
- Overrides:
getMaxUseTimein classItem- Mappings:
Namespace Name Mixin selector official dLzw;d(Lzx;)Iintermediary method_8281Lnet/minecraft/class_2054;method_8281(Lnet/minecraft/class_2056;)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:
BowItem,PotionItem- Mappings:
Namespace Name Mixin selector official eLzw;e(Lzx;)Laba;intermediary method_8285Lnet/minecraft/class_2054;method_8285(Lnet/minecraft/class_2056;)Lnet/minecraft/class_30;named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
onStartUse
- Overrides:
onStartUsein classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Ladm;Lwn;)Lzx;intermediary method_8260Lnet/minecraft/class_2054;method_8260(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;named onStartUseLnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
-
method_16
public static boolean method_16(int int2)- Mappings:
Namespace Name Mixin selector official fLaai;f(I)Zintermediary method_16Lnet/minecraft/class_11;method_16(I)Znamed method_16Lnet/minecraft/item/PotionItem;method_16(I)Z
-
method_17
- Mappings:
Namespace Name Mixin selector official gLaai;g(I)Iintermediary method_17Lnet/minecraft/class_11;method_17(I)Inamed method_17Lnet/minecraft/item/PotionItem;method_17(I)I
-
getDisplayColor
- Overrides:
getDisplayColorin classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;I)Iintermediary method_8257Lnet/minecraft/class_2054;method_8257(Lnet/minecraft/class_2056;I)Inamed getDisplayColorLnet/minecraft/item/Item;getDisplayColor(Lnet/minecraft/item/ItemStack;I)I
-
method_18
- Mappings:
Namespace Name Mixin selector official hLaai;h(I)Zintermediary method_18Lnet/minecraft/class_11;method_18(I)Znamed method_18Lnet/minecraft/item/PotionItem;method_18(I)Z
-
getDisplayName
- Overrides:
getDisplayNamein classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;)Ljava/lang/String;intermediary method_8256Lnet/minecraft/class_2054;method_8256(Lnet/minecraft/class_2056;)Ljava/lang/String;named getDisplayNameLnet/minecraft/item/Item;getDisplayName(Lnet/minecraft/item/ItemStack;)Ljava/lang/String;
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced)- Overrides:
appendTooltipin classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Lwn;Ljava/util/List;Z)Vintermediary method_8265Lnet/minecraft/class_2054;method_8265(Lnet/minecraft/class_2056;Lnet/minecraft/class_1963;Ljava/util/List;Z)Vnamed appendTooltipLnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
-
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
-
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
-