Record Class Structure.GenerationContext

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.Structure.GenerationContext
Enclosing class:
Structure

public static record Structure.GenerationContext(RegistryAccess registryAccess, ChunkGenerator chunkGenerator, BiomeSource biomeSource, RandomState randomState, StructureTemplateManager structureTemplateManager, WorldgenRandom random, long seed, ChunkPos chunkPos, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome) extends Record
  • Field Details

    • registryAccess

      private final RegistryAccess registryAccess
      The field for the registryAccess record component.
    • chunkGenerator

      private final ChunkGenerator chunkGenerator
      The field for the chunkGenerator record component.
    • biomeSource

      private final BiomeSource biomeSource
      The field for the biomeSource record component.
    • randomState

      private final RandomState randomState
      The field for the randomState record component.
    • structureTemplateManager

      private final StructureTemplateManager structureTemplateManager
      The field for the structureTemplateManager record component.
    • random

      private final WorldgenRandom random
      The field for the random record component.
    • seed

      private final long seed
      The field for the seed record component.
    • chunkPos

      private final ChunkPos chunkPos
      The field for the chunkPos record component.
    • heightAccessor

      private final LevelHeightAccessor heightAccessor
      The field for the heightAccessor record component.
    • validBiome

      private final Predicate<Holder<Biome>> validBiome
      The field for the validBiome record component.
  • Constructor Details

    • GenerationContext

      public GenerationContext(RegistryAccess p_226632_, ChunkGenerator p_226633_, BiomeSource p_226634_, RandomState p_226635_, StructureTemplateManager p_226636_, long p_226637_, ChunkPos p_226638_, LevelHeightAccessor p_226639_, Predicate<Holder<Biome>> p_226640_)
    • GenerationContext

      public GenerationContext(RegistryAccess registryAccess, ChunkGenerator chunkGenerator, BiomeSource biomeSource, RandomState randomState, StructureTemplateManager structureTemplateManager, WorldgenRandom random, long seed, ChunkPos chunkPos, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome)
      Creates an instance of a GenerationContext record class.
      Parameters:
      registryAccess - the value for the registryAccess record component
      chunkGenerator - the value for the chunkGenerator record component
      biomeSource - the value for the biomeSource record component
      randomState - the value for the randomState record component
      structureTemplateManager - the value for the structureTemplateManager record component
      random - the value for the random record component
      seed - the value for the seed record component
      chunkPos - the value for the chunkPos record component
      heightAccessor - the value for the heightAccessor record component
      validBiome - the value for the validBiome record component
  • Method Details

    • makeRandom

      private static WorldgenRandom makeRandom(long p_226654_, ChunkPos p_226655_)
    • 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 '=='.
      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.
    • registryAccess

      public RegistryAccess registryAccess()
      Returns the value of the registryAccess record component.
      Returns:
      the value of the registryAccess record component
    • chunkGenerator

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

      public BiomeSource biomeSource()
      Returns the value of the biomeSource record component.
      Returns:
      the value of the biomeSource record component
    • randomState

      public RandomState randomState()
      Returns the value of the randomState record component.
      Returns:
      the value of the randomState record component
    • structureTemplateManager

      public StructureTemplateManager structureTemplateManager()
      Returns the value of the structureTemplateManager record component.
      Returns:
      the value of the structureTemplateManager record component
    • random

      public WorldgenRandom random()
      Returns the value of the random record component.
      Returns:
      the value of the random record component
    • seed

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

      public ChunkPos chunkPos()
      Returns the value of the chunkPos record component.
      Returns:
      the value of the chunkPos record component
    • heightAccessor

      public LevelHeightAccessor heightAccessor()
      Returns the value of the heightAccessor record component.
      Returns:
      the value of the heightAccessor record component
    • validBiome

      public Predicate<Holder<Biome>> validBiome()
      Returns the value of the validBiome record component.
      Returns:
      the value of the validBiome record component