Record Class PieceGeneratorSupplier.Context<C extends FeatureConfiguration>
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplier.Context<C>
- Enclosing interface:
- PieceGeneratorSupplier<C extends FeatureConfiguration>
public static record PieceGeneratorSupplier.Context<C extends FeatureConfiguration>(ChunkGenerator chunkGenerator, BiomeSource biomeSource, RandomState randomState, long seed, ChunkPos chunkPos, C extends FeatureConfiguration config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureTemplateManager structureTemplateManager, RegistryAccess registryAccess)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiomeSourceThe field for thebiomeSourcerecord component.private final ChunkGeneratorThe field for thechunkGeneratorrecord component.private final ChunkPosThe field for thechunkPosrecord component.private final CThe field for theconfigrecord component.private final LevelHeightAccessorThe field for theheightAccessorrecord 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 Summary
ConstructorsConstructorDescriptionContext(ChunkGenerator chunkGenerator, BiomeSource biomeSource, RandomState randomState, long seed, ChunkPos chunkPos, C config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureTemplateManager structureTemplateManager, RegistryAccess registryAccess) Creates an instance of aContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebiomeSourcerecord component.Returns the value of thechunkGeneratorrecord component.chunkPos()Returns the value of thechunkPosrecord component.config()Returns the value of theconfigrecord 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.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.booleanvalidBiomeOnTop(Heightmap.Types p_197381_)
-
Field Details
-
chunkGenerator
The field for thechunkGeneratorrecord component. -
biomeSource
The field for thebiomeSourcerecord component. -
randomState
The field for therandomStaterecord component. -
seed
private final long seedThe field for theseedrecord component. -
chunkPos
The field for thechunkPosrecord component. -
config
The field for theconfigrecord component. -
heightAccessor
The field for theheightAccessorrecord component. -
validBiome
The field for thevalidBiomerecord component. -
structureTemplateManager
The field for thestructureTemplateManagerrecord component. -
registryAccess
The field for theregistryAccessrecord component.
-
-
Constructor Details
-
Context
public Context(ChunkGenerator chunkGenerator, BiomeSource biomeSource, RandomState randomState, long seed, ChunkPos chunkPos, C config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureTemplateManager structureTemplateManager, RegistryAccess registryAccess) Creates an instance of aContextrecord class.- Parameters:
chunkGenerator- the value for thechunkGeneratorrecord componentbiomeSource- the value for thebiomeSourcerecord componentrandomState- the value for therandomStaterecord componentseed- the value for theseedrecord componentchunkPos- the value for thechunkPosrecord componentconfig- the value for theconfigrecord componentheightAccessor- the value for theheightAccessorrecord componentvalidBiome- the value for thevalidBiomerecord componentstructureTemplateManager- the value for thestructureTemplateManagerrecord componentregistryAccess- the value for theregistryAccessrecord component
-
-
Method Details
-
validBiomeOnTop
-
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 '=='. -
chunkGenerator
Returns the value of thechunkGeneratorrecord component.- Returns:
- the value of the
chunkGeneratorrecord component
-
biomeSource
Returns the value of thebiomeSourcerecord component.- Returns:
- the value of the
biomeSourcerecord component
-
randomState
Returns the value of therandomStaterecord component.- Returns:
- the value of the
randomStaterecord component
-
seed
public long seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-
chunkPos
Returns the value of thechunkPosrecord component.- Returns:
- the value of the
chunkPosrecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
heightAccessor
Returns the value of theheightAccessorrecord component.- Returns:
- the value of the
heightAccessorrecord component
-
validBiome
Returns the value of thevalidBiomerecord component.- Returns:
- the value of the
validBiomerecord component
-
structureTemplateManager
Returns the value of thestructureTemplateManagerrecord component.- Returns:
- the value of the
structureTemplateManagerrecord component
-
registryAccess
Returns the value of theregistryAccessrecord component.- Returns:
- the value of the
registryAccessrecord component
-