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 rointermediary net/minecraft/class_4463named net/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacketofficial aintermediary comp_84named posofficial bintermediary comp_85named stateofficial cintermediary comp_86named actionofficial dintermediary comp_87named approved
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PlayerActionC2SPacket.ActionThe field for theactionrecord component.private final booleanThe field for theapprovedrecord component.private static final org.slf4j.Loggerprivate final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved) Creates an instance of aPlayerActionResponseS2CPacketrecord class.PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason) -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.voidapply(ClientPlayPacketListener clientPlayPacketListener) booleanapproved()Returns the value of theapprovedrecord component.final booleanIndicates whether some other object is "equal to" this one.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(PacketByteBuf buf) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
pos
The field for theposrecord component. -
state
The field for thestaterecord component. -
action
The field for theactionrecord component. -
approved
private final boolean approvedThe field for theapprovedrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER- Mappings:
Namespace Name Mixin selector official eLro;e:Lorg/slf4j/Logger;intermediary field_20320Lnet/minecraft/class_4463;field_20320:Lorg/slf4j/Logger;named LOGGERLnet/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;)Vintermediary <init>Lnet/minecraft/class_4463;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2846$class_2847;ZLjava/lang/String;)Vnamed <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 aPlayerActionResponseS2CPacketrecord class. -
PlayerActionResponseS2CPacket
- Mappings:
Namespace Name Mixin selector official <init>Lro;<init>(Lpy;)Vintermediary <init>Lnet/minecraft/class_4463;<init>(Lnet/minecraft/class_2540;)Vnamed <init>Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
-
-
Method Details
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector official aLrc;a(Lpy;)Vintermediary method_11052Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)Vnamed writeLnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
-
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>- Mappings:
Namespace Name Mixin selector official aLro;a(Lrf;)Vintermediary method_21708Lnet/minecraft/class_4463;method_21708(Lnet/minecraft/class_2602;)Vnamed applyLnet/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 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
-
approved
public boolean approved()Returns the value of theapprovedrecord component.- Returns:
- the value of the
approvedrecord component
-