Class AstralPotion
java.lang.Object
net.minecraft.potion.Potion
dev.jaxydog.astral.content.effect.AstralPotion
- All Implemented Interfaces:
Registered,Registered.Common
An extension of a
Potion that provides commonly used functionality.
This type is automatically registered.
- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDefines the data for a potion recipe.Nested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Constructor Summary
ConstructorsConstructorDescriptionAstralPotion(String path, @Nullable AstralPotion.Recipe recipe, net.minecraft.entity.effect.StatusEffectInstance... effects) Creates a new potion.AstralPotion(String path, net.minecraft.entity.effect.StatusEffectInstance... effects) Creates a new potion. -
Method Summary
Modifier and TypeMethodDescriptionReturns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class net.minecraft.potion.Potion
byId, finishTranslationKey, getEffects, hasInstantEffectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryId
-
Constructor Details
-
AstralPotion
public AstralPotion(String path, @Nullable @Nullable AstralPotion.Recipe recipe, net.minecraft.entity.effect.StatusEffectInstance... effects) Creates a new potion.- Parameters:
path- The potion's identifier path.recipe- The potion's recipe.effects- The potion's status effects.- Since:
- 2.0.0
-
AstralPotion
Creates a new potion.- Parameters:
path- The potion's identifier path.effects- The potion's status effects.- Since:
- 2.0.0
-
-
Method Details
-
getRegistryPath
Description copied from interface:RegisteredReturns this value's associated registry identifier path.This is by default used to determine the
Identifierprovided byRegistered.getRegistryId(). For example, returning"my_item"will cause the associated identifier to beastral:my_item.- Specified by:
getRegistryPathin interfaceRegistered- Returns:
- An identifier path.
-
registerCommon
public void registerCommon()Description copied from interface:Registered.CommonRegisters this value on both the client and server environments.The contained code will run for both environments. If you only want one or the other, see its sister interfaces.
- Specified by:
registerCommonin interfaceRegistered.Common- See Also:
-