Class HandInteractionPacket

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

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

This abstract class provides common functionality for packets that need to specify which hand (main or off-hand) is performing the action.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HandInteractionPacket(net.minecraft.world.InteractionHand interactionHand)
    Constructs a new hand interaction packet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    encode(net.xmx.velthoric.network.VxByteBuf buf)
    Encodes the packet data into a network buffer.
    net.minecraft.world.InteractionHand
    Gets the interaction hand for this packet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.xmx.velthoric.network.IVxNetPacket

    handle
  • Constructor Details

    • HandInteractionPacket

      protected HandInteractionPacket(net.minecraft.world.InteractionHand interactionHand)
      Constructs a new hand interaction packet.
      Parameters:
      interactionHand - the hand 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
    • getInteractionHand

      public net.minecraft.world.InteractionHand getInteractionHand()
      Gets the interaction hand for this packet.
      Returns:
      the interaction hand (main or off-hand)