Class EntityAttribute

java.lang.Object
me.gamercoder215.mobchip.ai.attribute.EntityAttribute
All Implemented Interfaces:
Attribute, Keyed

public final class EntityAttribute extends Object implements Attribute
Represents an Entity's Attribute
  • Field Details

  • Method Details

    • fromBukkit

      @Nullable public static @Nullable Attribute fromBukkit(@Nullable Attribute attribute)
      Converts a Bukkit Attribute to a MobChip Attribute.
      Parameters:
      attribute - Bukkit Attribute
      Returns:
      MobChip Attribute, or null if Attribute is null
    • builder

      public static EntityAttribute.Builder builder()
      Fetches the EntityAttribute Builder.
      Returns:
      Attribute Builder
    • getMinValue

      public double getMinValue()
      Description copied from interface: Attribute
      Fetches the minimum value of this Attribute.
      Specified by:
      getMinValue in interface Attribute
      Returns:
      Minimum value
    • getMaxValue

      public double getMaxValue()
      Description copied from interface: Attribute
      Fetches the maximum value of this Attribute
      Specified by:
      getMaxValue in interface Attribute
      Returns:
      Maximum value
    • getDefaultValue

      public double getDefaultValue()
      Description copied from interface: Attribute
      Fetches the Default value of this Attribute
      Specified by:
      getDefaultValue in interface Attribute
      Returns:
      Default value
    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Specified by:
      getKey in interface Keyed
    • isClientSide

      public boolean isClientSide()
      Description copied from interface: Attribute
      Whether this Attribute will sync and appear on the client's side.
      Specified by:
      isClientSide in interface Attribute
      Returns:
      true if also client side, else false
    • getAttribute

      @Nullable public static @Nullable EntityAttribute getAttribute(@Nullable @Nullable NamespacedKey key)
      Fetches an EntityAttribute from the Minecraft registrar.
      Parameters:
      key - Key of the Attribute
      Returns:
      Attribute found, or null if not found
    • exists

      public static boolean exists(@Nullable @Nullable NamespacedKey key)
      Whether an Attribute exists in the Minecraft registrar.
      Parameters:
      key - Key of the Attribute
      Returns:
      true if attribute exists, else false