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 Details

    • chunkGenerator

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

      private final BiomeSource biomeSource
      The field for the biomeSource 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.
    • config

      private final C extends FeatureConfiguration config
      The field for the config 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.
    • structureManager

      private final StructureManager structureManager
      The field for the structureManager record component.
    • registryAccess

      private final RegistryAccess registryAccess
      The field for the registryAccess 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 a Context record class.
      Parameters:
      chunkGenerator - the value for the chunkGenerator record component
      biomeSource - the value for the biomeSource record component
      seed - the value for the seed record component
      chunkPos - the value for the chunkPos record component
      config - the value for the config record component
      heightAccessor - the value for the heightAccessor record component
      validBiome - the value for the validBiome record component
      structureManager - the value for the structureManager record component
      registryAccess - the value for the registryAccess record component
  • Method Details

    • validBiomeOnTop

      public boolean validBiomeOnTop(Heightmap.Types p_197381_)
    • 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

      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.
    • 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
    • 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
    • config

      public C config()
      Returns the value of the config record component.
      Returns:
      the value of the config 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
    • structureManager

      public StructureManager structureManager()
      Returns the value of the structureManager record component.
      Returns:
      the value of the structureManager record component
    • registryAccess

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