Update packetIDs to 1.16

This commit is contained in:
genanik
2020-07-01 09:48:26 +08:00
parent b602b7b3e0
commit 32a6898b12
2 changed files with 29 additions and 28 deletions

View File

@ -274,8 +274,9 @@ func handleSetSlotPacket(c *Client, p pk.Packet) error {
func handleChatMessagePacket(c *Client, p pk.Packet) (err error) { func handleChatMessagePacket(c *Client, p pk.Packet) (err error) {
var ( var (
s chat.Message s chat.Message
pos pk.Byte pos pk.Byte
sender pk.UUID
) )
err = p.Scan(&s, &pos) err = p.Scan(&s, &pos)

View File

@ -4,26 +4,25 @@ package data
const ( const (
SpawnObject byte = iota //0x00 SpawnObject byte = iota //0x00
SpawnExperienceOrb SpawnExperienceOrb
SpawnGlobalEntity SpawnLivingEntity
SpawnMob
SpawnPainting SpawnPainting
SpawnPlayer SpawnPlayer
AnimationClientbound EntityAnimationClientbound
Statistics Statistics
AcknowledgePlayerDigging AcknowledgePlayerDigging
BlockBreakAnimation BlockBreakAnimation
UpdateBlockEntity BlockEntityData
BlockAction BlockAction
BlockChange BlockChange
BossBar BossBar
ServerDifficulty ServerDifficulty
ChatMessageClientbound ChatMessageClientbound
MultiBlockChange
MultiBlockChange //0x10 TabComplete //0x10
TabComplete
DeclareCommands DeclareCommands
ConfirmTransaction WindowConfirmationClientbound
CloseWindow CloseWindowClientbound
WindowItems WindowItems
WindowProperty WindowProperty
SetSlot SetSlot
@ -35,14 +34,14 @@ const (
Explosion Explosion
UnloadChunk UnloadChunk
ChangeGameState ChangeGameState
OpenHorseWindow
OpenHorseWindow //0x20 KeepAliveClientbound //0x20
KeepAliveClientbound ChunkData // TODO Pre
ChunkData
Effect Effect
Particle Particle
UpdateLight UpdateLight
JoinGame JoinGame // TODO Pre
MapData MapData
TradeList TradeList
EntityRelativeMove EntityRelativeMove
@ -52,9 +51,9 @@ const (
VehicleMoveClientbound VehicleMoveClientbound
OpenBook OpenBook
OpenWindow OpenWindow
OpenSignEditor
OpenSignEditor //0x30 CraftRecipeResponse //0x30
CraftRecipeResponse
PlayerAbilitiesClientbound PlayerAbilitiesClientbound
CombatEvent CombatEvent
PlayerInfo PlayerInfo
@ -69,10 +68,11 @@ const (
SelectAdvancementTab SelectAdvancementTab
WorldBorder WorldBorder
Camera Camera
HeldItemChangeClientbound
HeldItemChangeClientbound //0x40 UpdateViewPosition //0x40
UpdateViewPosition
UpdateViewDistance UpdateViewDistance
SpawnPosition
DisplayScoreboard DisplayScoreboard
EntityMetadata EntityMetadata
AttachEntity AttachEntity
@ -84,11 +84,10 @@ const (
SetPassengers SetPassengers
Teams Teams
UpdateScore UpdateScore
SpawnPosition
TimeUpdate TimeUpdate
Title
Title //0x50 EntitySoundEffect //0x50
EntitySoundEffect
SoundEffect SoundEffect
StopSound StopSound
PlayerListHeaderAndFooter PlayerListHeaderAndFooter
@ -98,8 +97,8 @@ const (
Advancements Advancements
EntityProperties EntityProperties
EntityEffect EntityEffect
DeclareRecipes DeclareRecipes // TODO Pre
Tags //0x5C Tags //0x5B
) )
// Serverbound packet IDs // Serverbound packet IDs
@ -119,9 +118,10 @@ const (
EditBook EditBook
QueryEntityNBT QueryEntityNBT
UseEntity UseEntity
KeepAliveServerbound GenerateStructure
LockDifficulty //0x10 KeepAliveServerbound //0x10
LockDifficulty
PlayerPosition PlayerPosition
PlayerPositionAndLookServerbound PlayerPositionAndLookServerbound
PlayerLook PlayerLook
@ -136,9 +136,9 @@ const (
SteerVehicle SteerVehicle
RecipeBookData RecipeBookData
NameItem NameItem
ResourcePackStatus
AdvancementTab //0x20 ResourcePackStatus //0x20
AdvancementTab
SelectTrade SelectTrade
SetBeaconEffect SetBeaconEffect
HeldItemChangeServerbound HeldItemChangeServerbound
@ -151,5 +151,5 @@ const (
AnimationServerbound AnimationServerbound
Spectate Spectate
PlayerBlockPlacement PlayerBlockPlacement
UseItem //0x2D UseItem //0x2E
) )