Record Class EntityHideOption
java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.EntityHideOption
- Record Components:
equipment- whether to hide equipmentfire- whether to hide burning statevisibility- whether to hide entity's bodyglowing- 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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EntityHideOptionDefault option (hides everything).static final EntityHideOptionDisabled option (hides nothing). -
Constructor Summary
ConstructorsConstructorDescriptionEntityHideOption(boolean equipment, boolean fire, boolean visibility, boolean glowing) Creates an instance of aEntityHideOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull EntityHideOption.Builderbuilder()Creates a new builder forEntityHideOption.static @NotNull EntityHideOptioncomposite(@NotNull Stream<EntityHideOption> options) Composites multiple options into a single one using OR logic.static @NotNull EntityHideOptiondeserialize(@NotNull com.google.gson.JsonArray array) Deserializes hide option from a JSON array.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theequipmentrecord component.booleanfire()Returns the value of thefirerecord component.booleanglowing()Returns the value of theglowingrecord component.final inthashCode()Returns a hash code value for this object.@NotNull com.google.gson.JsonArraySerializes hide option to a JSON array.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thevisibilityrecord component.
-
Field Details
-
DEFAULT
-
FALSE
-
-
Constructor Details
-
EntityHideOption
public EntityHideOption(boolean equipment, boolean fire, boolean visibility, boolean glowing) Creates an instance of aEntityHideOptionrecord class.- Parameters:
equipment- the value for theequipmentrecord componentfire- the value for thefirerecord componentvisibility- the value for thevisibilityrecord componentglowing- the value for theglowingrecord 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
Creates a new builder forEntityHideOption.- Returns:
- the builder
- Since:
- 1.15.2
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
equipment
-
fire
-
visibility
public boolean visibility()Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
glowing
-