Record Class WorldContext

java.lang.Object
java.lang.Record
dev.wyck.worldgen.WorldContext
Record Components:
resourceKey - the world's key
uuid - the world's UUID
seed - the world's seed
minHeight - the world's minimum height
maxHeight - the world's maximum height
dimension - the world's dimension
chunkGenerator - the world's chunk generator
bukkitName - the world's name, obsolete
environment - the world's environment
All Implemented Interfaces:
Keyed

@NullMarked @AsOf("3.4.0") public record WorldContext(ResourceKey resourceKey, UUID uuid, long seed, int minHeight, int maxHeight, Dimension dimension, ChunkGenerator chunkGenerator, String bukkitName, World.Environment environment) extends Record implements Keyed
Information about a world. Wyck's version of WorldInfo.
Since:
3.4.0
See Also:
  • Constructor Details

    • WorldContext

      @Internal public WorldContext(ResourceKey resourceKey, UUID uuid, long seed, int minHeight, int maxHeight, Dimension dimension, ChunkGenerator chunkGenerator, String bukkitName, World.Environment environment)
      Creates an instance of a WorldContext record class.
      Parameters:
      resourceKey - the value for the resourceKey record component
      uuid - the value for the uuid record component
      seed - the value for the seed record component
      minHeight - the value for the minHeight record component
      maxHeight - the value for the maxHeight record component
      dimension - the value for the dimension record component
      chunkGenerator - the value for the chunkGenerator record component
      bukkitName - the value for the bukkitName record component
      environment - the value for the environment record component
  • Method Details

    • key

      public Key key()
      Specified by:
      key in interface Keyed
    • name

      @AsOf("3.4.0") public String name()
    • uid

      @AsOf("3.4.0") public UUID uid()
    • uniqueId

      @AsOf("3.4.0") public UUID uniqueId()
    • generator

      @AsOf("3.4.0") public ChunkGenerator generator()
    • 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.
    • resourceKey

      public ResourceKey resourceKey()
      Returns the value of the resourceKey record component.
      Returns:
      the value of the resourceKey record component
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • seed

      public long seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component
    • minHeight

      public int minHeight()
      Returns the value of the minHeight record component.
      Returns:
      the value of the minHeight record component
    • maxHeight

      public int maxHeight()
      Returns the value of the maxHeight record component.
      Returns:
      the value of the maxHeight record component
    • dimension

      public Dimension dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • chunkGenerator

      public ChunkGenerator chunkGenerator()
      Returns the value of the chunkGenerator record component.
      Returns:
      the value of the chunkGenerator record component
    • bukkitName

      public String bukkitName()
      Returns the value of the bukkitName record component.
      Returns:
      the value of the bukkitName record component
    • environment

      public World.Environment environment()
      Returns the value of the environment record component.
      Returns:
      the value of the environment record component