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 SummaryFieldsModifier and TypeFieldDescriptionprivate final BiomeSourceThe field for thebiomeSourcerecord component.private final ChunkGeneratorThe field for thechunkGeneratorrecord component.private final ChunkPosThe field for thechunkPosrecord component.private final LevelHeightAccessorThe field for theheightAccessorrecord component.private final WorldgenRandomThe field for therandomrecord component.private final RandomStateThe field for therandomStaterecord component.private final RegistryAccessThe field for theregistryAccessrecord component.private final longThe field for theseedrecord component.private final StructureTemplateManagerThe field for thestructureTemplateManagerrecord component.The field for thevalidBiomerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionGenerationContext(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(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 aGenerationContextrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thebiomeSourcerecord component.Returns the value of thechunkGeneratorrecord component.chunkPos()Returns the value of thechunkPosrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheightAccessorrecord component.private static WorldgenRandommakeRandom(long p_226654_, ChunkPos p_226655_) random()Returns the value of therandomrecord component.Returns the value of therandomStaterecord component.Returns the value of theregistryAccessrecord component.longseed()Returns the value of theseedrecord component.Returns the value of thestructureTemplateManagerrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalidBiomerecord component.
- 
Field Details- 
registryAccessThe field for theregistryAccessrecord component.
- 
chunkGeneratorThe field for thechunkGeneratorrecord component.
- 
biomeSourceThe field for thebiomeSourcerecord component.
- 
randomStateThe field for therandomStaterecord component.
- 
structureTemplateManagerThe field for thestructureTemplateManagerrecord component.
- 
randomThe field for therandomrecord component.
- 
seedprivate final long seedThe field for theseedrecord component.
- 
chunkPosThe field for thechunkPosrecord component.
- 
heightAccessorThe field for theheightAccessorrecord component.
- 
validBiomeThe field for thevalidBiomerecord component.
 
- 
- 
Constructor Details- 
GenerationContextpublic 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_) 
- 
GenerationContextpublic 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 aGenerationContextrecord class.- Parameters:
- registryAccess- the value for the- registryAccessrecord component
- chunkGenerator- the value for the- chunkGeneratorrecord component
- biomeSource- the value for the- biomeSourcerecord component
- randomState- the value for the- randomStaterecord component
- structureTemplateManager- the value for the- structureTemplateManagerrecord component
- random- the value for the- randomrecord component
- seed- the value for the- seedrecord component
- chunkPos- the value for the- chunkPosrecord component
- heightAccessor- the value for the- heightAccessorrecord component
- validBiome- the value for the- validBiomerecord component
 
 
- 
- 
Method Details- 
makeRandom
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
registryAccessReturns the value of theregistryAccessrecord component.- Returns:
- the value of the registryAccessrecord component
 
- 
chunkGeneratorReturns the value of thechunkGeneratorrecord component.- Returns:
- the value of the chunkGeneratorrecord component
 
- 
biomeSourceReturns the value of thebiomeSourcerecord component.- Returns:
- the value of the biomeSourcerecord component
 
- 
randomStateReturns the value of therandomStaterecord component.- Returns:
- the value of the randomStaterecord component
 
- 
structureTemplateManagerReturns the value of thestructureTemplateManagerrecord component.- Returns:
- the value of the structureTemplateManagerrecord component
 
- 
randomReturns the value of therandomrecord component.- Returns:
- the value of the randomrecord component
 
- 
seedpublic long seed()Returns the value of theseedrecord component.- Returns:
- the value of the seedrecord component
 
- 
chunkPosReturns the value of thechunkPosrecord component.- Returns:
- the value of the chunkPosrecord component
 
- 
heightAccessorReturns the value of theheightAccessorrecord component.- Returns:
- the value of the heightAccessorrecord component
 
- 
validBiomeReturns the value of thevalidBiomerecord component.- Returns:
- the value of the validBiomerecord component
 
 
-