Record Class PotionUtil

java.lang.Object
java.lang.Record
net.minecraft.potion.PotionUtil
Record Components:
potion -
customColor -
getCustomPotionEffects -

public record PotionUtil(Optional<RegistryEntry<Potion>> potion, Optional<Integer> customColor, List<StatusEffectInstance> getCustomPotionEffects) extends Record
Mappings:
Namespace Name
official cth
intermediary net/minecraft/class_1844
named net/minecraft/potion/PotionUtil
official d
intermediary comp_2378
named potion
official e
intermediary comp_2379
named customColor
official f
intermediary comp_2380
named getCustomPotionEffects
  • Field Details

    • potion

      private final Optional<RegistryEntry<Potion>> potion
      The field for the potion record component.
    • customColor

      private final Optional<Integer> customColor
      The field for the customColor record component.
    • getCustomPotionEffects

      private final List<StatusEffectInstance> getCustomPotionEffects
      The field for the getCustomPotionEffects record component.
    • field_49274

      public static final PotionUtil field_49274
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a:Lcth;
      intermediary field_49274 Lnet/minecraft/class_1844;field_49274:Lnet/minecraft/class_1844;
      named field_49274 Lnet/minecraft/potion/PotionUtil;field_49274:Lnet/minecraft/potion/PotionUtil;
    • NONE_TEXT

      private static final Text NONE_TEXT
      Mappings:
      Namespace Name Mixin selector
      official g Lcth;g:Lwg;
      intermediary field_25817 Lnet/minecraft/class_1844;field_25817:Lnet/minecraft/class_2561;
      named NONE_TEXT Lnet/minecraft/potion/PotionUtil;NONE_TEXT:Lnet/minecraft/text/Text;
    • DEFAULT_COLOR

      private static final int DEFAULT_COLOR
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official h Lcth;h:I
      intermediary field_30946 Lnet/minecraft/class_1844;field_30946:I
      named DEFAULT_COLOR Lnet/minecraft/potion/PotionUtil;DEFAULT_COLOR:I
    • field_49277

      private static final int field_49277
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official i Lcth;i:I
      intermediary field_49277 Lnet/minecraft/class_1844;field_49277:I
      named field_49277 Lnet/minecraft/potion/PotionUtil;field_49277:I
    • field_49275

      public static final com.mojang.serialization.Codec<PotionUtil> field_49275
      Mappings:
      Namespace Name Mixin selector
      official b Lcth;b:Lcom/mojang/serialization/Codec;
      intermediary field_49275 Lnet/minecraft/class_1844;field_49275:Lcom/mojang/serialization/Codec;
      named field_49275 Lnet/minecraft/potion/PotionUtil;field_49275:Lcom/mojang/serialization/Codec;
    • field_49276

      public static final PacketCodec<RegistryByteBuf,PotionUtil> field_49276
      Mappings:
      Namespace Name Mixin selector
      official c Lcth;c:Lye;
      intermediary field_49276 Lnet/minecraft/class_1844;field_49276:Lnet/minecraft/class_9139;
      named field_49276 Lnet/minecraft/potion/PotionUtil;field_49276:Lnet/minecraft/network/codec/PacketCodec;
  • Constructor Details

  • Method Details

    • method_57400

      public static ItemStack method_57400(Item item, RegistryEntry<Potion> registryEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Lcre;Lil;)Lcrj;
      intermediary method_57400 Lnet/minecraft/class_1844;method_57400(Lnet/minecraft/class_1792;Lnet/minecraft/class_6880;)Lnet/minecraft/class_1799;
      named method_57400 Lnet/minecraft/potion/PotionUtil;method_57400(Lnet/minecraft/item/Item;Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/item/ItemStack;
    • method_57401

      public boolean method_57401(RegistryEntry<Potion> registryEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Lil;)Z
      intermediary method_57401 Lnet/minecraft/class_1844;method_57401(Lnet/minecraft/class_6880;)Z
      named method_57401 Lnet/minecraft/potion/PotionUtil;method_57401(Lnet/minecraft/registry/entry/RegistryEntry;)Z
    • method_57397

      public Iterable<StatusEffectInstance> method_57397()
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a()Ljava/lang/Iterable;
      intermediary method_57397 Lnet/minecraft/class_1844;method_57397()Ljava/lang/Iterable;
      named method_57397 Lnet/minecraft/potion/PotionUtil;method_57397()Ljava/lang/Iterable;
    • method_57402

      public void method_57402(Consumer<StatusEffectInstance> consumer)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Ljava/util/function/Consumer;)V
      intermediary method_57402 Lnet/minecraft/class_1844;method_57402(Ljava/util/function/Consumer;)V
      named method_57402 Lnet/minecraft/potion/PotionUtil;method_57402(Ljava/util/function/Consumer;)V
    • method_57403

      public PotionUtil method_57403(RegistryEntry<Potion> registryEntry)
      Mappings:
      Namespace Name Mixin selector
      official b Lcth;b(Lil;)Lcth;
      intermediary method_57403 Lnet/minecraft/class_1844;method_57403(Lnet/minecraft/class_6880;)Lnet/minecraft/class_1844;
      named method_57403 Lnet/minecraft/potion/PotionUtil;method_57403(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/potion/PotionUtil;
    • method_57398

      public PotionUtil method_57398(StatusEffectInstance statusEffectInstance)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Lbph;)Lcth;
      intermediary method_57398 Lnet/minecraft/class_1844;method_57398(Lnet/minecraft/class_1293;)Lnet/minecraft/class_1844;
      named method_57398 Lnet/minecraft/potion/PotionUtil;method_57398(Lnet/minecraft/entity/effect/StatusEffectInstance;)Lnet/minecraft/potion/PotionUtil;
    • getColor

      public int getColor()
      Mappings:
      Namespace Name Mixin selector
      official b Lcth;b()I
      intermediary method_8064 Lnet/minecraft/class_1844;method_8064()I
      named getColor Lnet/minecraft/potion/PotionUtil;getColor()I
    • method_57404

      public int method_57404()
      Mappings:
      Namespace Name Mixin selector
      official c Lcth;c()I
      intermediary method_57404 Lnet/minecraft/class_1844;method_57404()I
      named method_57404 Lnet/minecraft/potion/PotionUtil;method_57404()I
    • getColor

      public static int getColor(RegistryEntry<Potion> potion)
      Mappings:
      Namespace Name Mixin selector
      official c Lcth;c(Lil;)I
      intermediary method_8062 Lnet/minecraft/class_1844;method_8062(Lnet/minecraft/class_6880;)I
      named getColor Lnet/minecraft/potion/PotionUtil;getColor(Lnet/minecraft/registry/entry/RegistryEntry;)I
    • getColor

      public static int getColor(Iterable<StatusEffectInstance> iterable)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Ljava/lang/Iterable;)I
      intermediary method_8055 Lnet/minecraft/class_1844;method_8055(Ljava/lang/Iterable;)I
      named getColor Lnet/minecraft/potion/PotionUtil;getColor(Ljava/lang/Iterable;)I
    • method_57405

      public boolean method_57405()
      Mappings:
      Namespace Name Mixin selector
      official d Lcth;d()Z
      intermediary method_57405 Lnet/minecraft/class_1844;method_57405()Z
      named method_57405 Lnet/minecraft/potion/PotionUtil;method_57405()Z
    • getCustomPotionEffects

      public List<StatusEffectInstance> getCustomPotionEffects()
      Returns the value of the getCustomPotionEffects record component.
      Returns:
      the value of the getCustomPotionEffects record component
    • buildTooltip

      public void buildTooltip(Consumer<Text> consumer, float durationMultiplier, float tickRate)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Ljava/util/function/Consumer;FF)V
      intermediary method_47372 Lnet/minecraft/class_1844;method_47372(Ljava/util/function/Consumer;FF)V
      named buildTooltip Lnet/minecraft/potion/PotionUtil;buildTooltip(Ljava/util/function/Consumer;FF)V
    • buildTooltip

      public static void buildTooltip(Iterable<StatusEffectInstance> iterable, Consumer<Text> consumer, float durationMultiplier, float tickRate)
      Mappings:
      Namespace Name Mixin selector
      official a Lcth;a(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)V
      intermediary method_8065 Lnet/minecraft/class_1844;method_8065(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)V
      named buildTooltip Lnet/minecraft/potion/PotionUtil;buildTooltip(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)V
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • potion

      public Optional<RegistryEntry<Potion>> potion()
      Returns the value of the potion record component.
      Returns:
      the value of the potion record component
    • customColor

      public Optional<Integer> customColor()
      Returns the value of the customColor record component.
      Returns:
      the value of the customColor record component