Package dev.jaxydog.astral.content.power
Class AstralActionFactory<T>
java.lang.Object
io.github.apace100.apoli.power.factory.action.ActionFactory<T>
dev.jaxydog.astral.content.power.AstralActionFactory<T>
- All Implemented Interfaces:
Registered,io.github.apace100.apoli.power.factory.Factory
public class AstralActionFactory<T>
extends io.github.apace100.apoli.power.factory.action.ActionFactory<T>
implements Registered
An extension of an
ActionFactory that provides additional functionality.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.apace100.apoli.power.factory.action.ActionFactory
io.github.apace100.apoli.power.factory.action.ActionFactory.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.action.ActionFactory
data -
Constructor Summary
ConstructorsConstructorDescriptionAstralActionFactory(String path, io.github.apace100.calio.data.SerializableData data, BiConsumer<io.github.apace100.calio.data.SerializableData.Instance, T> effect) Creates a new action factory. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.IdentifierReturns this value's associated registry identifier.Returns this value's associated registry identifier path.voidregister(net.minecraft.registry.Registry<io.github.apace100.apoli.power.factory.action.ActionFactory<T>> registry) Registers this factory within the provided registry.Methods inherited from class io.github.apace100.apoli.power.factory.action.ActionFactory
getSerializableData, getSerializerId, read, read
-
Constructor Details
-
AstralActionFactory
public AstralActionFactory(String path, io.github.apace100.calio.data.SerializableData data, BiConsumer<io.github.apace100.calio.data.SerializableData.Instance, T> effect) Creates a new action factory.- Parameters:
path- The factory's identifier path.data- The factory's serialization data.effect- The factory's executed action.- Since:
- 2.0.0
-
-
Method Details
-
register
public void register(net.minecraft.registry.Registry<io.github.apace100.apoli.power.factory.action.ActionFactory<T>> registry) Registers this factory within the provided registry.- Parameters:
registry- The target registry.- Since:
- 2.0.0
-
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.
-