Class AbstractPixelmonPacket
java.lang.Object
com.pixelmonmod.pixelmon.comm.data.AbstractPixelmonPacket
- All Implemented Interfaces:
PixelmonPacket
- Direct Known Subclasses:
AbandonQuestPacket
,AcceptDeclineBattlePacket
,AcceptNPCTradePacket
,AddNewInteractionPacket
,AddToDayCarePacket
,AddTrainerPokemonPacket
,ApplyPresetPacket
,BackToMainMenuPacket
,BadgeCaseActionPacket
,BagPacket
,BattleGuiClosedPacket
,BattleQueryPacket
,BattleScreenDisabledPacket
,BattleSwitchPacket
,BattleTaskPacket
,CancelDayCareBoxPacket
,CancelTeamSelectPacket
,ChangeLurePacket
,ChangePokemonOpenGUIPacket
,ChangePokemonPacket
,CheckPlayerBattlePacket
,CheckPokemonEditorAllowedPacket
,CheckRulesVersion
,ChooseAttackPacket
,ChooseMovesetPacket
,ChooseStarterPacket
,ClearTrainerPokemonPacket
,ClientboundSetSelectedSlotPacket
,ClientboundUpdateSpawnerPacket
,ClientChangeOpenPCPacket
,ClientInitializeStoragePacket
,ClientQueryResultsPCPacket
,ClientSetLastOpenBoxPacket
,ClientSetPacket
,ClientUpdatePokedexPacket
,CloseBattlePacket
,CloseEditedPlayerPacket
,CloseEditingPlayerPacket
,CloseRaidPacket
,CloseTeamSelectScreenPacket
,CompleteDayCareRequirementPacket
,ConfirmTeamSelectPacket
,CopyNPCPacket
,CreateNPCFromPresetPacket
,CreateNPCPacket
,CustomDropsActionPacket
,CustomDropsOpenPacket
,CustomNoticePacketPacket
,CustomScoreboardDisplayPacket
,CustomScoreboardUpdatePacket
,DayCareAllErrorsPacket
,DayCareConditionStatusResponsePacket
,DayCareHourglassUsedPacket
,DayCareRequestAllErrorsPacket
,DayCareRequestConditionUpdatePacket
,DeleteMovePacket
,DeleteNPCPacket
,DeletePokemonPacket
,DeleteTrainerPacket
,DeleteTrainerPokemonPacket
,DialogueChoiceMadePacket
,DialogueClosurePacket
,DialogueInputActionPacket
,DialogueInputResponsePacket
,DialogueNextActionPacket
,DisplayBattleQueryRulesPacket
,DistanceUntilBattleForfeitedPacket
,DynamaxMegaRulePacket
,DynamaxPacket
,ElevatorUsedPacket
,EndSpectatePacket
,EnforcedRevivePacket
,EvolutionResponsePacket
,EvolvePokemonPacket
,ExitBattlePacket
,ExportRequestPacket
,ExportResponsePacket
,FetchQuestDataPacket
,FinishSyncDataEntryPacket
,FleePacket
,FormBattleUpdatePacket
,FreeToMoveDuringBattlePacket
,GuiBattleUpdatePacket
,GuiOpenClosePacket
,HealerGuiClosePacket
,HideDisplayQuestPacket
,HoverPacket
,IlluminatePositionsPacket
,ImportRequestPacket
,ImportResponsePacket
,InteractNPCPacket
,InvalidateRegistriesPacket
,ItemCameraPacket
,ItemDropPacket
,KeyPacket
,LensInfoPacket
,LevelUpPacket
,LinkPresetPacket
,MailPacket
,MegaEvolvePacket
,NPCEditorClosedPacket
,NPCLearnMovePacket
,NPCServerPacket
,NPCTeachMovePacket
,NPCTutor.LearnableMove
,OpenBadgeCasePacket
,OpenBattleModePacket
,OpenDialogueInputPacket
,OpenEvolutionGUIPacket
,OpenNPCEditorPacket
,OpenRaidPacket
,OpenReplaceMoveScreenPacket
,OpenScreenPacket
,OpenSelectionPacket
,OpenTutorPacket
,ParticipantReadyPacket
,PartyFainedRespawnPacket
,PCClonePacket
,PCSortPacket
,PixelExtrasDisplayClientPacket
,PixelExtrasDisplayServerPacket
,PlayBattleMusicPacket
,PlayBattleParticleSystemPacket
,PlayerDeathPacket
,PlayerExtrasPacket
,PlayParticleSystemPacket
,PokeDisplayOpenPacket
,PokeDisplaySwapPacket
,PokeDisplayUpdatePacket
,PokemonListPacket
,ProposeBattleRulesPacket
,PullQuestDataPacket
,PushQuestDataPacket
,QueryResourceLocationPacket
,QueryResourceLocationResult
,RaidActionPacket
,RandomiseTrainerPokemonPacket
,RandomizePokemonPacket
,RegisterMoveSkillPacket
,RegisterTraderPacket
,RejectTeamSelectPacket
,RelearnerTutorClosePacket
,ReloadQuestDataPacket
,RemoveSpectatorPacket
,RenamePokemonPacket
,ReplaceMovePacket
,RequestAllRibbonsPacket
,RequestBagItemsPacket
,RequestCloseEditedPlayerPacket
,RequestCloseEditingPlayerPacket
,RequestCustomRulesUpdatePacket
,RequestDayCareChildPacket
,RequestExtrasDisplayDataPacket
,RequestNPCEditorPacket
,RequestSpawnDataPacket
,RequestSpectatePacket
,RequestToggleFreeMoveInBattlePacket
,RequestTrainerCardPacket
,RequestUpdatedPokemonList
,ResetQuestsPacket
,RespondDayCareChildPacket
,RespondPokemonEditorAllowed
,RespondToggleFreeMoveInBattlePacket
,ReturnBagItemsPacket
,RidingMovementPacket
,RidingVerticalMovementPacket
,RotateEntityPacket
,SaveToPresetPacket
,ScoreboardDisplayPacket
,SelectionResponsePacket
,SelectMovePacket
,SelectPokemonResponsePacket
,SelectStatPacket
,SendAllRibbonsPacket
,SendEntireDayCarePacket
,SendQuestDataPacket
,SendSpawnDataPacket
,SendTrackedNPCsOpenScreenPacket
,SendUpdatedInteractionDataPacket
,ServerboundSetSelectedSlotPacket
,ServerCloseStoragePacket
,ServerConfigListPacket
,ServerCosmeticsUpdatePacket
,ServerItemDropPacket
,ServerPokedexPacket
,ServerQueryPCPacket
,ServerSetLastOpenBoxPacket
,ServerSwapPacket
,ServerTradesPacket
,ServerTrashPacket
,ServerUpdateBoxPacket
,SetAllBattlingPokemonPacket
,SetBattlingPokemonPacket
,SetCharmPacket
,SetChattingNPCTexturesPacket
,SetClientTradePairPacket
,SetDialogueDataPacket
,SetDisplayQuestPacket
,SetDisplayRibbonPacket
,SetEditedPlayerPacket
,SetEditingPlayerPacket
,SetHeldItemPacket
,SetImportPokemonIDPacket
,SetMegaItemPacket
,SetNPCDataPacket
,SetNPCEditDataPacket
,SetNPCIconPacket
,SetPokeBallIdPacket
,SetPokemonBattleDataPacket
,SetProposedRulesPacket
,SetSelectedStatsPacket
,SetSelectionOptionsPacket
,SetShopkeeperClientPacket
,SetStrugglePacket
,SetTempMode
,SetTradeTargetPacket
,ShopClosePacket
,ShopOpenPacket
,ShopTransactionPacket
,ShowSpectateMessagePacket
,ShowTeamSelectPacket
,StartBattlePacket
,StarterListPacket
,StartSpectatePacket
,StatueUpdatePacket
,StopStartLevellingPacket
,StoreTrainerDataPacket
,StoreTrainerPokemonPacket
,StoreTutorDataPacket
,SummonParticleArcaneryPacket
,SwapBoxPacket
,SwapHeldItemPacket
,SwapMovePacket
,SwapPositionPacket
,SwitchCameraPacket
,SwitchPokemonPacket
,SyncAbilityPacket
,SyncBossTiersPacket
,SyncConditionDataEntryPacket
,SyncDataProvidersDataEntryPacket
,SyncMovesPacket
,SyncNPCsPacket
,SyncPokeBallsPacket
,SyncResultDataEntryPacket
,SyncRibbonsPacket
,SyncShopKeepersPacket
,SyncSpawningPacket
,SyncSpeciesPacket
,SyncSpectatorRangePacket
,SyncStartersPacket
,TeleportNPCPacket
,TeleportPlayerPacket
,TradeReadyPacket
,TrainerCardColorPacket
,TrainerCardPacket
,TransformPacket
,UIKeyPressPacket
,UnconfirmTeamSelectPacket
,UnLinkPresetPacket
,UpdateBattleQueryRulesPacket
,UpdateClientEditingStatuePacket
,UpdateClientPlayerDataPacket
,UpdateClientRulesPacket
,UpdateDayCareBoxPacket
,UpdateDayCareHistoryPacket
,UpdateEditedPartyPacket
,UpdateEditedPokemonPacket
,UpdateEntityPropertiesPacket
,UpdateInteractionDataPacket
,UpdateMovesetPacket
,UpdateNamePacket
,UpdatePixelmonMovementPacket
,UpdateRaidCatchPacket
,UpdateRenderingHandlerPacket
,UpdateSinglePokemonPacket
,UpdateSpawnerPacket
,UpdateSpriteItemRequestPacket
,UpdateTerrainPacket
,UpdateTurnPacket
,UpdateWeatherPacket
,UseEtherPacket
,UseItemPacket
,UseMoveSkillPacket
,UseRevivePacket
,UseZMovePacket
,WithdrawDayCareBoxPacket
,WithdrawHeldItemPacket
,ZygardeCubePacket
,ZygardeReassemblyPacket
Abstract implementation of the
PixelmonPacket
interface.
It abstracts the process of checking if the method should be run on the main Minecraft server Thread
.
It also abstracts the process of performing safety checks depending on the enviroment it's being executed in (i.e.
DistExecutor.unsafeRunWhenOn(Dist, Supplier)
-
Constructor Summary
ConstructorDescriptionAbstractPixelmonPacket
(boolean sync) AbstractPixelmonPacket
(PacketDirection direction) AbstractPixelmonPacket
(PacketDirection direction, boolean sync) -
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(net.minecraft.network.FriendlyByteBuf buffer) Decodes the information from the buffer to the packet instancevoid
encode
(net.minecraft.network.FriendlyByteBuf buffer) Encodes the buffer with the packet informationvoid
handle
(net.minecraftforge.event.network.CustomPayloadEvent.Context context) Handles the packet being executed on the server or the clientprotected abstract void
handlePacket
(net.minecraftforge.event.network.CustomPayloadEvent.Context context) protected void
Abstracted method for replying to the received packet
-
Constructor Details
-
AbstractPixelmonPacket
-
AbstractPixelmonPacket
-
AbstractPixelmonPacket
public AbstractPixelmonPacket(boolean sync)
-
-
Method Details
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PixelmonPacket
Encodes the buffer with the packet information- Specified by:
encode
in interfacePixelmonPacket
- Parameters:
buffer
- The buffer being encoded
-
decode
public void decode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PixelmonPacket
Decodes the information from the buffer to the packet instance- Specified by:
decode
in interfacePixelmonPacket
- Parameters:
buffer
- The buffer being decoded
-
handle
public void handle(net.minecraftforge.event.network.CustomPayloadEvent.Context context) Description copied from interface:PixelmonPacket
Handles the packet being executed on the server or the client- Specified by:
handle
in interfacePixelmonPacket
- Parameters:
context
- The network event context being supplied by Forge
-
handlePacket
protected abstract void handlePacket(net.minecraftforge.event.network.CustomPayloadEvent.Context context) -
reply
protected void reply(net.minecraftforge.event.network.CustomPayloadEvent.Context context, Object packet) Abstracted method for replying to the received packet- Parameters:
context
- The context of the packetpacket
- The packet to reply with
-