Package net.minecraft.potion
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 cthintermediary net/minecraft/class_1844named net/minecraft/potion/PotionUtilofficial dintermediary comp_2378named potionofficial eintermediary comp_2379named customColorofficial fintermediary comp_2380named getCustomPotionEffects
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecustomColorrecord component.private static final intstatic final PotionUtilstatic final com.mojang.serialization.Codec<PotionUtil> static final PacketCodec<RegistryByteBuf, PotionUtil> private static final intprivate final List<StatusEffectInstance> The field for thegetCustomPotionEffectsrecord component.private static final Textprivate final Optional<RegistryEntry<Potion>> The field for thepotionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPotionUtil(Optional<RegistryEntry<Potion>> optional, Optional<Integer> optional2, List<StatusEffectInstance> list) PotionUtil(RegistryEntry<Potion> registryEntry) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildTooltip(Iterable<StatusEffectInstance> iterable, Consumer<Text> consumer, float durationMultiplier, float tickRate) voidbuildTooltip(Consumer<Text> consumer, float durationMultiplier, float tickRate) Returns the value of thecustomColorrecord component.final booleanIndicates whether some other object is "equal to" this one.intgetColor()static intgetColor(Iterable<StatusEffectInstance> iterable) static intgetColor(RegistryEntry<Potion> potion) Returns the value of thegetCustomPotionEffectsrecord component.final inthashCode()Returns a hash code value for this object.method_57398(StatusEffectInstance statusEffectInstance) static ItemStackmethod_57400(Item item, RegistryEntry<Potion> registryEntry) booleanmethod_57401(RegistryEntry<Potion> registryEntry) voidmethod_57402(Consumer<StatusEffectInstance> consumer) method_57403(RegistryEntry<Potion> registryEntry) intbooleanpotion()Returns the value of thepotionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
potion
The field for thepotionrecord component. -
customColor
The field for thecustomColorrecord component. -
getCustomPotionEffects
The field for thegetCustomPotionEffectsrecord component. -
field_49274
- Mappings:
Namespace Name Mixin selector official aLcth;a:Lcth;intermediary field_49274Lnet/minecraft/class_1844;field_49274:Lnet/minecraft/class_1844;named field_49274Lnet/minecraft/potion/PotionUtil;field_49274:Lnet/minecraft/potion/PotionUtil;
-
NONE_TEXT
- Mappings:
Namespace Name Mixin selector official gLcth;g:Lwg;intermediary field_25817Lnet/minecraft/class_1844;field_25817:Lnet/minecraft/class_2561;named NONE_TEXTLnet/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 hLcth;h:Iintermediary field_30946Lnet/minecraft/class_1844;field_30946:Inamed DEFAULT_COLORLnet/minecraft/potion/PotionUtil;DEFAULT_COLOR:I
-
field_49277
private static final int field_49277- See Also:
- Mappings:
Namespace Name Mixin selector official iLcth;i:Iintermediary field_49277Lnet/minecraft/class_1844;field_49277:Inamed field_49277Lnet/minecraft/potion/PotionUtil;field_49277:I
-
field_49275
- Mappings:
Namespace Name Mixin selector official bLcth;b:Lcom/mojang/serialization/Codec;intermediary field_49275Lnet/minecraft/class_1844;field_49275:Lcom/mojang/serialization/Codec;named field_49275Lnet/minecraft/potion/PotionUtil;field_49275:Lcom/mojang/serialization/Codec;
-
field_49276
- Mappings:
Namespace Name Mixin selector official cLcth;c:Lye;intermediary field_49276Lnet/minecraft/class_1844;field_49276:Lnet/minecraft/class_9139;named field_49276Lnet/minecraft/potion/PotionUtil;field_49276:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
PotionUtil
-
PotionUtil
public PotionUtil(Optional<RegistryEntry<Potion>> optional, Optional<Integer> optional2, List<StatusEffectInstance> list)
-
-
Method Details
-
method_57400
- Mappings:
Namespace Name Mixin selector official aLcth;a(Lcre;Lil;)Lcrj;intermediary method_57400Lnet/minecraft/class_1844;method_57400(Lnet/minecraft/class_1792;Lnet/minecraft/class_6880;)Lnet/minecraft/class_1799;named method_57400Lnet/minecraft/potion/PotionUtil;method_57400(Lnet/minecraft/item/Item;Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/item/ItemStack;
-
method_57401
- Mappings:
Namespace Name Mixin selector official aLcth;a(Lil;)Zintermediary method_57401Lnet/minecraft/class_1844;method_57401(Lnet/minecraft/class_6880;)Znamed method_57401Lnet/minecraft/potion/PotionUtil;method_57401(Lnet/minecraft/registry/entry/RegistryEntry;)Z
-
method_57397
- Mappings:
Namespace Name Mixin selector official aLcth;a()Ljava/lang/Iterable;intermediary method_57397Lnet/minecraft/class_1844;method_57397()Ljava/lang/Iterable;named method_57397Lnet/minecraft/potion/PotionUtil;method_57397()Ljava/lang/Iterable;
-
method_57402
- Mappings:
Namespace Name Mixin selector official aLcth;a(Ljava/util/function/Consumer;)Vintermediary method_57402Lnet/minecraft/class_1844;method_57402(Ljava/util/function/Consumer;)Vnamed method_57402Lnet/minecraft/potion/PotionUtil;method_57402(Ljava/util/function/Consumer;)V
-
method_57403
- Mappings:
Namespace Name Mixin selector official bLcth;b(Lil;)Lcth;intermediary method_57403Lnet/minecraft/class_1844;method_57403(Lnet/minecraft/class_6880;)Lnet/minecraft/class_1844;named method_57403Lnet/minecraft/potion/PotionUtil;method_57403(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/potion/PotionUtil;
-
method_57398
- Mappings:
Namespace Name Mixin selector official aLcth;a(Lbph;)Lcth;intermediary method_57398Lnet/minecraft/class_1844;method_57398(Lnet/minecraft/class_1293;)Lnet/minecraft/class_1844;named method_57398Lnet/minecraft/potion/PotionUtil;method_57398(Lnet/minecraft/entity/effect/StatusEffectInstance;)Lnet/minecraft/potion/PotionUtil;
-
getColor
public int getColor()- Mappings:
Namespace Name Mixin selector official bLcth;b()Iintermediary method_8064Lnet/minecraft/class_1844;method_8064()Inamed getColorLnet/minecraft/potion/PotionUtil;getColor()I
-
method_57404
public int method_57404()- Mappings:
Namespace Name Mixin selector official cLcth;c()Iintermediary method_57404Lnet/minecraft/class_1844;method_57404()Inamed method_57404Lnet/minecraft/potion/PotionUtil;method_57404()I
-
getColor
- Mappings:
Namespace Name Mixin selector official cLcth;c(Lil;)Iintermediary method_8062Lnet/minecraft/class_1844;method_8062(Lnet/minecraft/class_6880;)Inamed getColorLnet/minecraft/potion/PotionUtil;getColor(Lnet/minecraft/registry/entry/RegistryEntry;)I
-
getColor
- Mappings:
Namespace Name Mixin selector official aLcth;a(Ljava/lang/Iterable;)Iintermediary method_8055Lnet/minecraft/class_1844;method_8055(Ljava/lang/Iterable;)Inamed getColorLnet/minecraft/potion/PotionUtil;getColor(Ljava/lang/Iterable;)I
-
method_57405
public boolean method_57405()- Mappings:
Namespace Name Mixin selector official dLcth;d()Zintermediary method_57405Lnet/minecraft/class_1844;method_57405()Znamed method_57405Lnet/minecraft/potion/PotionUtil;method_57405()Z
-
getCustomPotionEffects
Returns the value of thegetCustomPotionEffectsrecord component.- Returns:
- the value of the
getCustomPotionEffectsrecord component
-
buildTooltip
- Mappings:
Namespace Name Mixin selector official aLcth;a(Ljava/util/function/Consumer;FF)Vintermediary method_47372Lnet/minecraft/class_1844;method_47372(Ljava/util/function/Consumer;FF)Vnamed buildTooltipLnet/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 aLcth;a(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)Vintermediary method_8065Lnet/minecraft/class_1844;method_8065(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)Vnamed buildTooltipLnet/minecraft/potion/PotionUtil;buildTooltip(Ljava/lang/Iterable;Ljava/util/function/Consumer;FF)V
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
potion
Returns the value of thepotionrecord component.- Returns:
- the value of the
potionrecord component
-
customColor
Returns the value of thecustomColorrecord component.- Returns:
- the value of the
customColorrecord component
-