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
FieldsModifier and TypeFieldDescriptionprivate final ServerboundPlayerActionPacket.ActionThe field for theactionrecord component.private final booleanThe field for theallGoodrecord component.private static final org.slf4j.Loggerprivate final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundBlockBreakAckPacket(BlockPos pos, BlockState state, ServerboundPlayerActionPacket.Action action, boolean allGood) Creates an instance of aClientboundBlockBreakAckPacketrecord 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 theactionrecord component.booleanallGood()Returns the value of theallGoodrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener p_131664_) final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_131667_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.Packet
isSkippable
-
Field Details
-
pos
The field for theposrecord component. -
state
The field for thestaterecord component. -
action
The field for theactionrecord component. -
allGood
private final boolean allGoodThe field for theallGoodrecord 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 aClientboundBlockBreakAckPacketrecord class.- Parameters:
pos- the value for theposrecord componentstate- the value for thestaterecord componentaction- the value for theactionrecord componentallGood- the value for theallGoodrecord component
-
ClientboundBlockBreakAckPacket
-
-
Method Details
-
write
- Specified by:
writein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein 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 theposrecord component.- Returns:
- the value of the
posrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
allGood
public boolean allGood()Returns the value of theallGoodrecord component.- Returns:
- the value of the
allGoodrecord component
-