@@ -8,7 +8,6 @@ import com.lambda.client.event.listener.listener
88import com.lambda.client.mixin.extension.*
99import com.lambda.client.module.Category
1010import com.lambda.client.module.Module
11- import com.lambda.client.module.modules.misc.MapDownloader.setting
1211import com.lambda.client.util.FolderUtils
1312import com.lambda.client.util.TickTimer
1413import com.lambda.client.util.TimeUnit
@@ -43,6 +42,8 @@ object PacketLogger : Module(
4342 private val ignoreUnknown by setting(" Ignore Unknown Packets" , false , description = " Ignore packets that aren't explicitly handled." )
4443 private val ignoreChat by setting(" Ignore Chat" , true , description = " Ignore chat packets." )
4544 private val ignoreCancelled by setting(" Ignore Cancelled" , true , description = " Ignore cancelled packets." )
45+ private val ignorePlayerPosition by setting(" Ignore Player Position" , false , description = " Ignore sent position & rotation packets." )
46+ private val ignoreTimeUpdates by setting(" Ignore Time Updates" , false , description = " Ignore time update packets." )
4647 private val openLogFolder by setting(" Open Log Folder..." , false , consumer = { _, _ ->
4748 FolderUtils .openFolder(FolderUtils .packetLogFolder)
4849 true
@@ -308,8 +309,39 @@ object PacketLogger : Module(
308309 " isSoundServerwide" to packet.isSoundServerwide
309310 }
310311 }
312+ is SPacketEntity .S15PacketEntityRelMove -> {
313+ logServer(packet) {
314+ " entityId" to packet.entityId
315+ " x" to packet.x
316+ " y" to packet.y
317+ " z" to packet.z
318+ " onGround" to packet.onGround
319+ }
320+ }
321+ is SPacketEntity .S16PacketEntityLook -> {
322+ logServer(packet) {
323+ " entityId" to packet.entityId
324+ " yaw" to packet.yaw
325+ " pitch" to packet.pitch
326+ " isRotating" to packet.isRotating
327+ " onGround" to packet.onGround
328+ }
329+ }
330+ is SPacketEntity .S17PacketEntityLookMove -> {
331+ logServer(packet) {
332+ " entityId" to packet.entityId
333+ " x" to packet.x
334+ " y" to packet.y
335+ " z" to packet.z
336+ " yaw" to packet.yaw
337+ " pitch" to packet.pitch
338+ " isRotating" to packet.isRotating
339+ " onGround" to packet.onGround
340+ }
341+ }
311342 is SPacketEntity -> {
312343 logServer(packet) {
344+ " entityId" to packet.entityId
313345 " x" to packet.x
314346 " y" to packet.y
315347 " z" to packet.z
@@ -344,6 +376,7 @@ object PacketLogger : Module(
344376 }
345377 is SPacketEntityHeadLook -> {
346378 logServer(packet) {
379+ " entityId" to packet.entityHeadLookEntityId
347380 " yaw" to packet.yaw
348381 }
349382 }
@@ -378,12 +411,12 @@ object PacketLogger : Module(
378411 }
379412 is SPacketEntityTeleport -> {
380413 logServer(packet) {
414+ " entityID" to packet.entityId
381415 " x" to packet.x
382416 " y" to packet.y
383417 " z" to packet.z
384418 " yaw" to packet.yaw
385419 " pitch" to packet.pitch
386- " entityID" to packet.entityId
387420 }
388421 }
389422 is SPacketEntityVelocity -> {
@@ -517,6 +550,28 @@ object PacketLogger : Module(
517550 }
518551 }
519552 }
553+ is SPacketPlayerListItem -> {
554+ logServer(packet) {
555+ " action" to packet.action.name
556+ " entries" to buildString {
557+ for (entry in packet.entries) {
558+ append(" > displayName: " )
559+ append(entry.displayName)
560+ append(" gameMode: " )
561+ append(entry.gameMode?.name)
562+ append(" ping: " )
563+ append(entry.ping)
564+ append(" profile.id: " )
565+ append(entry.profile?.id)
566+ append(" profile.name: " )
567+ append(entry.profile?.name)
568+ append(" profile.properties: " )
569+ append(entry.profile?.properties)
570+ append(' ' )
571+ }
572+ }
573+ }
574+ }
520575 is SPacketSoundEffect -> {
521576 logServer(packet) {
522577 " sound" to packet.sound.soundName
@@ -534,6 +589,17 @@ object PacketLogger : Module(
534589 " data" to packet.data
535590 }
536591 }
592+ is SPacketSpawnPlayer -> {
593+ logServer(packet) {
594+ " entityID" to packet.entityID
595+ " uniqueID" to packet.uniqueId
596+ " x" to packet.x
597+ " y" to packet.y
598+ " z" to packet.z
599+ " yaw" to packet.yaw
600+ " pitch" to packet.pitch
601+ }
602+ }
537603 is SPacketTeams -> {
538604 logServer(packet) {
539605 " action" to packet.action
@@ -542,9 +608,11 @@ object PacketLogger : Module(
542608 }
543609 }
544610 is SPacketTimeUpdate -> {
545- logServer(packet) {
546- " totalWorldTime" to packet.totalWorldTime
547- " worldTime" to packet.worldTime
611+ if (! ignoreTimeUpdates) {
612+ logServer(packet) {
613+ " totalWorldTime" to packet.totalWorldTime
614+ " worldTime" to packet.worldTime
615+ }
548616 }
549617 }
550618 is SPacketUnloadChunk -> {
@@ -581,17 +649,6 @@ object PacketLogger : Module(
581649 " windowId" to packet.windowId
582650 }
583651 }
584- is SPacketEntity .S15PacketEntityRelMove -> {
585- logServer(packet) {
586- " x" to packet.x
587- " y" to packet.y
588- " z" to packet.z
589- " yaw" to packet.yaw
590- " pitch" to packet.pitch
591- " isRotating" to packet.isRotating
592- " onGround" to packet.onGround
593- }
594- }
595652 else -> {
596653 if (! ignoreUnknown) {
597654 logServer(packet) {
@@ -652,33 +709,41 @@ object PacketLogger : Module(
652709 }
653710 }
654711 is CPacketPlayer .Rotation -> {
655- logClient(packet) {
656- " yaw" to packet.playerYaw
657- " pitch" to packet.playerPitch
658- " onGround" to packet.isOnGround
712+ if (! ignorePlayerPosition) {
713+ logClient(packet) {
714+ " yaw" to packet.playerYaw
715+ " pitch" to packet.playerPitch
716+ " onGround" to packet.isOnGround
717+ }
659718 }
660719 }
661720 is CPacketPlayer .Position -> {
662- logClient(packet) {
663- " x" to packet.playerX
664- " y" to packet.playerY
665- " z" to packet.playerZ
666- " onGround" to packet.isOnGround
721+ if (! ignorePlayerPosition) {
722+ logClient(packet) {
723+ " x" to packet.playerX
724+ " y" to packet.playerY
725+ " z" to packet.playerZ
726+ " onGround" to packet.isOnGround
727+ }
667728 }
668729 }
669730 is CPacketPlayer .PositionRotation -> {
670- logClient(packet) {
671- " x" to packet.playerX
672- " y" to packet.playerY
673- " z" to packet.playerZ
674- " yaw" to packet.playerYaw
675- " pitch" to packet.playerPitch
676- " onGround" to packet.isOnGround
731+ if (! ignorePlayerPosition) {
732+ logClient(packet) {
733+ " x" to packet.playerX
734+ " y" to packet.playerY
735+ " z" to packet.playerZ
736+ " yaw" to packet.playerYaw
737+ " pitch" to packet.playerPitch
738+ " onGround" to packet.isOnGround
739+ }
677740 }
678741 }
679742 is CPacketPlayer -> {
680- logClient(packet) {
681- " onGround" to packet.isOnGround
743+ if (! ignorePlayerPosition) {
744+ logClient(packet) {
745+ " onGround" to packet.isOnGround
746+ }
682747 }
683748 }
684749 is CPacketPlayerDigging -> {
0 commit comments