Class TCustomPayload

java.lang.Object
io.github.thecsdev.tcdcommons.api.network.packet.TCustomPayload
All Implemented Interfaces:
net.minecraft.network.packet.CustomPayload

@Internal public final class TCustomPayload extends Object implements net.minecraft.network.packet.CustomPayload
An internal implementation of CustomPayload for TCDCommons.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.network.packet.CustomPayload

    net.minecraft.network.packet.CustomPayload.CodecFactory<B extends net.minecraft.network.PacketByteBuf>, net.minecraft.network.packet.CustomPayload.Id<T extends net.minecraft.network.packet.CustomPayload>, net.minecraft.network.packet.CustomPayload.Type<B extends net.minecraft.network.PacketByteBuf,T extends net.minecraft.network.packet.CustomPayload>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.network.codec.PacketCodec<net.minecraft.network.PacketByteBuf,TCustomPayload>
     
    static final net.minecraft.network.packet.CustomPayload.Id<TCustomPayload>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TCustomPayload(net.minecraft.util.Identifier packetId, io.netty.buffer.ByteBuf packetPayload)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
     
    final net.minecraft.network.packet.CustomPayload.Id<? extends net.minecraft.network.packet.CustomPayload>
    Not to be confused with getPacketId()!
    This method, getId(), belongs to the game's code, and refers to the ID of this payload on the game's network protocol.
    Meanwhile, getPacketId() refers to the ID of the packet payload being sent over using TCDCommons's CustomPayloadNetwork.
    It is very likely that you are looking for getPacketId().
    final net.minecraft.util.Identifier
    Not to be confused with getId()!
    final io.netty.buffer.ByteBuf
     

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ID

      public static final net.minecraft.network.packet.CustomPayload.Id<TCustomPayload> ID
    • CODEC

      public static final net.minecraft.network.codec.PacketCodec<net.minecraft.network.PacketByteBuf,TCustomPayload> CODEC
  • Constructor Details

    • TCustomPayload

      public TCustomPayload(net.minecraft.util.Identifier packetId, io.netty.buffer.ByteBuf packetPayload)
  • Method Details

    • getId

      public final net.minecraft.network.packet.CustomPayload.Id<? extends net.minecraft.network.packet.CustomPayload> getId()
      Not to be confused with getPacketId()!
      This method, getId(), belongs to the game's code, and refers to the ID of this payload on the game's network protocol.
      Meanwhile, getPacketId() refers to the ID of the packet payload being sent over using TCDCommons's CustomPayloadNetwork.
      It is very likely that you are looking for getPacketId().
      Specified by:
      getId in interface net.minecraft.network.packet.CustomPayload
    • finalize

      protected final void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getPacketId

      public final net.minecraft.util.Identifier getPacketId()
      Not to be confused with getId()!
    • getPacketPayload

      public final io.netty.buffer.ByteBuf getPacketPayload()