Record Class PieceGenerator.Context<C extends FeatureConfiguration>

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pieces.PieceGenerator.Context<C>
Enclosing interface:
PieceGenerator<C extends FeatureConfiguration>

public static record PieceGenerator.Context<C extends FeatureConfiguration>(C extends FeatureConfiguration config, ChunkGenerator chunkGenerator, StructureTemplateManager structureTemplateManager, ChunkPos chunkPos, LevelHeightAccessor heightAccessor, WorldgenRandom random, long seed) extends Record
  • Field Details

    • config

      private final C extends FeatureConfiguration config
      The field for the config record component.
    • chunkGenerator

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

      private final StructureTemplateManager structureTemplateManager
      The field for the structureTemplateManager record component.
    • chunkPos

      private final ChunkPos chunkPos
      The field for the chunkPos record component.
    • heightAccessor

      private final LevelHeightAccessor heightAccessor
      The field for the heightAccessor record component.
    • random

      private final WorldgenRandom random
      The field for the random record component.
    • seed

      private final long seed
      The field for the seed record component.
  • Constructor Details

    • Context

      public Context(C config, ChunkGenerator chunkGenerator, StructureTemplateManager structureTemplateManager, ChunkPos chunkPos, LevelHeightAccessor heightAccessor, WorldgenRandom random, long seed)
      Creates an instance of a Context record class.
      Parameters:
      config - the value for the config record component
      chunkGenerator - the value for the chunkGenerator record component
      structureTemplateManager - the value for the structureTemplateManager record component
      chunkPos - the value for the chunkPos record component
      heightAccessor - the value for the heightAccessor record component
      random - the value for the random record component
      seed - the value for the seed record component
  • Method Details

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

      public C config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component
    • chunkGenerator

      public ChunkGenerator chunkGenerator()
      Returns the value of the chunkGenerator record component.
      Returns:
      the value of the chunkGenerator record component
    • structureTemplateManager

      public StructureTemplateManager structureTemplateManager()
      Returns the value of the structureTemplateManager record component.
      Returns:
      the value of the structureTemplateManager record component
    • chunkPos

      public ChunkPos chunkPos()
      Returns the value of the chunkPos record component.
      Returns:
      the value of the chunkPos record component
    • heightAccessor

      public LevelHeightAccessor heightAccessor()
      Returns the value of the heightAccessor record component.
      Returns:
      the value of the heightAccessor record component
    • random

      public WorldgenRandom random()
      Returns the value of the random record component.
      Returns:
      the value of the random record component
    • seed

      public long seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component