From 2a6dbf5407b5772db3ac0d203da3cdfac13d69d5 Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Thu, 3 Nov 2022 11:34:09 +0100 Subject: Add fully Hypixel-Rule compliant glowing mush highlighter (#266) --- .../mixins/MixinNetHandlerPlayClient.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java index e47b03df..4bb91109 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java @@ -19,11 +19,10 @@ package io.github.moulberry.notenoughupdates.mixins; +import io.github.moulberry.notenoughupdates.events.SpawnParticleEvent; import io.github.moulberry.notenoughupdates.miscfeatures.AntiCoopAdd; -import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver; import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects; import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; -import io.github.moulberry.notenoughupdates.miscfeatures.FishingHelper; import io.github.moulberry.notenoughupdates.miscfeatures.ItemCooldowns; import io.github.moulberry.notenoughupdates.miscfeatures.MiningStuff; import io.github.moulberry.notenoughupdates.miscfeatures.NewApiKeyHelper; @@ -80,22 +79,18 @@ public class MixinNetHandlerPlayClient { double xCoord, double yCoord, double zCoord, double xOffset, double yOffset, double zOffset, int[] params ) { - CrystalWishingCompassSolver.getInstance().onSpawnParticle( - particleTypes, - xCoord, - yCoord, - zCoord - ); - boolean override = FishingHelper.getInstance().onSpawnParticle( + SpawnParticleEvent event = new SpawnParticleEvent( particleTypes, + isLongDistance, xCoord, yCoord, zCoord, xOffset, yOffset, - zOffset + zOffset, + params ); - if (!override) { + if (!event.post()) { world.spawnParticle(particleTypes, isLongDistance, xCoord, yCoord, zCoord, xOffset, yOffset, zOffset, params); } } -- cgit