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
Modifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.PacketCodec
<net.minecraft.network.PacketByteBuf, TCustomPayload> static final net.minecraft.network.packet.CustomPayload.Id
<TCustomPayload> -
Constructor Summary
ConstructorDescriptionTCustomPayload
(net.minecraft.util.Identifier packetId, io.netty.buffer.ByteBuf packetPayload) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
finalize()
final net.minecraft.network.packet.CustomPayload.Id
<? extends net.minecraft.network.packet.CustomPayload> getId()
Not to be confused withgetPacketId()
!
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 usingTCDCommons
'sCustomPayloadNetwork
.
It is very likely that you are looking forgetPacketId()
.final net.minecraft.util.Identifier
Not to be confused withgetId()
!final io.netty.buffer.ByteBuf
-
Field Details
-
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 withgetPacketId()
!
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 usingTCDCommons
'sCustomPayloadNetwork
.
It is very likely that you are looking forgetPacketId()
.- Specified by:
getId
in interfacenet.minecraft.network.packet.CustomPayload
-
finalize
-
getPacketId
public final net.minecraft.util.Identifier getPacketId()Not to be confused withgetId()
! -
getPacketPayload
public final io.netty.buffer.ByteBuf getPacketPayload()
-