Record Class StructureTemplate.JigsawBlockInfo
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.JigsawBlockInfo
- Enclosing class:
StructureTemplate
public static record StructureTemplate.JigsawBlockInfo(BlockPos pos, BlockState state, JigsawBlockEntity.JointType jointType, @Nullable Identifier name, ResourceKey<StructureTemplatePool> pool, Identifier target, int placementPriority, int selectionPriority)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JigsawBlockEntity.JointTypeThe field for thejointTyperecord component.private final @Nullable IdentifierThe field for thenamerecord component.private final intThe field for theplacementPriorityrecord component.private final ResourceKey<StructureTemplatePool> The field for thepoolrecord component.private final BlockPosThe field for theposrecord component.private final intThe field for theselectionPriorityrecord component.private final BlockStateThe field for thestaterecord component.private final IdentifierThe field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionJigsawBlockInfo(BlockPos pos, BlockState state, JigsawBlockEntity.JointType jointType, @Nullable Identifier name, ResourceKey<StructureTemplatePool> pool, Identifier target, int placementPriority, int selectionPriority) Creates an instance of aJigsawBlockInforecord 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.Returns the value of thejointTyperecord component.name()Returns the value of thenamerecord component.intReturns the value of theplacementPriorityrecord component.pool()Returns the value of thepoolrecord component.pos()Returns the value of theposrecord component.intReturns the value of theselectionPriorityrecord component.state()Returns the value of thestaterecord component.target()Returns the value of thetargetrecord component.toString()Returns a string representation of this record class.withInfo(BlockPos pos, BlockState state)
-
Field Details
-
pos
The field for theposrecord component. -
state
The field for thestaterecord component. -
jointType
The field for thejointTyperecord component. -
name
The field for thenamerecord component. -
pool
The field for thepoolrecord component. -
target
The field for thetargetrecord component. -
placementPriority
private final int placementPriorityThe field for theplacementPriorityrecord component. -
selectionPriority
private final int selectionPriorityThe field for theselectionPriorityrecord component.
-
-
Constructor Details
-
JigsawBlockInfo
public JigsawBlockInfo(BlockPos pos, BlockState state, JigsawBlockEntity.JointType jointType, @Nullable Identifier name, ResourceKey<StructureTemplatePool> pool, Identifier target, int placementPriority, int selectionPriority) Creates an instance of aJigsawBlockInforecord class.- Parameters:
pos- the value for theposrecord componentstate- the value for thestaterecord componentjointType- the value for thejointTyperecord componentname- the value for thenamerecord componentpool- the value for thepoolrecord componenttarget- the value for thetargetrecord componentplacementPriority- the value for theplacementPriorityrecord componentselectionPriority- the value for theselectionPriorityrecord component
-
-
Method Details
-
parse
-
toString
-
withInfo
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
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
-
jointType
Returns the value of thejointTyperecord component.- Returns:
- the value of the
jointTyperecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
pool
Returns the value of thepoolrecord component.- Returns:
- the value of the
poolrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
placementPriority
public int placementPriority()Returns the value of theplacementPriorityrecord component.- Returns:
- the value of the
placementPriorityrecord component
-
selectionPriority
public int selectionPriority()Returns the value of theselectionPriorityrecord component.- Returns:
- the value of the
selectionPriorityrecord component
-