Record Class Zone

java.lang.Object
java.lang.Record
com.hypixel.hytale.server.worldgen.zone.Zone
Record Components:
id - The unique identifier of the zone.
name - The name of the zone.
discoveryConfig - The discovery configuration for this zone.
caveGenerator - The cave generator used for this zone, or null if none.
biomePatternGenerator - The biome pattern generator for this zone.
uniquePrefabContainer - The unique prefab container for this zone.

public record Zone(int id, String name, @Nonnull ZoneDiscoveryConfig discoveryConfig, @Nullable CaveGenerator caveGenerator, @Nonnull BiomePatternGenerator biomePatternGenerator, @Nonnull UniquePrefabContainer uniquePrefabContainer) extends Record
A zone represents a large area in the world with specific characteristics,
  • Constructor Details

    • Zone

      public Zone(int id, @Nonnull String name, @Nonnull ZoneDiscoveryConfig discoveryConfig, @Nullable CaveGenerator caveGenerator, @Nonnull BiomePatternGenerator biomePatternGenerator, @Nonnull UniquePrefabContainer uniquePrefabContainer)
      Default Constructor for a Zone instance.
      Parameters:
      id - The unique identifier of the zone.
      name - The name of the zone.
      discoveryConfig - The discovery configuration for this zone.
      caveGenerator - The cave generator used for this zone, or null if none.
      biomePatternGenerator - The biome pattern generator for this zone.
      uniquePrefabContainer - The unique prefab container for this zone.
  • Method Details

    • id

      public int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • discoveryConfig

      @Nonnull public ZoneDiscoveryConfig discoveryConfig()
      Returns the value of the discoveryConfig record component.
      Returns:
      the value of the discoveryConfig record component
    • biomePatternGenerator

      @Nonnull public BiomePatternGenerator biomePatternGenerator()
      Returns the value of the biomePatternGenerator record component.
      Returns:
      the value of the biomePatternGenerator record component
    • caveGenerator

      @Nullable public CaveGenerator caveGenerator()
      Returns the value of the caveGenerator record component.
      Returns:
      the value of the caveGenerator record component
    • uniquePrefabContainer

      @Nonnull public UniquePrefabContainer uniquePrefabContainer()
      Returns the value of the uniquePrefabContainer record component.
      Returns:
      the value of the uniquePrefabContainer record component
    • hashCode

      public 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
    • toString

      @Nonnull public 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
    • 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.