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 qx
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 Details

    • pos

      private final BlockPos pos
      The field for the pos record component.
    • state

      private final BlockState state
      The field for the state record component.
    • action

      private final PlayerActionC2SPacket.Action action
      The field for the action record component.
    • approved

      private final boolean approved
      The field for the approved record component.
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official e Lqx;e:Lorg/apache/logging/log4j/Logger;
      intermediary field_20320 Lnet/minecraft/class_4463;field_20320:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/network/packet/s2c/play/PlayerActionResponseS2CPacket;LOGGER:Lorg/apache/logging/log4j/Logger;
  • Constructor Details

    • PlayerActionResponseS2CPacket

      public PlayerActionResponseS2CPacket(BlockPos pos, BlockState state, PlayerActionC2SPacket.Action action, boolean approved, String reason)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lqx;<init>(Lgh;Lcnv;Lvp$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 a PlayerActionResponseS2CPacket record class.
      Parameters:
      pos - the value for the pos record component
      state - the value for the state record component
      action - the value for the action record component
      approved - the value for the approved record component
    • PlayerActionResponseS2CPacket

      public PlayerActionResponseS2CPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lqx;<init>(Lph;)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

      public void write(PacketByteBuf buf)
      Specified by:
      write in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lql;a(Lph;)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

      public void apply(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lqx;a(Lqo;)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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • pos

      public BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • state

      public BlockState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • action

      Returns the value of the action record component.
      Returns:
      the value of the action record component
    • approved

      public boolean approved()
      Returns the value of the approved record component.
      Returns:
      the value of the approved record component