diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-10 13:56:47 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-10 13:56:47 +0200 |
commit | 3ec60ce22dcc2a59d61e7a9b49b43bf13e219fce (patch) | |
tree | d3b0404600e28ed1c3e79548477bf0bb46c5c495 /src/main/java/at/hannibal2/skyhanni/test | |
parent | 9e0eb60ef9f53553361d61182c99d1925547e20d (diff) | |
download | skyhanni-3ec60ce22dcc2a59d61e7a9b49b43bf13e219fce.tar.gz skyhanni-3ec60ce22dcc2a59d61e7a9b49b43bf13e219fce.tar.bz2 skyhanni-3ec60ce22dcc2a59d61e7a9b49b43bf13e219fce.zip |
changed LorenzTest
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt | 75 |
1 files changed, 51 insertions, 24 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt index b5f685420..3b3afe087 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt @@ -46,8 +46,6 @@ class LorenzTest { b = args[1].toDouble() c = args[2].toDouble() -// togglePacketLog = !togglePacketLog - // for (line in (Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay).footer.unformattedText // .split("\n")) { // println("footer: '$line'") @@ -61,6 +59,7 @@ class LorenzTest { fun togglePacketLog() { shouldLogPackets = !shouldLogPackets + println("shouldLogPackets: $shouldLogPackets") } } @@ -92,41 +91,69 @@ class LorenzTest { @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) fun onChatPacket(event: PacketEvent.ReceiveEvent) { val packet = event.packet - val name = packet.javaClass.simpleName - if (!shouldLogPackets) return +// if (Minecraft.getMinecraft().thePlayer.isSneaking) { // if (packet is S2APacketParticles) { +// val particleType = packet.particleType // +// // FIREWORKS_SPARK ENCHANTMENT_TABLE DRIP_LAVA +// if (particleType != EnumParticleTypes.FIREWORKS_SPARK) return +// val loc = packet.toLorenzVec() +// val distance = loc.distance(LocationUtils.playerLocation()) +// if (distance > 15) return +// list.add(loc) +// while (list.size > 3) { +// list.removeFirst() +// } // -// val particleType = packet.particleType // println("") // println("particleType: $particleType") // -//// val particleType = packet.particleType -//// val particleCount = packet.particleCount -//// -//// var lorenzVec = packet.toLorenzVec() -////// if (lorenzVec.distance(LocationUtils.playerLocation()) > 20) return -//// -//// if (particleType == EnumParticleTypes.FLAME) { -//// -//// println(" ") -//// val particleSpeed = packet.particleSpeed -//// val xOffset = packet.xOffset -//// val yOffset = packet.yOffset -//// val zOffset = packet.zOffset -//// println("particleCount: $particleCount") -//// println("particleSpeed: $particleSpeed") -//// println("xOffset: $xOffset") -//// println("yOffset: $yOffset") -//// println("zOffset: $zOffset") +// val particleCount = packet.particleCount +// +// println("distance: $distance") +// +// val particleArgs = packet.particleArgs +// println("args: " + particleArgs.size) +// for ((i, particleArg) in particleArgs.withIndex()) { +// println("$i $particleArg") +// } +// +// val particleSpeed = packet.particleSpeed +// val x = packet.xOffset +// val y = packet.yOffset +// val z = packet.zOffset +// println("particleCount: $particleCount") +// println("particleSpeed: $particleSpeed") +// println("xOffset: $x") +// println("yOffset: $y") +// println("zOffset: $z") //// } +// } + + + if (!shouldLogPackets) return + val name = packet.javaClass.simpleName // +// if (name == "S2APacketParticles") return +// if (name == "S3BPacketScoreboardObjective") return +// if (name == "S18PacketEntityTeleport") return +// if (name == "S38PacketPlayerListItem") return +// if (name == "S17PacketEntityLookMove") return +// if (name == "S00PacketKeepAlive") return +// if (name == "S23PacketBlockChange") return +// if (name == "S32PacketConfirmTransaction") return +// if (name == "S47PacketPlayerListHeaderFooter") return +// if (name == "S29PacketSoundEffect") return +// if (name == "S04PacketEntityEquipment") return +// if (name == "S16PacketEntityLook") return // +// println(name) + // } - println(name) + // packetLog.log(name) // if (packet is S18PacketEntityTeleport) { |