Record Class PlayerActionResponseS2CPacket
java.lang.Object
java.lang.Record
net.minecraft.network.packet.s2c.play.PlayerActionResponseS2CPacket
- Record Components:
pos
-state
-action
-approved
-
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public record PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved)
extends Record
implements Packet<ClientPlayPacketListener>
- Mappings:
Namespace Name official ro
intermediary net/minecraft/class_4463
named net/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket
official a
intermediary comp_84
named pos
official b
intermediary comp_85
named state
official c
intermediary comp_86
named action
official d
intermediary comp_87
named approved
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PlayerActionC2SPacket.Action
The field for theaction
record component.private final boolean
The field for theapproved
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
ConstructorDescriptionPlayerActionResponseS2CPacket
(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved) Creates an instance of aPlayerActionResponseS2CPacket
record class.PlayerActionResponseS2CPacket
(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason) -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of theaction
record component.void
apply
(ClientPlayPacketListener clientPlayPacketListener) boolean
approved()
Returns the value of theapproved
record component.final boolean
Indicates whether some other object is "equal to" this one.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
(PacketByteBuf buf) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
pos
The field for thepos
record component. -
state
The field for thestate
record component. -
action
The field for theaction
record component. -
approved
private final boolean approvedThe field for theapproved
record component. -
LOGGER
private static final org.slf4j.Logger LOGGER- Mappings:
Namespace Name Mixin selector official e
Lro;e:Lorg/slf4j/Logger;
intermediary field_20320
Lnet/minecraft/class_4463;field_20320:Lorg/slf4j/Logger;
named LOGGER
Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;LOGGER:Lorg/slf4j/Logger;
-
-
Constructor Details
-
PlayerActionResponseS2CPacket
public PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason) - Mappings:
Namespace Name Mixin selector official <init>
Lro;<init>(Lgj;Lcov;Lwh$a;ZLjava/lang/String;)V
intermediary <init>
Lnet/minecraft/class_4463;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2846$class_2847;ZLjava/lang/String;)V
named <init>
Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/network/packet/c2s/play/PlayerActionC2SPacket$Action;ZLjava/lang/String;)V
-
PlayerActionResponseS2CPacket
public PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved) Creates an instance of aPlayerActionResponseS2CPacket
record class. -
PlayerActionResponseS2CPacket
- Mappings:
Namespace Name Mixin selector official <init>
Lro;<init>(Lpy;)V
intermediary <init>
Lnet/minecraft/class_4463;<init>(Lnet/minecraft/class_2540;)V
named <init>
Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
-
Method Details
-
write
- Specified by:
write
in interfacePacket<ClientPlayPacketListener>
- Mappings:
Namespace Name Mixin selector official a
Lrc;a(Lpy;)V
intermediary method_11052
Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)V
named write
Lnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
-
apply
- Specified by:
apply
in interfacePacket<ClientPlayPacketListener>
- Mappings:
Namespace Name Mixin selector official a
Lro;a(Lrf;)V
intermediary method_21708
Lnet/minecraft/class_4463;method_21708(Lnet/minecraft/class_2602;)V
named apply
Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
-
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
-
approved
public boolean approved()Returns the value of theapproved
record component.- Returns:
- the value of the
approved
record component
-