Package net.minecraft.structure
Record Class StructureTemplate.StructureBlockInfo
java.lang.Object
java.lang.Record
net.minecraft.structure.StructureTemplate.StructureBlockInfo
- Record Components:
pos-state-nbt-
- Enclosing class:
StructureTemplate
public static record StructureTemplate.StructureBlockInfo(BlockPos pos, BlockState state, @Nullable NbtCompound nbt)
extends Record
- Mappings:
Namespace Name named net/minecraft/structure/StructureTemplate$StructureBlockInfointermediary net/minecraft/class_3499$class_3501official ent$cnamed posintermediary comp_1341official anamed stateintermediary comp_1342official bnamed nbtintermediary comp_1343official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable NbtCompoundThe 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 NbtCompound 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.nbt()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
-
Constructor Details
-
Method Details
-
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). -
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
-