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.StructureBlockInfo
The field for theinfo
record component.private final JigsawBlockEntity.JointType
The field for thejointType
record component.private final ResourceLocation
The field for thename
record component.private final int
The field for theplacementPriority
record component.private final ResourceKey
<StructureTemplatePool> The field for thepool
record component.private final int
The field for theselectionPriority
record component.private final ResourceLocation
The field for thetarget
record 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 aJigsawBlockInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.info()
Returns the value of theinfo
record component.Returns the value of thejointType
record component.name()
Returns the value of thename
record component.of
(StructureTemplate.StructureBlockInfo p_380074_) int
Returns the value of theplacementPriority
record component.pool()
Returns the value of thepool
record component.int
Returns the value of theselectionPriority
record component.target()
Returns the value of thetarget
record component.toString()
Returns a string representation of this record class.withInfo
(StructureTemplate.StructureBlockInfo p_379520_)
-
Field Details
-
info
The field for theinfo
record component. -
jointType
The field for thejointType
record component. -
name
The field for thename
record component. -
pool
The field for thepool
record component. -
target
The field for thetarget
record component. -
placementPriority
private final int placementPriorityThe field for theplacementPriority
record component. -
selectionPriority
private final int selectionPriorityThe field for theselectionPriority
record 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 aJigsawBlockInfo
record class.- Parameters:
info
- the value for theinfo
record componentjointType
- the value for thejointType
record componentname
- the value for thename
record componentpool
- the value for thepool
record componenttarget
- the value for thetarget
record componentplacementPriority
- the value for theplacementPriority
record componentselectionPriority
- the value for theselectionPriority
record component
-
-
Method Details
-
of
-
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 theinfo
record component.- Returns:
- the value of the
info
record component
-
jointType
Returns the value of thejointType
record component.- Returns:
- the value of the
jointType
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
pool
Returns the value of thepool
record component.- Returns:
- the value of the
pool
record component
-
target
Returns the value of thetarget
record component.- Returns:
- the value of the
target
record component
-
placementPriority
public int placementPriority()Returns the value of theplacementPriority
record component.- Returns:
- the value of the
placementPriority
record component
-
selectionPriority
public int selectionPriority()Returns the value of theselectionPriority
record component.- Returns:
- the value of the
selectionPriority
record component
-