From 8e6326c0db4ceec909b7b949418fbf909d23af29 Mon Sep 17 00:00:00 2001 From: raven Date: Sun, 22 Mar 2026 16:32:00 -0500 Subject: use ExtPlayerList --- classic/ext_player_list.go | 30 ++++++++++++++++++++++++++++++ classic/packets.go | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 classic/ext_player_list.go (limited to 'classic') diff --git a/classic/ext_player_list.go b/classic/ext_player_list.go new file mode 100644 index 0000000..f01d550 --- /dev/null +++ b/classic/ext_player_list.go @@ -0,0 +1,30 @@ +package classic + +type AddPlayerName struct { + NameId int16 + PlayerName String + ListName String + GroupName String + GroupRank byte +} +func (p *AddPlayerName) PacketId() byte { + return 0x16 +} + +type RemovePlayerName struct { + NameId int16 +} +func (p *RemovePlayerName) PacketId() byte { + return 0x18 +} + +type AddEntity2 struct { + EntityId byte + InGameName String + SkinName String + X, Y, Z Fixed + Yaw, Pitch byte +} +func (p *AddEntity2) PacketId() byte { + return 0x21 +} diff --git a/classic/packets.go b/classic/packets.go index 0e55429..40f659c 100644 --- a/classic/packets.go +++ b/classic/packets.go @@ -201,6 +201,10 @@ func createPacketType(packetId byte, client bool, ext map[string]bool) Packet { case 0x10: return &ExtInfo {} case 0x11: return &ExtEntry {} case 0x13: return &CustomBlocksSupportLevel {} + case 0x16: return &AddPlayerName {} + case 0x18: return &RemovePlayerName {} + case 0x21: return &AddEntity2 {} + case 0x29: return &SetMapEnvProperty {} default: return nil } } -- cgit v1.2.3