Package com.pixelmonmod.tcg.network.data
Interface TCGPacket
- All Superinterfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
- All Known Implementing Classes:
AbstractTCGPacket
,BattleSpectatorUpdatePacket
,CardSelectorToServerPacket
,CoinFlipAckPacket
,CustomGUIChoiceToServerPacket
,EndGamePacket
,ForceEndBattlePacket
,GameStateSyncPacket
,GenericActionRequestPacket
,GenericGUIPacket
,OpenBinderPacket
,OpenPackGuiPacket
,OpenPackPacket
,PrizeSelectorToClientPacket
,PrizeSelectorToServerPacket
,RenderStatePreBattleSyncPacket
,RenderStateSyncPacket
,RetreatAndSwitchPacket
,RulebookUpdatePacket
,ShowOpponentCardPacket
,SwitchPacket
,TCGGuiClientPacket
,TrainerPlayedPacket
,UpdateServerCardRecordPacket
public interface TCGPacket
extends net.minecraft.network.protocol.common.custom.CustomPacketPayload
Interface that represents all packets going between the Pixelmon server instance and client
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,
T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(net.minecraft.network.RegistryFriendlyByteBuf buffer) Decodes the information from the buffer to the packet instancevoid
encode
(net.minecraft.network.RegistryFriendlyByteBuf buffer) Encodes the buffer with the packet informationvoid
handle
(net.neoforged.neoforge.network.handling.IPayloadContext context) Handles the packet being executed on the server or the clientdefault net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type
<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()
Methods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Method Details
-
type
default net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
type
in interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
encode
void encode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Encodes the buffer with the packet information- Parameters:
buffer
- The buffer being encoded
-
decode
void decode(net.minecraft.network.RegistryFriendlyByteBuf buffer) Decodes the information from the buffer to the packet instance- Parameters:
buffer
- The buffer being decoded
-
handle
void handle(net.neoforged.neoforge.network.handling.IPayloadContext context) Handles the packet being executed on the server or the client- Parameters:
context
- The network event context being supplied by Forge
-