Package dev.jaxydog.astral.content.power
Class AstralPowerFactory<P extends io.github.apace100.apoli.power.Power>
java.lang.Object
io.github.apace100.apoli.power.factory.PowerFactory<P>
dev.jaxydog.astral.content.power.AstralPowerFactory<P>
- All Implemented Interfaces:
Registered,Registered.Common,io.github.apace100.apoli.power.factory.Factory
public class AstralPowerFactory<P extends io.github.apace100.apoli.power.Power>
extends io.github.apace100.apoli.power.factory.PowerFactory<P>
implements Registered.Common
An extension of a
PowerFactory that provides additional functionality.
This type is automatically registered.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.apace100.apoli.power.factory.PowerFactory
io.github.apace100.apoli.power.factory.PowerFactory.InstanceNested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Field Summary
Fields inherited from class io.github.apace100.apoli.power.factory.PowerFactory
data, factoryConstructor -
Constructor Summary
ConstructorsConstructorDescriptionAstralPowerFactory(String path, io.github.apace100.calio.data.SerializableData data, Function<io.github.apace100.calio.data.SerializableData.Instance, BiFunction<io.github.apace100.apoli.power.PowerType<P>, net.minecraft.entity.LivingEntity, P>> constructor) Creates a new power factory. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.IdentifierReturns this value's associated registry identifier.Returns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class io.github.apace100.apoli.power.factory.PowerFactory
getSerializableData, getSerializerId, read, read
-
Constructor Details
-
AstralPowerFactory
public AstralPowerFactory(String path, io.github.apace100.calio.data.SerializableData data, Function<io.github.apace100.calio.data.SerializableData.Instance, BiFunction<io.github.apace100.apoli.power.PowerType<P>, net.minecraft.entity.LivingEntity, P>> constructor) Creates a new power factory.- Parameters:
path- The factory's identifier path.data- The factory's serialization data.constructor- The factory's power constructor.- Since:
- 2.0.0
-
-
Method Details
-
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:
-
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.
-
getRegistryId
public net.minecraft.util.Identifier getRegistryId()Description copied from interface:RegisteredReturns this value's associated registry identifier.This is used to uniquely distinguish this instance from other equally-typed instances.
- Specified by:
getRegistryIdin interfaceRegistered- Returns:
- A new identifier.
-
allowCondition
- Overrides:
allowConditionin classio.github.apace100.apoli.power.factory.PowerFactory<P extends io.github.apace100.apoli.power.Power>
-