Record Class StructureTemplate.StructureBlockInfo
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo
- Enclosing class:
StructureTemplate
public static record StructureTemplate.StructureBlockInfo(BlockPos pos, BlockState state, @Nullable CompoundTag nbt)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable CompoundTagThe field for thenbtrecord component.private final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStructureBlockInfo(BlockPos pos, BlockState state, @Nullable CompoundTag nbt) Creates an instance of aStructureBlockInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable CompoundTagnbt()Returns the value of thenbtrecord component.pos()Returns the value of theposrecord component.state()Returns the value of thestaterecord component.toString()Returns a string representation of this record class.
-
Field Details
-
pos
The field for theposrecord component. -
state
The field for thestaterecord component. -
nbt
The field for thenbtrecord component.
-
-
Constructor Details
-
StructureBlockInfo
Creates an instance of aStructureBlockInforecord class.- Parameters:
pos- the value for theposrecord componentstate- the value for thestaterecord componentnbt- the value for thenbtrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
nbt
Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-