Interface Packet<T extends PacketListener>

All Known Implementing Classes:
AcknowledgeChunksC2SPacket, AcknowledgeReconfigurationC2SPacket, AdvancementTabC2SPacket, AdvancementUpdateS2CPacket, BlockBreakingProgressS2CPacket, BlockEntityUpdateS2CPacket, BlockEventS2CPacket, BlockUpdateS2CPacket, BoatPaddleStateC2SPacket, BookUpdateC2SPacket, BossBarS2CPacket, BundlePacket, BundleS2CPacket, BundleSplitterPacket, ButtonClickC2SPacket, ChatMessageC2SPacket, ChatMessageS2CPacket, ChatSuggestionsS2CPacket, ChunkBiomeDataS2CPacket, ChunkDataS2CPacket, ChunkDeltaUpdateS2CPacket, ChunkLoadDistanceS2CPacket, ChunkRenderDistanceCenterS2CPacket, ChunkSentS2CPacket, ClearTitleS2CPacket, ClickSlotC2SPacket, ClientCommandC2SPacket, ClientOptionsC2SPacket, ClientStatusC2SPacket, CloseHandledScreenC2SPacket, CloseScreenS2CPacket, CommandExecutionC2SPacket, CommandSuggestionsS2CPacket, CommandTreeS2CPacket, CommonPingS2CPacket, CommonPongC2SPacket, CooldownUpdateS2CPacket, CraftFailedResponseS2CPacket, CraftRequestC2SPacket, CreativeInventoryActionC2SPacket, CustomPayloadC2SPacket, CustomPayloadS2CPacket, DamageTiltS2CPacket, DeathMessageS2CPacket, DifficultyS2CPacket, DisconnectS2CPacket, DynamicRegistriesS2CPacket, EndCombatS2CPacket, EnterCombatS2CPacket, EnterConfigurationC2SPacket, EnterReconfigurationS2CPacket, EntitiesDestroyS2CPacket, EntityAnimationS2CPacket, EntityAttachS2CPacket, EntityAttributesS2CPacket, EntityDamageS2CPacket, EntityEquipmentUpdateS2CPacket, EntityPassengersSetS2CPacket, EntityPositionS2CPacket, EntityS2CPacket, EntityS2CPacket.MoveRelative, EntityS2CPacket.Rotate, EntityS2CPacket.RotateAndMoveRelative, EntitySetHeadYawS2CPacket, EntitySpawnS2CPacket, EntityStatusEffectS2CPacket, EntityStatusS2CPacket, EntityTrackerUpdateS2CPacket, EntityVelocityUpdateS2CPacket, ExperienceBarUpdateS2CPacket, ExperienceOrbSpawnS2CPacket, ExplosionS2CPacket, FeaturesS2CPacket, GameJoinS2CPacket, GameMessageS2CPacket, GameStateChangeS2CPacket, HandshakeC2SPacket, HandSwingC2SPacket, HealthUpdateS2CPacket, InventoryS2CPacket, ItemPickupAnimationS2CPacket, JigsawGeneratingC2SPacket, KeepAliveC2SPacket, KeepAliveS2CPacket, LightUpdateS2CPacket, LoginCompressionS2CPacket, LoginDisconnectS2CPacket, LoginHelloC2SPacket, LoginHelloS2CPacket, LoginKeyC2SPacket, LoginQueryRequestS2CPacket, LoginQueryResponseC2SPacket, LoginSuccessS2CPacket, LookAtS2CPacket, MapUpdateS2CPacket, MessageAcknowledgmentC2SPacket, NbtQueryResponseS2CPacket, OpenHorseScreenS2CPacket, OpenScreenS2CPacket, OpenWrittenBookS2CPacket, OverlayMessageS2CPacket, ParticleS2CPacket, PickFromInventoryC2SPacket, PingResultS2CPacket, PlayerAbilitiesS2CPacket, PlayerActionC2SPacket, PlayerActionResponseS2CPacket, PlayerInputC2SPacket, PlayerInteractBlockC2SPacket, PlayerInteractEntityC2SPacket, PlayerInteractItemC2SPacket, PlayerListHeaderS2CPacket, PlayerListS2CPacket, PlayerMoveC2SPacket, PlayerMoveC2SPacket.Full, PlayerMoveC2SPacket.LookAndOnGround, PlayerMoveC2SPacket.OnGroundOnly, PlayerMoveC2SPacket.PositionAndOnGround, PlayerPositionLookS2CPacket, PlayerRemoveS2CPacket, PlayerRespawnS2CPacket, PlayerSessionC2SPacket, PlayerSpawnPositionS2CPacket, PlaySoundFromEntityS2CPacket, PlaySoundS2CPacket, ProfilelessChatMessageS2CPacket, QueryBlockNbtC2SPacket, QueryEntityNbtC2SPacket, QueryPingC2SPacket, QueryRequestC2SPacket, QueryResponseS2CPacket, ReadyC2SPacket, ReadyS2CPacket, RecipeBookDataC2SPacket, RecipeCategoryOptionsC2SPacket, RemoveEntityStatusEffectS2CPacket, RemoveMessageS2CPacket, RenameItemC2SPacket, RequestCommandCompletionsC2SPacket, ResourcePackSendS2CPacket, ResourcePackStatusC2SPacket, ScoreboardDisplayS2CPacket, ScoreboardObjectiveUpdateS2CPacket, ScoreboardPlayerUpdateS2CPacket, ScreenHandlerPropertyUpdateS2CPacket, ScreenHandlerSlotUpdateS2CPacket, SelectAdvancementTabS2CPacket, SelectMerchantTradeC2SPacket, ServerMetadataS2CPacket, SetCameraEntityS2CPacket, SetTradeOffersS2CPacket, SignEditorOpenS2CPacket, SimulationDistanceS2CPacket, SpectatorTeleportC2SPacket, StartChunkSendS2CPacket, StatisticsS2CPacket, StopSoundS2CPacket, SubtitleS2CPacket, SynchronizeRecipesS2CPacket, SynchronizeTagsS2CPacket, TeamS2CPacket, TeleportConfirmC2SPacket, TitleFadeS2CPacket, TitleS2CPacket, UnloadChunkS2CPacket, UnlockRecipesS2CPacket, UpdateBeaconC2SPacket, UpdateCommandBlockC2SPacket, UpdateCommandBlockMinecartC2SPacket, UpdateDifficultyC2SPacket, UpdateDifficultyLockC2SPacket, UpdateJigsawC2SPacket, UpdatePlayerAbilitiesC2SPacket, UpdateSelectedSlotC2SPacket, UpdateSelectedSlotS2CPacket, UpdateSignC2SPacket, UpdateStructureBlockC2SPacket, VehicleMoveC2SPacket, VehicleMoveS2CPacket, WorldBorderCenterChangedS2CPacket, WorldBorderInitializeS2CPacket, WorldBorderInterpolateSizeS2CPacket, WorldBorderSizeChangedS2CPacket, WorldBorderWarningBlocksChangedS2CPacket, WorldBorderWarningTimeChangedS2CPacket, WorldEventS2CPacket, WorldTimeUpdateS2CPacket

