Contents
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, ornullif none.icon- The icon to display with the event title, ornullif 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final ZoneDiscoveryConfigDefault discovery configuration with display disabled, no sound, no icon, major zone, and default durations. -
Constructor Summary
ConstructorsConstructorDescriptionZoneDiscoveryConfig(boolean display, String zone, String soundEventId, String icon, boolean major, float duration, float fadeInDuration, float fadeOutDuration) Creates an instance of aZoneDiscoveryConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandisplay()Returns the value of thedisplayrecord component.floatduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefadeInDurationrecord component.floatReturns the value of thefadeOutDurationrecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.booleanmajor()Returns the value of themajorrecord component.static ZoneDiscoveryConfigof(Boolean display, String zone, String soundEventId, String icon, Boolean major, Float duration, Float fadeInDuration, Float fadeOutDuration) Creates a newZoneDiscoveryConfigwith the given values, using default values fromEventTitleUtilwhere not specified.Returns the value of thesoundEventIdrecord component.final StringtoString()Returns a string representation of this record class.zone()Returns the value of thezonerecord component.
-
Field Details
-
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 aZoneDiscoveryConfigrecord class.- Parameters:
display- the value for thedisplayrecord componentzone- the value for thezonerecord componentsoundEventId- the value for thesoundEventIdrecord componenticon- the value for theiconrecord componentmajor- the value for themajorrecord componentduration- the value for thedurationrecord componentfadeInDuration- the value for thefadeInDurationrecord componentfadeOutDuration- the value for thefadeOutDurationrecord 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 newZoneDiscoveryConfigwith the given values, using default values fromEventTitleUtilwhere not specified.- Parameters:
display- Whether to display the discovery title and play the discovery sound, ornullto default tofalse.zone- The major zone name to display as a subtitle, ornullif none.soundEventId- The sound event ID played when discovering this zone, ornullif none.icon- The icon to display with the event title, ornullif none.major- Whether this zone is considered a major zone for discovery purposes.duration- The duration to display the event title for, ornullto use the default.fadeInDuration- The fade-in duration, ornullto use the default.fadeOutDuration- The fade-out duration, ornullto use the default.- Returns:
- A new
ZoneDiscoveryConfiginstance.
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
display
-
zone
-
soundEventId
Returns the value of thesoundEventIdrecord component.- Returns:
- the value of the
soundEventIdrecord component
-
icon
-
major
-
duration
-
fadeInDuration
public float fadeInDuration()Returns the value of thefadeInDurationrecord component.- Returns:
- the value of the
fadeInDurationrecord component
-
fadeOutDuration
public float fadeOutDuration()Returns the value of thefadeOutDurationrecord component.- Returns:
- the value of the
fadeOutDurationrecord component
-