diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-16 02:32:07 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-16 02:32:07 +0200 |
commit | 6a057410182ca7671215e6fecc9e289e50ceb0fc (patch) | |
tree | d472441699497cad6d4aaa3a56ea1db19cca7fdc /src/main/java/at/hannibal2/skyhanni/test | |
parent | 679689ad55e2ff4fa73e026b202f1cd7d19ddfaf (diff) | |
download | skyhanni-6a057410182ca7671215e6fecc9e289e50ceb0fc.tar.gz skyhanni-6a057410182ca7671215e6fecc9e289e50ceb0fc.tar.bz2 skyhanni-6a057410182ca7671215e6fecc9e289e50ceb0fc.zip |
hide damage splashes around damage indicator
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/test')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt index 1b0864385..d6f90d7b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt @@ -10,6 +10,9 @@ import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.client.Minecraft import net.minecraft.nbt.NBTTagCompound +import net.minecraft.network.play.server.S0EPacketSpawnObject +import net.minecraft.network.play.server.S0FPacketSpawnMob +import net.minecraft.network.play.server.S1CPacketEntityMetadata import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -20,6 +23,7 @@ class LorenzTest { companion object { var enabled = false + var togglePacketLog = false var text = "" val debugLogger = LorenzLogger("debug/test") @@ -95,6 +99,7 @@ class LorenzTest { } fun testCommand(args: Array<String>) { + togglePacketLog = !togglePacketLog } } @@ -109,7 +114,64 @@ class LorenzTest { @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) fun onChatPacket(event: PacketEvent.ReceiveEvent) { -// packetLog.log(event.packet.toString()) + val packet = event.packet + val name = packet.javaClass.simpleName + if (!togglePacketLog) return + + packetLog.log(name) + + if (packet is S0FPacketSpawnMob) { + packetLog.log("") + packetLog.log("Spawn Mob!") + for (watchableObject in packet.func_149027_c()) { + val any = watchableObject.`object` + val simpleName = any.javaClass.simpleName + + packetLog.log("javaClass: $simpleName") + packetLog.log("object: $any") + packetLog.log(" ") + } + packetLog.log(" ") + } + if (packet is S1CPacketEntityMetadata) { + packetLog.log("") + packetLog.log("Entity Metadata") + for (watchableObject in packet.func_149376_c()) { + val any = watchableObject.`object` + val simpleName = any.javaClass.simpleName + + packetLog.log("javaClass: $simpleName") + packetLog.log("object: $any") + packetLog.log(" ") + } + packetLog.log(" ") + } +// if (packet is S20PacketEntityProperties) { +// packetLog.log("") +// packetLog.log("Entity Properties") +// for (watchableObject in packet.func_149441_d()) { +// val any = watchableObject.`object` +// val simpleName = any.javaClass.simpleName +// +// packetLog.log("javaClass: $simpleName") +// packetLog.log("object: $any") +// packetLog.log(" ") +// } +// packetLog.log(" ") +// +// +// } + if (packet is S0EPacketSpawnObject) { + packetLog.log("Spawn Object") + } + + +// if (packet is S2CPacketSpawnGlobalEntity) { +// +// } +// if (packet is S2CPacketSpawnGlobalEntity) { +// +// } } // @SubscribeEvent |