Class SlimeProperty<T,Z extends net.kyori.adventure.nbt.BinaryTag>

java.lang.Object
com.infernalsuite.asp.api.world.properties.SlimeProperty<T,Z>
Direct Known Subclasses:
SlimePropertyBoolean, SlimePropertyByte, SlimePropertyByteArray, SlimePropertyDouble, SlimePropertyFloat, SlimePropertyInt, SlimePropertyIntArray, SlimePropertyList, SlimePropertyLong, SlimePropertyLongArray, SlimePropertyShort, SlimePropertyString

public abstract class SlimeProperty<T,Z extends net.kyori.adventure.nbt.BinaryTag> extends Object
A property describing behavior of a slime world.
  • Constructor Details

    • SlimeProperty

      protected SlimeProperty(String key, T defaultValue)
    • SlimeProperty

      protected SlimeProperty(String key, T defaultValue, Function<T,Boolean> validator)
  • Method Details

    • createTag

      protected abstract Z createTag(T value)
    • readValue

      protected abstract T readValue(Z tag)
    • cast

      protected abstract Z cast(net.kyori.adventure.nbt.BinaryTag rawTag)
    • applyValidator

      public final boolean applyValidator(T value)
    • getKey

      public final String getKey()
    • getDefaultValue

      public final T getDefaultValue()
    • getValidator

      public final Function<T,Boolean> getValidator()
    • toString

      public final String toString()
      Overrides:
      toString in class Object