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 afw
intermediary net/minecraft/class_1080
named net/minecraft/item/PotionItem
  • Constructor Details

    • PotionItem

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

    • getDefaultStack

      @Environment(CLIENT) public ItemStack getDefaultStack()
      Overrides:
      getDefaultStack in class Item
      Mappings:
      Namespace Name Mixin selector
      official i Lafh;i()Lafj;
      intermediary method_13650 Lnet/minecraft/class_1069;method_13650()Lnet/minecraft/class_1071;
      named getDefaultStack Lnet/minecraft/item/Item;getDefaultStack()Lnet/minecraft/item/ItemStack;
    • method_3367

      public ItemStack method_3367(ItemStack stack, World world, LivingEntity entity)
      Overrides:
      method_3367 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafj;Lajs;Lsw;)Lafj;
      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 Lafh;e(Lafj;)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 Lafh;f(Lafj;)Lagu;
      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_13649

      public TypedActionResult<ItemStack> method_13649(World world, PlayerEntity player, Hand hand)
      Overrides:
      method_13649 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lajs;Laay;Lri;)Lrl;
      intermediary method_13649 Lnet/minecraft/class_1069;method_13649(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;
      named method_13649 Lnet/minecraft/item/Item;method_13649(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 b Lafh;b(Lafj;)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 Lafh;a(Lafj;Laay;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_ Lafh;f_(Lafj;)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
    • method_13648

      @Environment(CLIENT) public void method_13648(Item item, ItemGroup itemGroup, DefaultedList<ItemStack> defaultedList)
      Overrides:
      method_13648 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafh;Laej;Ldd;)V
      intermediary method_13648 Lnet/minecraft/class_1069;method_13648(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Lnet/minecraft/class_3114;)V
      named method_13648 Lnet/minecraft/item/Item;method_13648(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V