Class Potion

java.lang.Object
net.minecraft.potion.Potion
All Implemented Interfaces:
ToggleableFeature

public class Potion extends Object implements ToggleableFeature
Mappings:
Namespace Name
named net/minecraft/potion/Potion
intermediary net/minecraft/class_1842
official cwc
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<Potion>> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/potion/Potion;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51947 Lnet/minecraft/class_1842;field_51947:Lcom/mojang/serialization/Codec;
      official a Lcwc;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RegistryEntry<Potion>> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/potion/Potion;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_51948 Lnet/minecraft/class_1842;field_51948:Lnet/minecraft/class_9139;
      official b Lcwc;b:Lys;
    • baseName

      @Nullable private final @Nullable String baseName
      Mappings:
      Namespace Name Mixin selector
      named baseName Lnet/minecraft/potion/Potion;baseName:Ljava/lang/String;
      intermediary field_8954 Lnet/minecraft/class_1842;field_8954:Ljava/lang/String;
      official c Lcwc;c:Ljava/lang/String;
    • effects

      private final List<StatusEffectInstance> effects
      Mappings:
      Namespace Name Mixin selector
      named effects Lnet/minecraft/potion/Potion;effects:Ljava/util/List;
      intermediary field_8955 Lnet/minecraft/class_1842;field_8955:Ljava/util/List;
      official d Lcwc;d:Ljava/util/List;
    • requiredFeatures

      private FeatureSet requiredFeatures
      Mappings:
      Namespace Name Mixin selector
      named requiredFeatures Lnet/minecraft/potion/Potion;requiredFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary field_50152 Lnet/minecraft/class_1842;field_50152:Lnet/minecraft/class_7699;
      official e Lcwc;e:Lcoz;
  • Constructor Details

    • Potion

      public Potion(StatusEffectInstance[] effects)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/potion/Potion;<init>([Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary <init> Lnet/minecraft/class_1842;<init>([Lnet/minecraft/class_1293;)V
      official <init> Lcwc;<init>([Lbrp;)V
    • Potion

      public Potion(@Nullable @Nullable String baseName, StatusEffectInstance[] effects)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/potion/Potion;<init>(Ljava/lang/String;[Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary <init> Lnet/minecraft/class_1842;<init>(Ljava/lang/String;[Lnet/minecraft/class_1293;)V
      official <init> Lcwc;<init>(Ljava/lang/String;[Lbrp;)V
  • Method Details

    • requires

      public Potion requires(FeatureFlag[] requiredFeatures)
      Mappings:
      Namespace Name Mixin selector
      named requires Lnet/minecraft/potion/Potion;requires([Lnet/minecraft/resource/featuretoggle/FeatureFlag;)Lnet/minecraft/potion/Potion;
      intermediary method_58671 Lnet/minecraft/class_1842;method_58671([Lnet/minecraft/class_7696;)Lnet/minecraft/class_1842;
      official a Lcwc;a([Lcox;)Lcwc;
    • getRequiredFeatures

      public FeatureSet getRequiredFeatures()
      Specified by:
      getRequiredFeatures in interface ToggleableFeature
      Mappings:
      Namespace Name Mixin selector
      named getRequiredFeatures Lnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;
      intermediary method_45322 Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699;
      official i Lcow;i()Lcoz;
    • finishTranslationKey

      public static String finishTranslationKey(Optional<RegistryEntry<Potion>> potion, String prefix)
      Mappings:
      Namespace Name Mixin selector
      named finishTranslationKey Lnet/minecraft/potion/Potion;finishTranslationKey(Ljava/util/Optional;Ljava/lang/String;)Ljava/lang/String;
      intermediary method_8051 Lnet/minecraft/class_1842;method_8051(Ljava/util/Optional;Ljava/lang/String;)Ljava/lang/String;
      official a Lcwc;a(Ljava/util/Optional;Ljava/lang/String;)Ljava/lang/String;
    • getEffects

      public List<StatusEffectInstance> getEffects()
      Mappings:
      Namespace Name Mixin selector
      named getEffects Lnet/minecraft/potion/Potion;getEffects()Ljava/util/List;
      intermediary method_8049 Lnet/minecraft/class_1842;method_8049()Ljava/util/List;
      official a Lcwc;a()Ljava/util/List;
    • hasInstantEffect

      public boolean hasInstantEffect()
      Mappings:
      Namespace Name Mixin selector
      named hasInstantEffect Lnet/minecraft/potion/Potion;hasInstantEffect()Z
      intermediary method_8050 Lnet/minecraft/class_1842;method_8050()Z
      official b Lcwc;b()Z