Record Class ClientboundBlockBreakAckPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundBlockBreakAckPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundBlockBreakAckPacket(BlockPos pos, BlockState state, ServerboundPlayerActionPacket.Action action, boolean allGood)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ServerboundPlayerActionPacket.Action
The field for theaction
record component.private final boolean
The field for theallGood
record component.private static final org.slf4j.Logger
private final BlockPos
The field for thepos
record component.private final BlockState
The field for thestate
record component. -
Constructor Summary
ConstructorDescriptionClientboundBlockBreakAckPacket
(BlockPos pos, BlockState state, ServerboundPlayerActionPacket.Action action, boolean allGood) Creates an instance of aClientboundBlockBreakAckPacket
record class.ClientboundBlockBreakAckPacket
(BlockPos p_131654_, BlockState p_131655_, ServerboundPlayerActionPacket.Action p_131656_, boolean p_131657_, String p_131658_) ClientboundBlockBreakAckPacket
(FriendlyByteBuf p_178604_) -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of theaction
record component.boolean
allGood()
Returns the value of theallGood
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_131664_) final int
hashCode()
Returns a hash code value for this object.pos()
Returns the value of thepos
record component.state()
Returns the value of thestate
record component.final String
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf p_131667_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable
-
Field Details
-
pos
The field for thepos
record component. -
state
The field for thestate
record component. -
action
The field for theaction
record component. -
allGood
private final boolean allGoodThe field for theallGood
record component. -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
ClientboundBlockBreakAckPacket
public ClientboundBlockBreakAckPacket(BlockPos p_131654_, BlockState p_131655_, ServerboundPlayerActionPacket.Action p_131656_, boolean p_131657_, String p_131658_) -
ClientboundBlockBreakAckPacket
public ClientboundBlockBreakAckPacket(BlockPos pos, BlockState state, ServerboundPlayerActionPacket.Action action, boolean allGood) Creates an instance of aClientboundBlockBreakAckPacket
record class.- Parameters:
pos
- the value for thepos
record componentstate
- the value for thestate
record componentaction
- the value for theaction
record componentallGood
- the value for theallGood
record component
-
ClientboundBlockBreakAckPacket
-
-
Method Details
-
write
- Specified by:
write
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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. -
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 '=='. -
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
action
Returns the value of theaction
record component.- Returns:
- the value of the
action
record component
-
allGood
public boolean allGood()Returns the value of theallGood
record component.- Returns:
- the value of the
allGood
record component
-