@@ -8,7 +8,6 @@ import com.lambda.client.event.listener.listener
8
8
import com.lambda.client.mixin.extension.*
9
9
import com.lambda.client.module.Category
10
10
import com.lambda.client.module.Module
11
- import com.lambda.client.module.modules.misc.MapDownloader.setting
12
11
import com.lambda.client.util.FolderUtils
13
12
import com.lambda.client.util.TickTimer
14
13
import com.lambda.client.util.TimeUnit
@@ -43,6 +42,8 @@ object PacketLogger : Module(
43
42
private val ignoreUnknown by setting(" Ignore Unknown Packets" , false , description = " Ignore packets that aren't explicitly handled." )
44
43
private val ignoreChat by setting(" Ignore Chat" , true , description = " Ignore chat packets." )
45
44
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." )
46
47
private val openLogFolder by setting(" Open Log Folder..." , false , consumer = { _, _ ->
47
48
FolderUtils .openFolder(FolderUtils .packetLogFolder)
48
49
true
@@ -308,8 +309,39 @@ object PacketLogger : Module(
308
309
" isSoundServerwide" to packet.isSoundServerwide
309
310
}
310
311
}
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
+ }
311
342
is SPacketEntity -> {
312
343
logServer(packet) {
344
+ " entityId" to packet.entityId
313
345
" x" to packet.x
314
346
" y" to packet.y
315
347
" z" to packet.z
@@ -344,6 +376,7 @@ object PacketLogger : Module(
344
376
}
345
377
is SPacketEntityHeadLook -> {
346
378
logServer(packet) {
379
+ " entityId" to packet.entityHeadLookEntityId
347
380
" yaw" to packet.yaw
348
381
}
349
382
}
@@ -378,12 +411,12 @@ object PacketLogger : Module(
378
411
}
379
412
is SPacketEntityTeleport -> {
380
413
logServer(packet) {
414
+ " entityID" to packet.entityId
381
415
" x" to packet.x
382
416
" y" to packet.y
383
417
" z" to packet.z
384
418
" yaw" to packet.yaw
385
419
" pitch" to packet.pitch
386
- " entityID" to packet.entityId
387
420
}
388
421
}
389
422
is SPacketEntityVelocity -> {
@@ -517,6 +550,28 @@ object PacketLogger : Module(
517
550
}
518
551
}
519
552
}
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
+ }
520
575
is SPacketSoundEffect -> {
521
576
logServer(packet) {
522
577
" sound" to packet.sound.soundName
@@ -534,6 +589,17 @@ object PacketLogger : Module(
534
589
" data" to packet.data
535
590
}
536
591
}
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
+ }
537
603
is SPacketTeams -> {
538
604
logServer(packet) {
539
605
" action" to packet.action
@@ -542,9 +608,11 @@ object PacketLogger : Module(
542
608
}
543
609
}
544
610
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
+ }
548
616
}
549
617
}
550
618
is SPacketUnloadChunk -> {
@@ -581,17 +649,6 @@ object PacketLogger : Module(
581
649
" windowId" to packet.windowId
582
650
}
583
651
}
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
- }
595
652
else -> {
596
653
if (! ignoreUnknown) {
597
654
logServer(packet) {
@@ -652,33 +709,41 @@ object PacketLogger : Module(
652
709
}
653
710
}
654
711
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
+ }
659
718
}
660
719
}
661
720
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
+ }
667
728
}
668
729
}
669
730
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
+ }
677
740
}
678
741
}
679
742
is CPacketPlayer -> {
680
- logClient(packet) {
681
- " onGround" to packet.isOnGround
743
+ if (! ignorePlayerPosition) {
744
+ logClient(packet) {
745
+ " onGround" to packet.isOnGround
746
+ }
682
747
}
683
748
}
684
749
is CPacketPlayerDigging -> {
0 commit comments