Interface Packet
- All Known Subinterfaces:
MinecraftPacket
- All Known Implementing Classes:
ClientboundAddEntityPacket,ClientboundAnimatePacket,ClientboundAwardStatsPacket,ClientboundBlockChangedAckPacket,ClientboundBlockDestructionPacket,ClientboundBlockEntityDataPacket,ClientboundBlockEventPacket,ClientboundBlockUpdatePacket,ClientboundBossEventPacket,ClientboundBundlePacket,ClientboundChangeDifficultyPacket,ClientboundChunkBatchFinishedPacket,ClientboundChunkBatchStartPacket,ClientboundChunksBiomesPacket,ClientboundClearTitlesPacket,ClientboundCommandsPacket,ClientboundCommandSuggestionsPacket,ClientboundContainerClosePacket,ClientboundContainerSetContentPacket,ClientboundContainerSetDataPacket,ClientboundContainerSetSlotPacket,ClientboundCookieRequestPacket,ClientboundCooldownPacket,ClientboundCustomChatCompletionsPacket,ClientboundCustomPayloadPacket,ClientboundCustomQueryPacket,ClientboundCustomReportDetailsPacket,ClientboundDamageEventPacket,ClientboundDebugSamplePacket,ClientboundDeleteChatPacket,ClientboundDelimiterPacket,ClientboundDisconnectPacket,ClientboundDisguisedChatPacket,ClientboundEntityEventPacket,ClientboundEntityPositionSyncPacket,ClientboundExplodePacket,ClientboundFinishConfigurationPacket,ClientboundForgetLevelChunkPacket,ClientboundGameEventPacket,ClientboundHelloPacket,ClientboundHorseScreenOpenPacket,ClientboundHurtAnimationPacket,ClientboundInitializeBorderPacket,ClientboundKeepAlivePacket,ClientboundLevelChunkWithLightPacket,ClientboundLevelEventPacket,ClientboundLevelParticlesPacket,ClientboundLightUpdatePacket,ClientboundLoginCompressionPacket,ClientboundLoginDisconnectPacket,ClientboundLoginFinishedPacket,ClientboundLoginPacket,ClientboundMapItemDataPacket,ClientboundMerchantOffersPacket,ClientboundMoveEntityPosPacket,ClientboundMoveEntityPosRotPacket,ClientboundMoveEntityRotPacket,ClientboundMoveMinecartPacket,ClientboundMoveVehiclePacket,ClientboundOpenBookPacket,ClientboundOpenScreenPacket,ClientboundOpenSignEditorPacket,ClientboundPingPacket,ClientboundPlaceGhostRecipePacket,ClientboundPlayerAbilitiesPacket,ClientboundPlayerChatPacket,ClientboundPlayerCombatEndPacket,ClientboundPlayerCombatEnterPacket,ClientboundPlayerCombatKillPacket,ClientboundPlayerInfoRemovePacket,ClientboundPlayerInfoUpdatePacket,ClientboundPlayerLookAtPacket,ClientboundPlayerPositionPacket,ClientboundPlayerRotationPacket,ClientboundPongResponsePacket,ClientboundProjectilePowerPacket,ClientboundRecipeBookAddPacket,ClientboundRecipeBookRemovePacket,ClientboundRecipeBookSettingsPacket,ClientboundRegistryDataPacket,ClientboundRemoveEntitiesPacket,ClientboundRemoveMobEffectPacket,ClientboundResetChatPacket,ClientboundResetScorePacket,ClientboundResourcePackPopPacket,ClientboundResourcePackPushPacket,ClientboundRespawnPacket,ClientboundRotateHeadPacket,ClientboundSectionBlocksUpdatePacket,ClientboundSelectAdvancementsTabPacket,ClientboundSelectKnownPacks,ClientboundServerDataPacket,ClientboundServerLinksPacket,ClientboundSetActionBarTextPacket,ClientboundSetBorderCenterPacket,ClientboundSetBorderLerpSizePacket,ClientboundSetBorderSizePacket,ClientboundSetBorderWarningDelayPacket,ClientboundSetBorderWarningDistancePacket,ClientboundSetCameraPacket,ClientboundSetChunkCacheCenterPacket,ClientboundSetChunkCacheRadiusPacket,ClientboundSetCursorItemPacket,ClientboundSetDefaultSpawnPositionPacket,ClientboundSetDisplayObjectivePacket,ClientboundSetEntityDataPacket,ClientboundSetEntityLinkPacket,ClientboundSetEntityMotionPacket,ClientboundSetEquipmentPacket,ClientboundSetExperiencePacket,ClientboundSetHealthPacket,ClientboundSetHeldSlotPacket,ClientboundSetObjectivePacket,ClientboundSetPassengersPacket,ClientboundSetPlayerInventoryPacket,ClientboundSetPlayerTeamPacket,ClientboundSetScorePacket,ClientboundSetSimulationDistancePacket,ClientboundSetSubtitleTextPacket,ClientboundSetTimePacket,ClientboundSetTitlesAnimationPacket,ClientboundSetTitleTextPacket,ClientboundSoundEntityPacket,ClientboundSoundPacket,ClientboundStartConfigurationPacket,ClientboundStatusResponsePacket,ClientboundStopSoundPacket,ClientboundStoreCookiePacket,ClientboundSystemChatPacket,ClientboundTabListPacket,ClientboundTagQueryPacket,ClientboundTakeItemEntityPacket,ClientboundTeleportEntityPacket,ClientboundTestInstanceBlockStatus,ClientboundTickingStatePacket,ClientboundTickingStepPacket,ClientboundTransferPacket,ClientboundUpdateAdvancementsPacket,ClientboundUpdateAttributesPacket,ClientboundUpdateEnabledFeaturesPacket,ClientboundUpdateMobEffectPacket,ClientboundUpdateRecipesPacket,ClientboundUpdateTagsPacket,ClientIntentionPacket,ServerboundAcceptTeleportationPacket,ServerboundBlockEntityTagQueryPacket,ServerboundChangeDifficultyPacket,ServerboundChatAckPacket,ServerboundChatCommandPacket,ServerboundChatCommandSignedPacket,ServerboundChatPacket,ServerboundChatSessionUpdatePacket,ServerboundChunkBatchReceivedPacket,ServerboundClientCommandPacket,ServerboundClientInformationPacket,ServerboundClientTickEndPacket,ServerboundCommandSuggestionPacket,ServerboundConfigurationAcknowledgedPacket,ServerboundContainerButtonClickPacket,ServerboundContainerClickPacket,ServerboundContainerClosePacket,ServerboundContainerSlotStateChangedPacket,ServerboundCookieResponsePacket,ServerboundCustomPayloadPacket,ServerboundCustomQueryAnswerPacket,ServerboundDebugSampleSubscriptionPacket,ServerboundEditBookPacket,ServerboundEntityTagQuery,ServerboundFinishConfigurationPacket,ServerboundHelloPacket,ServerboundInteractPacket,ServerboundJigsawGeneratePacket,ServerboundKeepAlivePacket,ServerboundKeyPacket,ServerboundLockDifficultyPacket,ServerboundLoginAcknowledgedPacket,ServerboundMovePlayerPosPacket,ServerboundMovePlayerPosRotPacket,ServerboundMovePlayerRotPacket,ServerboundMovePlayerStatusOnlyPacket,ServerboundMoveVehiclePacket,ServerboundPaddleBoatPacket,ServerboundPickItemFromBlockPacket,ServerboundPickItemFromEntityPacket,ServerboundPingRequestPacket,ServerboundPlaceRecipePacket,ServerboundPlayerAbilitiesPacket,ServerboundPlayerActionPacket,ServerboundPlayerCommandPacket,ServerboundPlayerInputPacket,ServerboundPlayerLoadedPacket,ServerboundPongPacket,ServerboundRecipeBookChangeSettingsPacket,ServerboundRecipeBookSeenRecipePacket,ServerboundRenameItemPacket,ServerboundResourcePackPacket,ServerboundSeenAdvancementsPacket,ServerboundSelectBundleItemPacket,ServerboundSelectKnownPacks,ServerboundSelectTradePacket,ServerboundSetBeaconPacket,ServerboundSetCarriedItemPacket,ServerboundSetCommandBlockPacket,ServerboundSetCommandMinecartPacket,ServerboundSetCreativeModeSlotPacket,ServerboundSetJigsawBlockPacket,ServerboundSetStructureBlockPacket,ServerboundSetTestBlockPacket,ServerboundSignUpdatePacket,ServerboundStatusRequestPacket,ServerboundSwingPacket,ServerboundTeleportToEntityPacket,ServerboundTestInstanceBlockActionPacket,ServerboundUseItemOnPacket,ServerboundUseItemPacket
public interface Packet
A network packet. Any given packet must have a constructor that takes in a
ByteBuf.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns whether the packet is terminal.default booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.
-
Method Details
-
shouldRunOnGameThread
default boolean shouldRunOnGameThread()Gets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Returns:
- Whether the packet be handled async from the Netty thread.
-
isTerminal
default boolean isTerminal()Returns whether the packet is terminal. If true, this should be the last packet sent inside a protocol state. Subsequently,Session.setAutoRead(boolean)should be disabled when a terminal packet is received, until the session has switched into a new state and is ready to receive more packets.- Returns:
- Whether the packet is terminal.
-