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_11
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_40 Lnet/minecraft/class_11;field_40: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_39 Lnet/minecraft/class_11;field_39: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_2054;<init>()V
      named <init> Lnet/minecraft/item/Item;<init>()V
  • Method Details

    • method_19

      public List<StatusEffectInstance> method_19​(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official h Laai;h(Lzx;)Ljava/util/List;
      intermediary method_19 Lnet/minecraft/class_11;method_19(Lnet/minecraft/class_2056;)Ljava/util/List;
      named method_19 Lnet/minecraft/item/PotionItem;method_19(Lnet/minecraft/item/ItemStack;)Ljava/util/List;
    • method_15

      public List<StatusEffectInstance> method_15​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official e Laai;e(I)Ljava/util/List;
      intermediary method_15 Lnet/minecraft/class_11;method_15(I)Ljava/util/List;
      named method_15 Lnet/minecraft/item/PotionItem;method_15(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_8273 Lnet/minecraft/class_2054;method_8273(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;
      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_8281 Lnet/minecraft/class_2054;method_8281(Lnet/minecraft/class_2056;)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:
      BowItem, PotionItem
      Mappings:
      Namespace Name Mixin selector
      official e Lzw;e(Lzx;)Laba;
      intermediary method_8285 Lnet/minecraft/class_2054;method_8285(Lnet/minecraft/class_2056;)Lnet/minecraft/class_30;
      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_8260 Lnet/minecraft/class_2054;method_8260(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)Lnet/minecraft/class_2056;
      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_16

      public static boolean method_16​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official f Laai;f(I)Z
      intermediary method_16 Lnet/minecraft/class_11;method_16(I)Z
      named method_16 Lnet/minecraft/item/PotionItem;method_16(I)Z
    • method_17

      @Environment(CLIENT) public int method_17​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official g Laai;g(I)I
      intermediary method_17 Lnet/minecraft/class_11;method_17(I)I
      named method_17 Lnet/minecraft/item/PotionItem;method_17(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_8257 Lnet/minecraft/class_2054;method_8257(Lnet/minecraft/class_2056;I)I
      named getDisplayColor Lnet/minecraft/item/Item;getDisplayColor(Lnet/minecraft/item/ItemStack;I)I
    • method_18

      @Environment(CLIENT) public boolean method_18​(int int2)
      Mappings:
      Namespace Name Mixin selector
      official h Laai;h(I)Z
      intermediary method_18 Lnet/minecraft/class_11;method_18(I)Z
      named method_18 Lnet/minecraft/item/PotionItem;method_18(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_8256 Lnet/minecraft/class_2054;method_8256(Lnet/minecraft/class_2056;)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_8265 Lnet/minecraft/class_2054;method_8265(Lnet/minecraft/class_2056;Lnet/minecraft/class_1963;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_8288 Lnet/minecraft/class_2054;method_8288(Lnet/minecraft/class_2056;)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_8255 Lnet/minecraft/class_2054;method_8255(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)V