aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 19:31:31 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-17 19:31:31 +0200
commit946a9f1102f79fd4ddca164d726396f2b540479a (patch)
treec8cb065a3eee19e28459466ed35a6bde462fb24d
parent5065d642a260ddee2d267ac9c43e9408e43747b9 (diff)
downloadSkyHanni-946a9f1102f79fd4ddca164d726396f2b540479a.tar.gz
SkyHanni-946a9f1102f79fd4ddca164d726396f2b540479a.tar.bz2
SkyHanni-946a9f1102f79fd4ddca164d726396f2b540479a.zip
changed LorenzTest
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt66
1 files changed, 58 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
index 47e6c1491..5086464c8 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.test
import at.hannibal2.skyhanni.SkyHanniMod
-import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.PlayParticleEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
@@ -59,8 +58,6 @@ class LorenzTest {
Minecraft.getMinecraft().thePlayer.addChatMessage(text1)
-
-
// a = args[0].toDouble()
// b = args[1].toDouble()
// c = args[2].toDouble()
@@ -81,7 +78,7 @@ class LorenzTest {
println("shouldLogPackets: $shouldLogPackets")
}
- var highestStep = 0
+ private var highestStep = 0
fun highStep(step: Int) {
if (step > highestStep) {
@@ -120,9 +117,13 @@ class LorenzTest {
@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
fun onHypExplosions(event: PlayParticleEvent) {
// if (!LorenzUtils.inSkyblock) return
+// when (event.type) {
+// EnumParticleTypes.EXPLOSION_LARGE,
+// EnumParticleTypes.EXPLOSION_HUGE,
+// EnumParticleTypes.EXPLOSION_NORMAL,
+// -> event.isCanceled = true
//
-// if (event.type == EnumParticleTypes.EXPLOSION_LARGE) {
-// event.isCanceled = true
+// else -> {}
// }
}
@@ -375,8 +376,57 @@ class LorenzTest {
// if (name == "S29PacketSoundEffect") return
// if (name == "S04PacketEntityEquipment") return
// if (name == "S16PacketEntityLook") return
-//
-// println(name)
+
+// if (name == "S18PacketEntityTeleport") return
+
+// if (packet is S18PacketEntityTeleport) {
+// val entityId = packet.entityId
+// val x = packet.x
+// val y = packet.y
+// val z = packet.z
+// val location = LorenzVec(x, y, z)
+// val distance = location.distance(LocationUtils.playerLocation())
+// println(" ")
+// println("S18PacketEntityTeleport $entityId (" + distance.toInt() + ")")
+// println("location: $location")
+// println("distance: " + distance.toInt())
+// println("entityId: $entityId")
+// }
+
+// if (packet is S19PacketEntityHeadLook) {
+// val theWorld = Minecraft.getMinecraft().theWorld
+// val entity = packet.getEntity(theWorld) ?: return
+// val entityId = entity.entityId
+// println(" ")
+// println("S19PacketEntityHeadLook")
+// println("entityId: $entityId")
+// val lorenzVec = entity.getLorenzVec()
+// val distance = lorenzVec.distance(LocationUtils.playerLocation())
+// if (distance > 20) return
+// println("distance: $distance")
+// println("location: ${lorenzVec.printWithAccuracy(1)}")
+// return
+// }
+
+// if (packet is S15PacketEntityRelMove) {
+// val theWorld = Minecraft.getMinecraft().theWorld
+// val entity = packet.getEntity(theWorld) ?: return
+// val entityId = entity.entityId
+// println(" ")
+// println("S15PacketEntityRelMove")
+// println("entityId: $entityId")
+// val lorenzVec = entity.getLorenzVec()
+// val distance = lorenzVec.distance(LocationUtils.playerLocation())
+// if (distance > 20) return
+// println("distance: $distance")
+// println("location: ${lorenzVec.printWithAccuracy(1)}")
+// return
+// }
+
+
+
+
+
// if (packet is S18PacketEntityTeleport) {