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, long seed, ChunkPos chunkPos, C extends FeatureConfiguration config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureManager structureManager, RegistryAccess registryAccess)
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 C
The field for theconfig
record component.private final LevelHeightAccessor
The field for theheightAccessor
record component.private final RegistryAccess
The field for theregistryAccess
record component.private final long
The field for theseed
record component.private final StructureManager
The field for thestructureManager
record component.The field for thevalidBiome
record component. -
Constructor Summary
ConstructorDescriptionContext
(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long seed, ChunkPos chunkPos, C config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureManager structureManager, RegistryAccess registryAccess) Creates an instance of aContext
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.config()
Returns the value of theconfig
record component.final boolean
Indicates whether some other object is "equal to" this one.int[]
getCornerHeights
(int p_197376_, int p_197377_, int p_197378_, int p_197379_) int
getLowestY
(int p_197373_, int p_197374_) final int
hashCode()
Returns a hash code value for this object.Returns the value of theheightAccessor
record component.Returns the value of theregistryAccess
record component.long
seed()
Returns the value of theseed
record component.Returns the value of thestructureManager
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thevalidBiome
record component.boolean
validBiomeOnTop
(Heightmap.Types p_197381_)
-
Field Details
-
chunkGenerator
The field for thechunkGenerator
record component. -
biomeSource
The field for thebiomeSource
record component. -
seed
private final long seedThe field for theseed
record component. -
chunkPos
The field for thechunkPos
record component. -
config
The field for theconfig
record component. -
heightAccessor
The field for theheightAccessor
record component. -
validBiome
The field for thevalidBiome
record component. -
structureManager
The field for thestructureManager
record component. -
registryAccess
The field for theregistryAccess
record component.
-
-
Constructor Details
-
Context
public Context(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long seed, ChunkPos chunkPos, C config, LevelHeightAccessor heightAccessor, Predicate<Holder<Biome>> validBiome, StructureManager structureManager, RegistryAccess registryAccess) Creates an instance of aContext
record class.- Parameters:
chunkGenerator
- the value for thechunkGenerator
record componentbiomeSource
- the value for thebiomeSource
record componentseed
- the value for theseed
record componentchunkPos
- the value for thechunkPos
record componentconfig
- the value for theconfig
record componentheightAccessor
- the value for theheightAccessor
record componentvalidBiome
- the value for thevalidBiome
record componentstructureManager
- the value for thestructureManager
record componentregistryAccess
- the value for theregistryAccess
record component
-
-
Method Details
-
validBiomeOnTop
-
getCornerHeights
public int[] getCornerHeights(int p_197376_, int p_197377_, int p_197378_, int p_197379_) -
getLowestY
public int getLowestY(int p_197373_, int p_197374_) -
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 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
-
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
-
config
Returns the value of theconfig
record component.- Returns:
- the value of the
config
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
-
structureManager
Returns the value of thestructureManager
record component.- Returns:
- the value of the
structureManager
record component
-
registryAccess
Returns the value of theregistryAccess
record component.- Returns:
- the value of the
registryAccess
record component
-