Rework soundIDs and packetIDs generator code to not be platform specific

This commit is contained in:
Scott Binns
2021-01-08 21:27:57 -07:00
parent 8b93d44f86
commit b299065c78
4 changed files with 200 additions and 186 deletions

View File

@ -1,8 +1,8 @@
// This file is automatically generated by gen_packetIDs.go. DO NOT EDIT.
package data
//go:generate bash -c "go run gen_packetIDs.go > packetIDs.go"
// This file is automatically generated by gen_packetIDs.go. DO NOT EDIT.
//go:generate go run gen_packetIDs.go
// PktID represents a packet ID used in the minecraft protocol.
type PktID int32
@ -16,152 +16,152 @@ const (
LoginPluginRequest PktID = 0x04
Disconnect PktID = 0x00
// Serverbound packets for connections in the login state.
LoginStart PktID = 0x00
EncryptionBeginServerbound PktID = 0x01
LoginPluginResponse PktID = 0x02
LoginStart PktID = 0x00
// Clientbound packets for connections in the play state.
EntityMetadata PktID = 0x44
Teams PktID = 0x4c
BossBar PktID = 0x0c
Map PktID = 0x25
Difficulty PktID = 0x0d
Camera PktID = 0x3e
WindowItems PktID = 0x13
ScoreboardObjective PktID = 0x4a
RelEntityMove PktID = 0x27
DeclareCommands PktID = 0x10
CombatEvent PktID = 0x31
SpawnEntityPainting PktID = 0x03
EntityMoveLook PktID = 0x28
ScoreboardScore PktID = 0x4d
Title PktID = 0x4f
CraftProgressBar PktID = 0x14
NamedEntitySpawn PktID = 0x04
ScoreboardDisplayObjective PktID = 0x43
WorldParticles PktID = 0x22
OpenWindow PktID = 0x2d
MultiBlockChange PktID = 0x3b
EntitySoundEffect PktID = 0x50
Tags PktID = 0x5b
EntityUpdateAttributes PktID = 0x58
NamedSoundEffect PktID = 0x18
GameStateChange PktID = 0x1d
PlayerInfo PktID = 0x32
Advancements PktID = 0x57
Explosion PktID = 0x1b
KeepAliveClientbound PktID = 0x1f
MapChunk PktID = 0x20
AttachEntity PktID = 0x45
TradeList PktID = 0x26
Respawn PktID = 0x39
EntityDestroy PktID = 0x36
Experience PktID = 0x48
EntityLook PktID = 0x29
OpenBook PktID = 0x2c
WorldEvent PktID = 0x21
DeclareRecipes PktID = 0x5a
UnlockRecipes PktID = 0x35
EntityEquipment PktID = 0x47
EntityVelocity PktID = 0x46
Animation PktID = 0x05
UpdateViewDistance PktID = 0x41
HeldItemSlotClientbound PktID = 0x3f
NbtQueryResponse PktID = 0x54
Entity PktID = 0x2a
UpdateViewPosition PktID = 0x40
AbilitiesClientbound PktID = 0x30
OpenSignEntity PktID = 0x2e
SetSlot PktID = 0x15
PlayerlistHeader PktID = 0x53
ResourcePackSend PktID = 0x38
SpawnEntityExperienceOrb PktID = 0x01
Collect PktID = 0x55
Statistics PktID = 0x06
TileEntityData PktID = 0x09
ChatClientbound PktID = 0x0e
WorldBorder PktID = 0x3d
UnloadChunk PktID = 0x1c
UpdateLight PktID = 0x23
UpdateHealth PktID = 0x49
RemoveEntityEffect PktID = 0x37
KickDisconnect PktID = 0x19
UnlockRecipes PktID = 0x35
Animation PktID = 0x05
WorldEvent PktID = 0x21
ScoreboardDisplayObjective PktID = 0x43
CustomPayloadClientbound PktID = 0x17
SpawnPosition PktID = 0x42
EntityStatus PktID = 0x1a
SpawnEntity PktID = 0x00
NamedSoundEffect PktID = 0x18
HeldItemSlotClientbound PktID = 0x3f
ChatClientbound PktID = 0x0e
AbilitiesClientbound PktID = 0x30
EntityDestroy PktID = 0x36
SetPassengers PktID = 0x4b
FacePlayer PktID = 0x33
TransactionClientbound PktID = 0x11
BlockAction PktID = 0x0a
BlockBreakAnimation PktID = 0x08
BlockChange PktID = 0x0b
Login PktID = 0x24
VehicleMoveClientbound PktID = 0x2b
CraftRecipeResponse PktID = 0x2f
SetCooldown PktID = 0x16
StopSound PktID = 0x52
EntityEffect PktID = 0x59
CloseWindowClientbound PktID = 0x12
AcknowledgePlayerDigging PktID = 0x07
SelectAdvancementTab PktID = 0x3c
EntityHeadRotation PktID = 0x3a
TabCompleteClientbound PktID = 0x0f
PositionClientbound PktID = 0x34
KeepAliveClientbound PktID = 0x1f
SpawnEntityExperienceOrb PktID = 0x01
OpenHorseWindow PktID = 0x1e
RemoveEntityEffect PktID = 0x37
RelEntityMove PktID = 0x27
SelectAdvancementTab PktID = 0x3c
OpenSignEntity PktID = 0x2e
Map PktID = 0x25
FacePlayer PktID = 0x33
EntityEquipment PktID = 0x47
ResourcePackSend PktID = 0x38
NbtQueryResponse PktID = 0x54
ScoreboardObjective PktID = 0x4a
StopSound PktID = 0x52
OpenWindow PktID = 0x2d
Camera PktID = 0x3e
Advancements PktID = 0x57
UpdateTime PktID = 0x4e
SpawnEntityLiving PktID = 0x02
Login PktID = 0x24
PositionClientbound PktID = 0x34
UpdateViewPosition PktID = 0x40
EntitySoundEffect PktID = 0x50
Respawn PktID = 0x39
BlockChange PktID = 0x0b
BlockBreakAnimation PktID = 0x08
Title PktID = 0x4f
EntityTeleport PktID = 0x56
EntityEffect PktID = 0x59
TileEntityData PktID = 0x09
SpawnPosition PktID = 0x42
WorldBorder PktID = 0x3d
Experience PktID = 0x48
PlayerlistHeader PktID = 0x53
WindowItems PktID = 0x13
EntityUpdateAttributes PktID = 0x58
EntityHeadRotation PktID = 0x3a
VehicleMoveClientbound PktID = 0x2b
MapChunk PktID = 0x20
EntityLook PktID = 0x29
Teams PktID = 0x4c
UpdateViewDistance PktID = 0x41
Explosion PktID = 0x1b
MultiBlockChange PktID = 0x3b
PlayerInfo PktID = 0x32
CraftRecipeResponse PktID = 0x2f
TransactionClientbound PktID = 0x11
TradeList PktID = 0x26
CloseWindowClientbound PktID = 0x12
TabCompleteClientbound PktID = 0x0f
SetCooldown PktID = 0x16
BlockAction PktID = 0x0a
NamedEntitySpawn PktID = 0x04
SpawnEntityPainting PktID = 0x03
UpdateLight PktID = 0x23
CombatEvent PktID = 0x31
SpawnEntityLiving PktID = 0x02
ScoreboardScore PktID = 0x4d
DeclareCommands PktID = 0x10
UpdateHealth PktID = 0x49
EntityMetadata PktID = 0x44
AttachEntity PktID = 0x45
Tags PktID = 0x5b
EntityStatus PktID = 0x1a
AcknowledgePlayerDigging PktID = 0x07
Collect PktID = 0x55
WorldParticles PktID = 0x22
Entity PktID = 0x2a
UnloadChunk PktID = 0x1c
Difficulty PktID = 0x0d
CraftProgressBar PktID = 0x14
BossBar PktID = 0x0c
DeclareRecipes PktID = 0x5a
GameStateChange PktID = 0x1d
Statistics PktID = 0x06
EntityVelocity PktID = 0x46
SetSlot PktID = 0x15
OpenBook PktID = 0x2c
SoundEffect PktID = 0x51
EntityMoveLook PktID = 0x28
SpawnEntity PktID = 0x00
// Serverbound packets for connections in the play state.
SetBeaconEffect PktID = 0x24
UpdateStructureBlock PktID = 0x2a
EnchantItem PktID = 0x08
Spectate PktID = 0x2d
ArmAnimation PktID = 0x2c
QueryEntityNbt PktID = 0x0d
Flying PktID = 0x15
ResourcePackReceive PktID = 0x21
BlockDig PktID = 0x1b
AbilitiesServerbound PktID = 0x1a
CustomPayloadServerbound PktID = 0x0b
SelectTrade PktID = 0x23
UpdateJigsawBlock PktID = 0x29
SteerVehicle PktID = 0x1d
Settings PktID = 0x05
SteerBoat PktID = 0x17
UseItem PktID = 0x2f
TeleportConfirm PktID = 0x00
PickItem PktID = 0x18
CraftRecipeRequest PktID = 0x19
Look PktID = 0x14
TabCompleteServerbound PktID = 0x06
AdvancementTab PktID = 0x22
SetCreativeSlot PktID = 0x28
UpdateSign PktID = 0x2b
WindowClick PktID = 0x09
PositionLook PktID = 0x13
UpdateCommandBlock PktID = 0x26
QueryBlockNbt PktID = 0x01
Flying PktID = 0x15
KeepAliveServerbound PktID = 0x10
ClientCommand PktID = 0x04
BlockPlace PktID = 0x2e
EntityAction PktID = 0x1c
PositionServerbound PktID = 0x12
TransactionServerbound PktID = 0x07
UpdateSign PktID = 0x2b
QueryBlockNbt PktID = 0x01
PositionLook PktID = 0x13
HeldItemSlotServerbound PktID = 0x25
EditBook PktID = 0x0c
UpdateCommandBlock PktID = 0x26
UseEntity PktID = 0x0e
ResourcePackReceive PktID = 0x21
Spectate PktID = 0x2d
TeleportConfirm PktID = 0x00
GenerateStructure PktID = 0x0f
NameItem PktID = 0x20
RecipeBook PktID = 0x1f
KeepAliveServerbound PktID = 0x10
CustomPayloadServerbound PktID = 0x0b
VehicleMoveServerbound PktID = 0x16
CloseWindowServerbound PktID = 0x0a
UpdateCommandBlockMinecart PktID = 0x27
WindowClick PktID = 0x09
ChatServerbound PktID = 0x03
SetCreativeSlot PktID = 0x28
DisplayedRecipe PktID = 0x1e
BlockPlace PktID = 0x2e
LockDifficulty PktID = 0x11
SetDifficulty PktID = 0x02
CloseWindowServerbound PktID = 0x0a
Look PktID = 0x14
AdvancementTab PktID = 0x22
SetBeaconEffect PktID = 0x24
AbilitiesServerbound PktID = 0x1a
ChatServerbound PktID = 0x03
DisplayedRecipe PktID = 0x1e
RecipeBook PktID = 0x1f
UpdateJigsawBlock PktID = 0x29
TransactionServerbound PktID = 0x07
SteerVehicle PktID = 0x1d
NameItem PktID = 0x20
PickItem PktID = 0x18
UpdateStructureBlock PktID = 0x2a
TabCompleteServerbound PktID = 0x06
HeldItemSlotServerbound PktID = 0x25
SteerBoat PktID = 0x17
Settings PktID = 0x05
UseItem PktID = 0x2f
CraftRecipeRequest PktID = 0x19
UpdateCommandBlockMinecart PktID = 0x27
BlockDig PktID = 0x1b
EditBook PktID = 0x0c
UseEntity PktID = 0x0e
VehicleMoveServerbound PktID = 0x16
ArmAnimation PktID = 0x2c
LockDifficulty PktID = 0x11
QueryEntityNbt PktID = 0x0d
// Clientbound packets used to respond to ping/status requests.
ServerInfo PktID = 0x00