Class PotionItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.PotionItem

public class PotionItem extends Item
Mappings:
Namespace Name
official aai
intermediary net/minecraft/class_1080
named net/minecraft/item/PotionItem
  • Field Details

    • STATUS_EFFECTS_2

      private static final Map<List<StatusEffectInstance>,Integer> STATUS_EFFECTS_2
      Mappings:
      Namespace Name Mixin selector
      official b Laai;b:Ljava/util/Map;
      intermediary field_4384 Lnet/minecraft/class_1080;field_4384:Ljava/util/Map;
      named STATUS_EFFECTS_2 Lnet/minecraft/item/PotionItem;STATUS_EFFECTS_2:Ljava/util/Map;
    • STATUS_EFFECTS_1

      private Map<Integer,List<StatusEffectInstance>> STATUS_EFFECTS_1
      Mappings:
      Namespace Name Mixin selector
      official a Laai;a:Ljava/util/Map;
      intermediary field_9151 Lnet/minecraft/class_1080;field_9151:Ljava/util/Map;
      named STATUS_EFFECTS_1 Lnet/minecraft/item/PotionItem;STATUS_EFFECTS_1:Ljava/util/Map;
  • Constructor Details

    • PotionItem

      public PotionItem()
      Mappings:
      Namespace Name Mixin selector
      official <init> Lzw;<init>()V
      intermediary <init> Lnet/minecraft/class_1069;<init>()V
      named <init> Lnet/minecraft/item/Item;<init>()V
  • Method Details

    • method_3460

      public List<StatusEffectInstance> method_3460(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official h Laai;h(Lzx;)Ljava/util/List;
      intermediary method_3460 Lnet/minecraft/class_1080;method_3460(Lnet/minecraft/class_1071;)Ljava/util/List;
      named method_3460 Lnet/minecraft/item/PotionItem;method_3460(Lnet/minecraft/item/ItemStack;)Ljava/util/List;
    • method_3457

      public List<StatusEffectInstance> method_3457(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Laai;e(I)Ljava/util/List;
      intermediary method_3457 Lnet/minecraft/class_1080;method_3457(I)Ljava/util/List;
      named method_3457 Lnet/minecraft/item/PotionItem;method_3457(I)Ljava/util/List;
    • onFinishUse

      public ItemStack onFinishUse(ItemStack stack, World world, PlayerEntity player)
      Overrides:
      onFinishUse in class Item
      Mappings:
      Namespace Name Mixin selector
      official b Lzw;b(Lzx;Ladm;Lwn;)Lzx;
      intermediary method_3367 Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;
      named onFinishUse Lnet/minecraft/item/Item;onFinishUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Overrides:
      getMaxUseTime in class Item
      Mappings:
      Namespace Name Mixin selector
      official d Lzw;d(Lzx;)I
      intermediary method_3350 Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)I
      named getMaxUseTime Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
    • getUseAction

      public UseAction getUseAction(ItemStack stack)
      Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.
      Overrides:
      getUseAction in class Item
      Parameters:
      stack - The ItemStack that was used
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Lzw;e(Lzx;)Laba;
      intermediary method_3366 Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;
      named getUseAction Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
    • onStartUse

      public ItemStack onStartUse(ItemStack stack, World world, PlayerEntity player)
      Overrides:
      onStartUse in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Ladm;Lwn;)Lzx;
      intermediary method_3358 Lnet/minecraft/class_1069;method_3358(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)Lnet/minecraft/class_1071;
      named onStartUse Lnet/minecraft/item/Item;onStartUse(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/item/ItemStack;
    • method_3458

      public static boolean method_3458(int int2)
      Mappings:
      Namespace Name Mixin selector
      official f Laai;f(I)Z
      intermediary method_3458 Lnet/minecraft/class_1080;method_3458(I)Z
      named method_3458 Lnet/minecraft/item/PotionItem;method_3458(I)Z
    • method_4629

      @Environment(CLIENT) public int method_4629(int int2)
      Mappings:
      Namespace Name Mixin selector
      official g Laai;g(I)I
      intermediary method_4629 Lnet/minecraft/class_1080;method_4629(I)I
      named method_4629 Lnet/minecraft/item/PotionItem;method_4629(I)I
    • getDisplayColor

      @Environment(CLIENT) public int getDisplayColor(ItemStack stack, int color)
      Overrides:
      getDisplayColor in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;I)I
      intermediary method_3344 Lnet/minecraft/class_1069;method_3344(Lnet/minecraft/class_1071;I)I
      named getDisplayColor Lnet/minecraft/item/Item;getDisplayColor(Lnet/minecraft/item/ItemStack;I)I
    • method_3459

      @Environment(CLIENT) public boolean method_3459(int int2)
      Mappings:
      Namespace Name Mixin selector
      official h Laai;h(I)Z
      intermediary method_3459 Lnet/minecraft/class_1080;method_3459(I)Z
      named method_3459 Lnet/minecraft/item/PotionItem;method_3459(I)Z
    • getDisplayName

      public String getDisplayName(ItemStack stack)
      Overrides:
      getDisplayName in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;)Ljava/lang/String;
      intermediary method_3383 Lnet/minecraft/class_1069;method_3383(Lnet/minecraft/class_1071;)Ljava/lang/String;
      named getDisplayName Lnet/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:
      appendTooltip in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Lwn;Ljava/util/List;Z)V
      intermediary method_3352 Lnet/minecraft/class_1069;method_3352(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;Ljava/util/List;Z)V
      named appendTooltip Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
    • hasEnchantmentGlint

      @Environment(CLIENT) public boolean hasEnchantmentGlint(ItemStack stack)
      Returns whether the current item has an enchantment glint. Used by enchanted golden apples and enchanted items.
      Overrides:
      hasEnchantmentGlint in class Item
      See Also:
      • net.minecraft.item.GoldenAppleItem
      Mappings:
      Namespace Name Mixin selector
      official f Lzw;f(Lzx;)Z
      intermediary method_3374 Lnet/minecraft/class_1069;method_3374(Lnet/minecraft/class_1071;)Z
      named hasEnchantmentGlint Lnet/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:
      appendItemStacks in class Item
      Parameters:
      item - The Item instance
      group - The ItemGroup
      list - The list of sub items
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzw;Lyz;Ljava/util/List;)V
      intermediary method_3345 Lnet/minecraft/class_1069;method_3345(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V