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 Summary
Modifier and TypeFieldDescriptionprivate final BiomeSource
The field for thebiomeSource
record component.private final ChunkGenerator
The field for thechunkGenerator
record component.private final ChunkPos
The field for thechunkPos
record component.private final LevelHeightAccessor
The field for theheightAccessor
record component.private final WorldgenRandom
The field for therandom
record component.private final RandomState
The field for therandomState
record component.private final RegistryAccess
The field for theregistryAccess
record component.private final long
The field for theseed
record component.private final StructureTemplateManager
The field for thestructureTemplateManager
record component.The field for thevalidBiome
record component. -
Constructor Summary
ConstructorDescriptionGenerationContext
(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 aGenerationContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebiomeSource
record component.Returns the value of thechunkGenerator
record component.chunkPos()
Returns the value of thechunkPos
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theheightAccessor
record component.private static WorldgenRandom
makeRandom
(long p_226654_, ChunkPos p_226655_) random()
Returns the value of therandom
record component.Returns the value of therandomState
record component.Returns the value of theregistryAccess
record component.long
seed()
Returns the value of theseed
record component.Returns the value of thestructureTemplateManager
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thevalidBiome
record component.
-
Field Details
-
registryAccess
The field for theregistryAccess
record component. -
chunkGenerator
The field for thechunkGenerator
record component. -
biomeSource
The field for thebiomeSource
record component. -
randomState
The field for therandomState
record component. -
structureTemplateManager
The field for thestructureTemplateManager
record component. -
random
The field for therandom
record component. -
seed
private final long seedThe field for theseed
record component. -
chunkPos
The field for thechunkPos
record component. -
heightAccessor
The field for theheightAccessor
record component. -
validBiome
The field for thevalidBiome
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 aGenerationContext
record class.- Parameters:
registryAccess
- the value for theregistryAccess
record componentchunkGenerator
- the value for thechunkGenerator
record componentbiomeSource
- the value for thebiomeSource
record componentrandomState
- the value for therandomState
record componentstructureTemplateManager
- the value for thestructureTemplateManager
record componentrandom
- the value for therandom
record componentseed
- the value for theseed
record componentchunkPos
- the value for thechunkPos
record componentheightAccessor
- the value for theheightAccessor
record componentvalidBiome
- the value for thevalidBiome
record component
-
-
Method Details
-
makeRandom
-
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. -
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. -
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 '=='. -
registryAccess
Returns the value of theregistryAccess
record component.- Returns:
- the value of the
registryAccess
record component
-
chunkGenerator
Returns the value of thechunkGenerator
record component.- Returns:
- the value of the
chunkGenerator
record component
-
biomeSource
Returns the value of thebiomeSource
record component.- Returns:
- the value of the
biomeSource
record component
-
randomState
Returns the value of therandomState
record component.- Returns:
- the value of the
randomState
record component
-
structureTemplateManager
Returns the value of thestructureTemplateManager
record component.- Returns:
- the value of the
structureTemplateManager
record component
-
random
Returns the value of therandom
record component.- Returns:
- the value of the
random
record component
-
seed
public long seed()Returns the value of theseed
record component.- Returns:
- the value of the
seed
record component
-
chunkPos
Returns the value of thechunkPos
record component.- Returns:
- the value of the
chunkPos
record component
-
heightAccessor
Returns the value of theheightAccessor
record component.- Returns:
- the value of the
heightAccessor
record component
-
validBiome
Returns the value of thevalidBiome
record component.- Returns:
- the value of the
validBiome
record component
-