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.Instance

    Nested 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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    net.minecraft.util.Identifier
    Returns this value's associated registry identifier.
    Returns this value's associated registry identifier path.
    void
    Registers this value on both the client and server environments.

    Methods inherited from class io.github.apace100.apoli.power.factory.PowerFactory

    getSerializableData, getSerializerId, read, read

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.Common
      Registers 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:
      registerCommon in interface Registered.Common
      See Also:
    • getRegistryPath

      public String getRegistryPath()
      Description copied from interface: Registered
      Returns this value's associated registry identifier path.

      This is by default used to determine the Identifier provided by Registered.getRegistryId(). For example, returning "my_item" will cause the associated identifier to be astral:my_item.

      Specified by:
      getRegistryPath in interface Registered
      Returns:
      An identifier path.
    • getRegistryId

      public net.minecraft.util.Identifier getRegistryId()
      Description copied from interface: Registered
      Returns this value's associated registry identifier.

      This is used to uniquely distinguish this instance from other equally-typed instances.

      Specified by:
      getRegistryId in interface Registered
      Returns:
      A new identifier.
    • allowCondition

      public AstralPowerFactory<P> allowCondition()
      Overrides:
      allowCondition in class io.github.apace100.apoli.power.factory.PowerFactory<P extends io.github.apace100.apoli.power.Power>