Record Class EntityHideOption

java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.EntityHideOption
Record Components:
equipment - whether to hide equipment
fire - whether to hide burning state
visibility - whether to hide entity's body
glowing - whether to hide entity's glowing state

public record EntityHideOption(boolean equipment, boolean fire, boolean visibility, boolean glowing) extends Record
Configuration for hiding various visual aspects of an entity.

This record allows selective hiding of equipment, fire effects, the entity body itself, and glowing effects.

Since:
1.15.2
  • Field Details

    • DEFAULT

      public static final EntityHideOption DEFAULT
      Default option (hides everything).
      Since:
      1.15.2
    • FALSE

      public static final EntityHideOption FALSE
      Disabled option (hides nothing).
      Since:
      1.15.2
  • Constructor Details

    • EntityHideOption

      public EntityHideOption(boolean equipment, boolean fire, boolean visibility, boolean glowing)
      Creates an instance of a EntityHideOption record class.
      Parameters:
      equipment - the value for the equipment record component
      fire - the value for the fire record component
      visibility - the value for the visibility record component
      glowing - the value for the glowing record component
  • Method Details

    • composite

      @NotNull public static @NotNull EntityHideOption composite(@NotNull @NotNull Stream<EntityHideOption> options)
      Composites multiple options into a single one using OR logic.
      Parameters:
      options - the stream of options
      Returns:
      the composited option
      Since:
      1.15.2
    • deserialize

      @NotNull public static @NotNull EntityHideOption deserialize(@NotNull @NotNull com.google.gson.JsonArray array)
      Deserializes hide option from a JSON array.
      Parameters:
      array - the JSON array
      Returns:
      the option
      Since:
      1.15.2
    • serialize

      @NotNull public @NotNull com.google.gson.JsonArray serialize()
      Serializes hide option to a JSON array.
      Returns:
      the JSON array
      Since:
      1.15.2
    • builder

      @NotNull public static @NotNull EntityHideOption.Builder builder()
      Creates a new builder for EntityHideOption.
      Returns:
      the builder
      Since:
      1.15.2
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • equipment

      public boolean equipment()
      Returns the value of the equipment record component.
      Returns:
      the value of the equipment record component
    • fire

      public boolean fire()
      Returns the value of the fire record component.
      Returns:
      the value of the fire record component
    • visibility

      public boolean visibility()
      Returns the value of the visibility record component.
      Returns:
      the value of the visibility record component
    • glowing

      public boolean glowing()
      Returns the value of the glowing record component.
      Returns:
      the value of the glowing record component