diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 17:00:01 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 17:00:01 +0200 |
commit | ce00374e43f54ab574a8198f94d7a13270d48888 (patch) | |
tree | a6fa18deea59bb66cec166c2a5f412c0ca29beb2 /src/main/java/at/hannibal2/skyhanni/mixins/hooks | |
parent | 9946e80fa0fb5da41c4ad8e5ace2edad6c519167 (diff) | |
download | skyhanni-ce00374e43f54ab574a8198f94d7a13270d48888.tar.gz skyhanni-ce00374e43f54ab574a8198f94d7a13270d48888.tar.bz2 skyhanni-ce00374e43f54ab574a8198f94d7a13270d48888.zip |
add blaze particle hide feature
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/mixins/hooks')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/hooks/EntityBlazeHook.kt | 9 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt | 33 |
2 files changed, 33 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/EntityBlazeHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/EntityBlazeHook.kt deleted file mode 100644 index 9b7e09cc7..000000000 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/EntityBlazeHook.kt +++ /dev/null @@ -1,9 +0,0 @@ -package at.hannibal2.skyhanni.mixins.hooks - -import at.hannibal2.skyhanni.events.BlazeParticleEvent -import net.minecraft.entity.monster.EntityBlaze - -fun onBlockBlazeParticle(mixinBlaze: Any): Boolean { - val blaze = mixinBlaze as EntityBlaze - return BlazeParticleEvent(blaze).postAndCatch() -} diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt new file mode 100644 index 000000000..0ae72fddf --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderGlobalHook.kt @@ -0,0 +1,33 @@ +package at.hannibal2.skyhanni.mixins.hooks + +import at.hannibal2.skyhanni.events.SpawnParticleEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo + +class RenderGlobalHook { + companion object { + @JvmStatic + fun spawnParticle( + particleId: Int, + x: Double, + y: Double, + z: Double, + ci: CallbackInfo, + ) { + val callerClass = LorenzUtils.getCallerClass( + "at.hannibal2.skyhanni.mixins.hooks.RenderGlobalHook\$Companion", + "at.hannibal2.skyhanni.mixins.hooks.RenderGlobalHook", + "net.minecraft.client.renderer.RenderGlobal", + "net.minecraft.world.World", + "net.minecraft.client.network.NetHandlerPlayClient", + "net.minecraft.network.play.server.S2APacketParticles", + ) ?: "null" + + if (SpawnParticleEvent(particleId, callerClass, x, y, z).postAndCatch()) { + ci.cancel() + return + } + + } + } +}
\ No newline at end of file |