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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minestom.server.network.NetworkBuffer.Type<SetBlockMessage> -
Constructor Summary
ConstructorsConstructorDescriptionSetBlockMessage(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 aSetBlockMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionblockHit()Returns the value of theblockHitrecord component.Map<net.minestom.server.coordinate.Point, net.minestom.server.instance.block.Block> blocks()Returns the value of theblocksrecord component.booleanbreaking()Returns the value of thebreakingrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minestom.server.entity.PlayerHandhand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.Set<net.minestom.server.coordinate.Point> Returns the value of thepreventUpdatesAtrecord component.intreason()Returns the value of thereasonrecord component.intReturns the value of thesequenceIdrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theupdateNeighborsrecord component.
-
Field Details
-
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 aSetBlockMessagerecord class.- Parameters:
blocks- the value for theblocksrecord componentupdateNeighbors- the value for theupdateNeighborsrecord componentpreventUpdatesAt- the value for thepreventUpdatesAtrecord componentreason- the value for thereasonrecord componentbreaking- the value for thebreakingrecord componentblockHit- the value for theblockHitrecord componenthand- the value for thehandrecord componentsequenceId- the value for thesequenceIdrecord component
-
-
Method Details
-
toString
-
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. -
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-
updateNeighbors
public boolean updateNeighbors()Returns the value of theupdateNeighborsrecord component.- Returns:
- the value of the
updateNeighborsrecord component
-
preventUpdatesAt
Returns the value of thepreventUpdatesAtrecord component.- Returns:
- the value of the
preventUpdatesAtrecord component
-
reason
public int reason()Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
breaking
public boolean breaking()Returns the value of thebreakingrecord component.- Returns:
- the value of the
breakingrecord component
-
blockHit
Returns the value of theblockHitrecord component.- Returns:
- the value of the
blockHitrecord component
-
hand
public net.minestom.server.entity.PlayerHand hand()Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
sequenceId
public int sequenceId()Returns the value of thesequenceIdrecord component.- Returns:
- the value of the
sequenceIdrecord component
-