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 StringThe base name for the potion type.private FeatureFlagSetstatic 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 StringbooleanrequiredFeatures(FeatureFlag... pRequiredFeatures) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
requiredFeaturesin interfaceFeatureElement
-
getName
-
getEffects
-
hasInstantEffects
public boolean hasInstantEffects()
-