Sort packet type

This commit is contained in:
BruceChen 2022-09-04 00:37:52 +08:00
parent 7b68c0c45a
commit 5d05fc1d53
2 changed files with 180 additions and 188 deletions

View file

@ -10,133 +10,129 @@ namespace MinecraftClient.Protocol.Handlers
/// </summary> /// </summary>
public enum PacketTypesIn public enum PacketTypesIn
{ {
SpawnEntity, AcknowledgePlayerDigging, //
SpawnExperienceOrb, ActionBar, //
SpawnWeatherEntity, Advancements, //
SpawnLivingEntity, AttachEntity, //
SpawnPainting, BlockAction, //
SpawnPlayer, BlockBreakAnimation, //
EntityAnimation, BlockChange, //
Statistics, BlockChangedAck, // Added in 1.19
AcknowledgePlayerDigging, BlockEntityData, //
BlockBreakAnimation, BossBar, //
BlockEntityData, Camera, //
BlockAction, ChangeGameState, //
BlockChange, ChatMessage, //
BossBar, ChatPreview, // Added in 1.19
ServerDifficulty, ChatSuggestions, // Added in 1.19.1 (1.19.2)
ChatMessage, ChunkData, //
MultiBlockChange, ClearTiles, //
TabComplete, CloseWindow, //
DeclareCommands, CollectItem, //
WindowConfirmation, CombatEvent, //
CloseWindow, CraftRecipeResponse, //
WindowItems, DeathCombatEvent, //
WindowProperty, DeclareCommands, //
SetSlot, DeclareRecipes, //
SetCooldown, DestroyEntities, //
PluginMessage, Disconnect, //
NamedSoundEffect, DisplayScoreboard, //
Disconnect, Effect, //
EntityStatus, EndCombatEvent, //
Explosion, EnterCombatEvent, //
UnloadChunk, EntityAnimation, //
ChangeGameState, EntityEffect, //
OpenHorseWindow, EntityEquipment, //
KeepAlive, EntityHeadLook, //
ChunkData, EntityMetadata, //
Effect, EntityMovement, //
Particle, EntityPosition, //
UpdateLight, EntityPositionAndRotation, //
JoinGame, EntityProperties, //
MapData, EntityRotation, //
TradeList, EntitySoundEffect, //
EntityPosition, EntityStatus, //
EntityPositionAndRotation, EntityTeleport, //
EntityRotation, EntityVelocity, //
EntityMovement, Explosion, //
VehicleMove, FacePlayer, //
OpenBook, HeldItemChange, //
OpenWindow, HideMessage, // Added in 1.19.1 (1.19.2)
OpenSignEditor, InitializeWorldBorder, //
CraftRecipeResponse, JoinGame, //
PlayerAbilities, KeepAlive, //
CombatEvent,
PlayerInfo,
FacePlayer,
PlayerPositionAndLook,
UnlockRecipes,
DestroyEntities,
RemoveEntityEffect,
ResourcePackSend,
Respawn,
EntityHeadLook,
SelectAdvancementTab,
WorldBorder,
Camera,
HeldItemChange,
UpdateViewPosition,
UpdateViewDistance,
DisplayScoreboard,
EntityMetadata,
AttachEntity,
EntityVelocity,
EntityEquipment,
SetExperience,
UpdateHealth,
ScoreboardObjective,
SetPassengers,
Teams,
UpdateScore,
SpawnPosition,
TimeUpdate,
Title,
EntitySoundEffect,
SoundEffect,
StopSound,
PlayerListHeaderAndFooter,
NBTQueryResponse,
CollectItem,
EntityTeleport,
Advancements,
EntityProperties,
EntityEffect,
DeclareRecipes,
SetTitleTime,
SetTitleText,
SetTitleSubTitle,
WorldBorderWarningReach,
WorldBorderWarningDelay,
WorldBorderSize,
WorldBorderLerpSize,
WorldBorderCenter,
ActionBar,
Tags,
DeathCombatEvent,
EnterCombatEvent,
EndCombatEvent,
Ping,
InitializeWorldBorder,
SkulkVibrationSignal,
ClearTiles,
UseBed, // For 1.13.2 or below
MapChunkBulk, // For 1.8 or below MapChunkBulk, // For 1.8 or below
MapData, //
MessageHeader, // Added in 1.19.1 (1.19.2)
MultiBlockChange, //
NamedSoundEffect, //
NBTQueryResponse, //
OpenBook, //
OpenHorseWindow, //
OpenSignEditor, //
OpenWindow, //
Particle, //
Ping, //
PlayerAbilities, //
PlayerInfo, //
PlayerListHeaderAndFooter, //
PlayerPositionAndLook, //
PluginMessage, //
RemoveEntityEffect, //
ResourcePackSend, //
Respawn, //
ScoreboardObjective, //
SelectAdvancementTab, //
ServerData, // Added in 1.19
ServerDifficulty, //
SetCompression, // For 1.8 or below SetCompression, // For 1.8 or below
UpdateSign, // For 1.8 or below SetCooldown, //
UpdateEntityNBT, // For 1.8 or below SetDisplayChatPreview, // Added in 1.19
SetExperience, //
SetPassengers, //
SetSlot, //
SetTitleSubTitle, //
SetTitleText, //
SetTitleTime, //
SkulkVibrationSignal, //
SoundEffect, //
SpawnEntity, //
SpawnExperienceOrb, //
SpawnLivingEntity, //
SpawnPainting, //
SpawnPlayer, //
SpawnPosition, //
SpawnWeatherEntity, //
Statistics, //
StopSound, //
SystemChat, // Added in 1.19
TabComplete, //
Tags, //
Teams, //
TimeUpdate, //
Title, //
TradeList, //
Unknown, // For old version packet that have been removed and not used by mcc Unknown, // For old version packet that have been removed and not used by mcc
UpdateSimulationDistance, UnloadChunk, //
UnlockRecipes, //
// 1.19 Additions UpdateEntityNBT, // For 1.8 or below
BlockChangedAck, UpdateHealth, //
ChatPreview, UpdateLight, //
ServerData, UpdateScore, //
SetDisplayChatPreview, UpdateSign, // For 1.8 or below
SystemChat, UpdateSimulationDistance, //
UpdateViewDistance, //
// Added in 1.19.1 (1.19.2) UpdateViewPosition, //
ChatSuggestions, UseBed, // For 1.13.2 or below
HideMessage, VehicleMove, //
MessageHeader WindowConfirmation, //
WindowItems, //
WindowProperty, //
WorldBorder, //
WorldBorderCenter, //
WorldBorderLerpSize, //
WorldBorderSize, //
WorldBorderWarningDelay, //
WorldBorderWarningReach, //
} }
} }

View file

@ -10,65 +10,61 @@ namespace MinecraftClient.Protocol.Handlers
/// </summary> /// </summary>
public enum PacketTypesOut public enum PacketTypesOut
{ {
TeleportConfirm, AdvancementTab, //
QueryBlockNBT, Animation, //
SetDifficulty, ChatCommand, // Added in 1.19
ChatMessage, ChatMessage, //
ClientStatus, ChatPreview, // Added in 1.19
ClientSettings, ClickWindow, //
TabComplete, ClickWindowButton, //
WindowConfirmation, ClientSettings, //
ClickWindowButton, ClientStatus, //
ClickWindow, CloseWindow, //
CloseWindow, CraftRecipeRequest, //
PluginMessage, CreativeInventoryAction, //
EditBook, EditBook, //
EntityNBTRequest,
InteractEntity,
KeepAlive,
LockDifficulty,
PlayerPosition,
PlayerPositionAndRotation,
PlayerRotation,
PlayerMovement,
VehicleMove,
SteerBoat,
PickItem,
CraftRecipeRequest,
PlayerAbilities,
PlayerDigging,
EntityAction,
SteerVehicle,
RecipeBookData,
NameItem,
ResourcePackStatus,
AdvancementTab,
SelectTrade,
SetBeaconEffect,
HeldItemChange,
UpdateCommandBlock,
UpdateCommandBlockMinecart,
CreativeInventoryAction,
UpdateJigsawBlock,
UpdateStructureBlock,
UpdateSign,
Animation,
Spectate,
PlayerBlockPlacement,
UseItem,
Pong,
PrepareCraftingGrid, // For 1.12 - 1.12.1 only
EnchantItem, // For 1.13.2 or below EnchantItem, // For 1.13.2 or below
EntityAction, //
EntityNBTRequest, //
GenerateStructure, // Added in 1.16 GenerateStructure, // Added in 1.16
HeldItemChange, //
InteractEntity, //
KeepAlive, //
LockDifficulty, //
MessageAcknowledgment, // Added in 1.19.1 (1.19.2)
NameItem, //
PickItem, //
PlayerAbilities, //
PlayerBlockPlacement, //
PlayerDigging, //
PlayerMovement, //
PlayerPosition, //
PlayerPositionAndRotation, //
PlayerRotation, //
PluginMessage, //
Pong, //
PrepareCraftingGrid, // For 1.12 - 1.12.1 only
QueryBlockNBT, //
RecipeBookData, //
ResourcePackStatus, //
SelectTrade, //
SetBeaconEffect, //
SetDifficulty, //
SetDisplayedRecipe, // Added in 1.16.2 SetDisplayedRecipe, // Added in 1.16.2
SetRecipeBookState, // Added in 1.16.2 SetRecipeBookState, // Added in 1.16.2
Spectate, //
SteerBoat, //
SteerVehicle, //
TabComplete, //
TeleportConfirm, //
Unknown, // For old version packet that have been removed and not used by mcc Unknown, // For old version packet that have been removed and not used by mcc
UpdateCommandBlock, //
// Added in 1.19 UpdateCommandBlockMinecart, //
ChatCommand, UpdateJigsawBlock, //
ChatPreview, UpdateSign, //
UpdateStructureBlock, //
// Added in 1.19.1 (1.19.2) UseItem, //
MessageAcknowledgment VehicleMove, //
WindowConfirmation, //
} }
} }