Class PotionItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.PotionItem
Direct Known Subclasses:
LingeringPotionItem, SplashPotionItem

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

    • PotionItem

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

    • method_3367

      @Nullable public ItemStack method_3367(ItemStack stack, World world, LivingEntity entity)
      Overrides:
      method_3367 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lsa;)Ladq;
      intermediary method_3367 Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;
      named method_3367 Lnet/minecraft/item/Item;method_3367(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Overrides:
      getMaxUseTime in class Item
      Mappings:
      Namespace Name Mixin selector
      official e Lado;e(Ladq;)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 f Lado;f(Ladq;)Lafa;
      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;
    • method_11373

      public TypedActionResult<ItemStack> method_11373(ItemStack itemStack, World world, PlayerEntity playerEntity, Hand hand)
      Overrides:
      method_11373 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;Laht;Lzj;Lqm;)Lqp;
      intermediary method_11373 Lnet/minecraft/class_1069;method_11373(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;
      named method_11373 Lnet/minecraft/item/Item;method_11373(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
    • getDisplayName

      public String getDisplayName(ItemStack stack)
      Overrides:
      getDisplayName in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lado;a(Ladq;)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 Lado;a(Ladq;Lzj;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 i_ Lado;i_(Ladq;)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 Lado;a(Lado;Lacq;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