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(StructureTemplate.StructureBlockInfo info, JigsawBlockEntity.JointType jointType, ResourceLocation name, ResourceKey<StructureTemplatePool> pool, ResourceLocation target, int placementPriority, int selectionPriority)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StructureTemplate.StructureBlockInfoThe field for theinforecord component.private final JigsawBlockEntity.JointTypeThe field for thejointTyperecord component.private final ResourceLocationThe field for thenamerecord component.private final intThe field for theplacementPriorityrecord component.private final ResourceKey<StructureTemplatePool> The field for thepoolrecord component.private final intThe field for theselectionPriorityrecord component.private final ResourceLocationThe field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionJigsawBlockInfo(StructureTemplate.StructureBlockInfo info, JigsawBlockEntity.JointType jointType, ResourceLocation name, ResourceKey<StructureTemplatePool> pool, ResourceLocation 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.info()Returns the value of theinforecord component.Returns the value of thejointTyperecord component.name()Returns the value of thenamerecord component.of(StructureTemplate.StructureBlockInfo pStructureBlockInfo) intReturns the value of theplacementPriorityrecord component.pool()Returns the value of thepoolrecord component.intReturns the value of theselectionPriorityrecord component.target()Returns the value of thetargetrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
info
The field for theinforecord 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(StructureTemplate.StructureBlockInfo info, JigsawBlockEntity.JointType jointType, ResourceLocation name, ResourceKey<StructureTemplatePool> pool, ResourceLocation target, int placementPriority, int selectionPriority) Creates an instance of aJigsawBlockInforecord class.- Parameters:
info- the value for theinforecord 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
-
of
public static StructureTemplate.JigsawBlockInfo of(StructureTemplate.StructureBlockInfo pStructureBlockInfo) -
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. -
withInfo
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord 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
-