Record Class Structure.GenerationStub
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.Structure.GenerationStub
- Enclosing class:
- Structure
public static record Structure.GenerationStub(BlockPos position, com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>,StructurePiecesBuilder> generator)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>,StructurePiecesBuilder> The field for thegeneratorrecord component.private final BlockPosThe field for thepositionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGenerationStub(BlockPos position, com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>, StructurePiecesBuilder> generator) Creates an instance of aGenerationStubrecord class.GenerationStub(BlockPos p_226675_, Consumer<StructurePiecesBuilder> p_226676_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>,StructurePiecesBuilder> Returns the value of thegeneratorrecord component.final inthashCode()Returns a hash code value for this object.position()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
position
The field for thepositionrecord component. -
generator
private final com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>,StructurePiecesBuilder> generatorThe field for thegeneratorrecord component.
-
-
Constructor Details
-
GenerationStub
-
GenerationStub
public GenerationStub(BlockPos position, com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>, StructurePiecesBuilder> generator) Creates an instance of aGenerationStubrecord class.- Parameters:
position- the value for thepositionrecord componentgenerator- the value for thegeneratorrecord component
-
-
Method Details
-
getPiecesBuilder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
generator
public com.mojang.datafixers.util.Either<Consumer<StructurePiecesBuilder>,StructurePiecesBuilder> generator()Returns the value of thegeneratorrecord component.- Returns:
- the value of the
generatorrecord component
-