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 Details

    • pos

      private final BlockPos pos
      The field for the pos record component.
    • state

      private final BlockState state
      The field for the state record component.
    • jointType

      private final JigsawBlockEntity.JointType jointType
      The field for the jointType record component.
    • name

      private final @Nullable Identifier name
      The field for the name record component.
    • pool

      private final ResourceKey<StructureTemplatePool> pool
      The field for the pool record component.
    • target

      private final Identifier target
      The field for the target record component.
    • placementPriority

      private final int placementPriority
      The field for the placementPriority record component.
    • selectionPriority

      private final int selectionPriority
      The field for the selectionPriority record 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 a JigsawBlockInfo record class.
      Parameters:
      pos - the value for the pos record component
      state - the value for the state record component
      jointType - the value for the jointType record component
      name - the value for the name record component
      pool - the value for the pool record component
      target - the value for the target record component
      placementPriority - the value for the placementPriority record component
      selectionPriority - the value for the selectionPriority record component
  • Method Details

    • parse

    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • withInfo

      public StructureTemplate.JigsawBlockInfo withInfo(BlockPos pos, BlockState state)
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pos

      public BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • state

      public BlockState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • jointType

      public JigsawBlockEntity.JointType jointType()
      Returns the value of the jointType record component.
      Returns:
      the value of the jointType record component
    • name

      public @Nullable Identifier name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • pool

      Returns the value of the pool record component.
      Returns:
      the value of the pool record component
    • target

      public Identifier target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • placementPriority

      public int placementPriority()
      Returns the value of the placementPriority record component.
      Returns:
      the value of the placementPriority record component
    • selectionPriority

      public int selectionPriority()
      Returns the value of the selectionPriority record component.
      Returns:
      the value of the selectionPriority record component