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
Entity hide option
  • Field Details

  • 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 all options to single one
      Parameters:
      options - options
      Returns:
      composited option
    • deserialize

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

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

      @NotNull public static @NotNull EntityHideOption.Builder builder()
      Creates builder of hide option.
      Returns:
      builder
    • 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