Interface ICustomPacketPayloadWithBuffer

All Superinterfaces:
CustomPacketPayload
All Known Implementing Classes:
SimplePayload

public interface ICustomPacketPayloadWithBuffer extends CustomPacketPayload
Forge extension interface to deal with custom forge query payloads.
  • Method Summary

    Modifier and Type
    Method
    Description
    The buffer that created the query payload.
    getDirection(Packet<?> packet)
    The network direction in which this payload can be transmitted.
    int
    The index of the internal packet stored in the payload.

    Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload

    id, write
  • Method Details

    • buffer

      FriendlyByteBuf buffer()
      The buffer that created the query payload.
      Returns:
      The buffer
    • packetIndex

      int packetIndex()
      The index of the internal packet stored in the payload.
      Returns:
      The index of the internal packet
    • getDirection

      default PlayNetworkDirection getDirection(Packet<?> packet)
      The network direction in which this payload can be transmitted.
      Parameters:
      packet - The packet for which to determine the network direction if this payload was transmitted.
      Returns:
      The network direction for this payload.