Class AstralMetaCondition

java.lang.Object
dev.jaxydog.astral.content.power.AstralMetaCondition
All Implemented Interfaces:
Registered, Registered.Common

public abstract class AstralMetaCondition extends Object implements Registered.Common
An abstract class for easily implementing custom Origins conditions with multiple data types.

This type is automatically registered.

Since:
2.0.0
  • Constructor Details

    • AstralMetaCondition

      public AstralMetaCondition(String path)
      Creates a new meta condition.
      Parameters:
      path - The condition's identifier path.
      Since:
      2.0.0
  • Method Details

    • test

      public abstract <T> boolean test(io.github.apace100.calio.data.SerializableData.Instance data, T value)
      Tests the condition.
      Parameters:
      data - The condition's associated data.
      value - The value to test.
      Since:
      2.0.0
    • factory

      public abstract <T> AstralConditionFactory<T> factory(io.github.apace100.calio.data.SerializableDataType<io.github.apace100.apoli.power.factory.condition.ConditionFactory<T>.io.github.apace100.apoli.power.factory.condition.ConditionFactory.Instance> type)
      Returns the condition's associated factory.
      Type Parameters:
      T - The type of the value to test.
      Parameters:
      type - The condition's type.
      Returns:
      The condition's associated factory.
      Since:
      2.0.0
    • 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.
    • 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: