Record Class SetBlockMessage

java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.network.packet.client.SetBlockMessage
All Implemented Interfaces:
net.minestom.server.network.packet.client.ClientPacket

public record SetBlockMessage(Map<net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block> blocks, boolean updateNeighbors, Set<net.minestom.server.coordinate.Point> preventUpdatesAt, int reason, boolean breaking, SetBlockMessage.BlockHitResult blockHit, net.minestom.server.entity.PlayerHand hand, int sequenceId) extends Record implements net.minestom.server.network.packet.client.ClientPacket
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minestom.server.network.NetworkBuffer.Type<SetBlockMessage>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SetBlockMessage(Map<net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block> blocks, boolean updateNeighbors, Set<net.minestom.server.coordinate.Point> preventUpdatesAt, int reason, boolean breaking, SetBlockMessage.BlockHitResult blockHit, net.minestom.server.entity.PlayerHand hand, int sequenceId)
    Creates an instance of a SetBlockMessage record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the blockHit record component.
    Map<net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block>
    Returns the value of the blocks record component.
    boolean
    Returns the value of the breaking record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minestom.server.entity.PlayerHand
    Returns the value of the hand record component.
    final int
    Returns a hash code value for this object.
    Set<net.minestom.server.coordinate.Point>
    Returns the value of the preventUpdatesAt record component.
    int
    Returns the value of the reason record component.
    int
    Returns the value of the sequenceId record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the updateNeighbors record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • TYPE

      public static final net.minestom.server.network.NetworkBuffer.Type<SetBlockMessage> TYPE
  • Constructor Details

    • SetBlockMessage

      public SetBlockMessage(Map<net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block> blocks, boolean updateNeighbors, Set<net.minestom.server.coordinate.Point> preventUpdatesAt, int reason, boolean breaking, SetBlockMessage.BlockHitResult blockHit, net.minestom.server.entity.PlayerHand hand, int sequenceId)
      Creates an instance of a SetBlockMessage record class.
      Parameters:
      blocks - the value for the blocks record component
      updateNeighbors - the value for the updateNeighbors record component
      preventUpdatesAt - the value for the preventUpdatesAt record component
      reason - the value for the reason record component
      breaking - the value for the breaking record component
      blockHit - the value for the blockHit record component
      hand - the value for the hand record component
      sequenceId - the value for the sequenceId record component
  • Method Details

    • toString

      public final 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
    • 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 '=='.
      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.
    • blocks

      public Map<net.minestom.server.coordinate.Point,net.minestom.server.instance.block.Block> blocks()
      Returns the value of the blocks record component.
      Returns:
      the value of the blocks record component
    • updateNeighbors

      public boolean updateNeighbors()
      Returns the value of the updateNeighbors record component.
      Returns:
      the value of the updateNeighbors record component
    • preventUpdatesAt

      public Set<net.minestom.server.coordinate.Point> preventUpdatesAt()
      Returns the value of the preventUpdatesAt record component.
      Returns:
      the value of the preventUpdatesAt record component
    • reason

      public int reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • breaking

      public boolean breaking()
      Returns the value of the breaking record component.
      Returns:
      the value of the breaking record component
    • blockHit

      public SetBlockMessage.BlockHitResult blockHit()
      Returns the value of the blockHit record component.
      Returns:
      the value of the blockHit record component
    • hand

      public net.minestom.server.entity.PlayerHand hand()
      Returns the value of the hand record component.
      Returns:
      the value of the hand record component
    • sequenceId

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