Class HandInteractionPacket

java.lang.Object
net.timtaran.interactivemc.body.player.packet.HandInteractionPacket
All Implemented Interfaces:
net.xmx.velthoric.network.IVxNetPacket
Direct Known Subclasses:
C2SGrabPacket, C2SReleasePacket, C2STriggerStatePacket, S2CGrabResultPacket

public abstract class HandInteractionPacket extends Object implements net.xmx.velthoric.network.IVxNetPacket
Base class for packets that involve player body parts interactions.

This abstract class provides common functionality for packets that need to specify which body part is performing the action.

  • Constructor Details

    • HandInteractionPacket

      protected HandInteractionPacket(PlayerBodyPart playerBodyPart)
      Constructs a new hand interaction packet.
      Parameters:
      playerBodyPart - the body part performing the interaction
  • Method Details

    • encode

      public void encode(net.xmx.velthoric.network.VxByteBuf buf)
      Encodes the packet data into a network buffer.
      Specified by:
      encode in interface net.xmx.velthoric.network.IVxNetPacket
      Parameters:
      buf - the buffer to write to
    • getPlayerBodyPart

      public PlayerBodyPart getPlayerBodyPart()
      Gets the player body part for this packet.
      Returns:
      the player body part