public interface Packet<T extends PacketListener>
Mappings:
Namespace Name
official vd
intermediary net/minecraft/class_2596
named net/minecraft/network/packet/Packet
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(T listener)
     
    default @Nullable NetworkState
    Returns a new network state to transition to, or null to indicate no state change.
    default boolean
    Returns whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting.
    void
     
  • Method Details

    • write

      void write(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lvd;a(Lso;)V
      intermediary method_11052 Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/packet/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
    • apply

      void apply(T listener)
      Mappings:
      Namespace Name Mixin selector
      official a Lvd;a(Lsu;)V
      intermediary method_11054 Lnet/minecraft/class_2596;method_11054(Lnet/minecraft/class_2547;)V
      named apply Lnet/minecraft/network/packet/Packet;apply(Lnet/minecraft/network/listener/PacketListener;)V
    • isWritingErrorSkippable

      default boolean isWritingErrorSkippable()
      Returns whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting.
      Returns:
      whether a throwable in writing of this packet allows the connection to simply skip the packet's sending than disconnecting
      Mappings:
      Namespace Name Mixin selector
      official b Lvd;b()Z
      intermediary method_11051 Lnet/minecraft/class_2596;method_11051()Z
      named isWritingErrorSkippable Lnet/minecraft/network/packet/Packet;isWritingErrorSkippable()Z
    • getNewNetworkState

      @Nullable default @Nullable NetworkState getNewNetworkState()
      Returns a new network state to transition to, or null to indicate no state change.

      The state transition is done on both the sender and receiver sides, but it is only in one direction (out of C2S and S2C). Another packet must be processed in the reverse direction to ensure the state in both directions are updated.

      Returns:
      a new network state to transition to, or null to indicate no state change
      Mappings:
      Namespace Name Mixin selector
      official c Lvd;c()Lsn;
      intermediary method_52273 Lnet/minecraft/class_2596;method_52273()Lnet/minecraft/class_2539;
      named getNewNetworkState Lnet/minecraft/network/packet/Packet;getNewNetworkState()Lnet/minecraft/network/NetworkState;