From d7a69dc0e5b49a26107e6d9ac66a5202542a4ef7 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 3 Jun 2023 16:25:43 +0700 Subject: [PATCH] elder guardian particle block its so annoying --- .../ElderGuardianAppearanceParticleMixin.java | 18 ++++++++++++++++++ src/main/resources/chipmunkmod.mixins.json | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java new file mode 100644 index 0000000..2821723 --- /dev/null +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java @@ -0,0 +1,18 @@ +package land.chipmunk.chipmunkmod.mixin; + +import net.minecraft.client.particle.ElderGuardianAppearanceParticle; +import net.minecraft.client.particle.Particle; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.particle.DefaultParticleType; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(ElderGuardianAppearanceParticle.Factory.class) +public class ElderGuardianAppearanceParticleMixin { + @Inject(method = "createParticle(Lnet/minecraft/particle/DefaultParticleType;Lnet/minecraft/client/world/ClientWorld;DDDDDD)Lnet/minecraft/client/particle/Particle;", at = @At("HEAD")) + private void createParticle (DefaultParticleType defaultParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i, CallbackInfoReturnable cir) { + cir.cancel(); + } +} diff --git a/src/main/resources/chipmunkmod.mixins.json b/src/main/resources/chipmunkmod.mixins.json index b1d9708..a3de837 100644 --- a/src/main/resources/chipmunkmod.mixins.json +++ b/src/main/resources/chipmunkmod.mixins.json @@ -16,7 +16,8 @@ "DecoderHandlerMixin", "StringHelperMixin", "NbtIoMixin", - "KeyboardInputMixin" + "KeyboardInputMixin", + "ElderGuardianAppearanceParticleMixin" ], "injectors": { "defaultRequire": 1