Record Class ZoneDiscoveryConfig

java.lang.Object
java.lang.Record
com.hypixel.hytale.server.worldgen.zone.ZoneDiscoveryConfig
Record Components:
display - Whether to display the discovery title and play the discovery sound.
zone - The major zone name this region belongs to.
soundEventId - The sound event ID played when discovering this zone, or null if none.
icon - The icon to display with the event title, or null if none.
major - Whether this zone is considered a major zone for discovery purposes.
duration - The duration to display the event title for, in seconds.
fadeInDuration - The fade-in duration for the event title, in seconds.
fadeOutDuration - The fade-out duration for the event title, in seconds.

public record ZoneDiscoveryConfig(boolean display, String zone, @Nullable String soundEventId, @Nullable String icon, boolean major, float duration, float fadeInDuration, float fadeOutDuration) extends Record
Configuration for zone discovery behavior, including the sound played and event title display settings.
  • Field Details

    • DEFAULT

      @Nonnull public static final ZoneDiscoveryConfig DEFAULT
      Default discovery configuration with display disabled, no sound, no icon, major zone, and default durations.
  • Constructor Details

    • ZoneDiscoveryConfig

      public ZoneDiscoveryConfig(boolean display, String zone, @Nullable String soundEventId, @Nullable String icon, boolean major, float duration, float fadeInDuration, float fadeOutDuration)
      Creates an instance of a ZoneDiscoveryConfig record class.
      Parameters:
      display - the value for the display record component
      zone - the value for the zone record component
      soundEventId - the value for the soundEventId record component
      icon - the value for the icon record component
      major - the value for the major record component
      duration - the value for the duration record component
      fadeInDuration - the value for the fadeInDuration record component
      fadeOutDuration - the value for the fadeOutDuration record component
  • Method Details

    • of

      @Nonnull public static ZoneDiscoveryConfig of(@Nullable Boolean display, @Nullable String zone, @Nullable String soundEventId, @Nullable String icon, @Nullable Boolean major, @Nullable Float duration, @Nullable Float fadeInDuration, @Nullable Float fadeOutDuration)
      Creates a new ZoneDiscoveryConfig with the given values, using default values from EventTitleUtil where not specified.
      Parameters:
      display - Whether to display the discovery title and play the discovery sound, or null to default to false.
      zone - The major zone name to display as a subtitle, or null if none.
      soundEventId - The sound event ID played when discovering this zone, or null if none.
      icon - The icon to display with the event title, or null if none.
      major - Whether this zone is considered a major zone for discovery purposes.
      duration - The duration to display the event title for, or null to use the default.
      fadeInDuration - The fade-in duration, or null to use the default.
      fadeOutDuration - The fade-out duration, or null to use the default.
      Returns:
      A new ZoneDiscoveryConfig instance.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • display

      public boolean display()
      Returns the value of the display record component.
      Returns:
      the value of the display record component
    • zone

      public String zone()
      Returns the value of the zone record component.
      Returns:
      the value of the zone record component
    • soundEventId

      @Nullable public String soundEventId()
      Returns the value of the soundEventId record component.
      Returns:
      the value of the soundEventId record component
    • icon

      @Nullable public String icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • major

      public boolean major()
      Returns the value of the major record component.
      Returns:
      the value of the major record component
    • duration

      public float duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • fadeInDuration

      public float fadeInDuration()
      Returns the value of the fadeInDuration record component.
      Returns:
      the value of the fadeInDuration record component
    • fadeOutDuration

      public float fadeOutDuration()
      Returns the value of the fadeOutDuration record component.
      Returns:
      the value of the fadeOutDuration record component