Package net.minecraft.world.item.alchemy
Class Potion
java.lang.Object
net.minecraft.world.item.alchemy.Potion
- All Implemented Interfaces:
FeatureElement
Defines a type of potion in the game. These are used to associate one or more effects with items such as the bottled potion or the tipped arrows.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<MobEffectInstance> private final String
The base name for the potion type.private FeatureFlagSet
static final StreamCodec
<RegistryFriendlyByteBuf, Holder<Potion>> Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
ConstructorsConstructorDescriptionPotion
(String pName, MobEffectInstance... pEffects) Potion
(MobEffectInstance... pEffects) -
Method Summary
Modifier and TypeMethodDescriptionstatic String
boolean
requiredFeatures
(FeatureFlag... pRequiredFeatures) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
-
Field Details
-
CODEC
-
STREAM_CODEC
-
name
The base name for the potion type. -
effects
-
requiredFeatures
-
-
Constructor Details
-
Potion
-
Potion
-
-
Method Details
-
requiredFeatures
-
requiredFeatures
- Specified by:
requiredFeatures
in interfaceFeatureElement
-
getName
-
getEffects
-
hasInstantEffects
public boolean hasInstantEffects()
-