diff options
6 files changed, 33 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java index 0292eb6cc..342d39aa2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/MiscConfig.java @@ -167,6 +167,12 @@ public class MiscConfig { public boolean hideBlazeParticles = false; @Expose + @ConfigOption(name = "Enderman Particles", desc = "Hide enderman particles.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 9) + public boolean hideEndermanParticles = false; + + @Expose @ConfigOption(name = "Fireball Particles", desc = "Hide fireball particles.") @ConfigEditorBoolean @ConfigAccordionId(id = 9) diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinBlockFire.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinBlockFire.java index 3dfc0c22f..1bf74133d 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinBlockFire.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinBlockFire.java @@ -12,9 +12,9 @@ import org.spongepowered.asm.mixin.injection.Redirect; public class MixinBlockFire { @Redirect(method = "randomDisplayTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;spawnParticle(Lnet/minecraft/util/EnumParticleTypes;DDDDDD[I)V")) - private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] p_175688_14_) { + private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] parameters) { if (!SkyHanniMod.getFeature().misc.hideFireBlockParticles) { - world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, p_175688_14_); + world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, parameters); } } } diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityBlaze.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityBlaze.java index 7c21efa9f..7682abf21 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityBlaze.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityBlaze.java @@ -12,9 +12,9 @@ import org.spongepowered.asm.mixin.injection.Redirect; public class MixinEntityBlaze { @Redirect(method = "onLivingUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;spawnParticle(Lnet/minecraft/util/EnumParticleTypes;DDDDDD[I)V")) - private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] p_175688_14_) { + private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] parameters) { if (!SkyHanniMod.getFeature().misc.hideBlazeParticles) { - world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, p_175688_14_); + world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, parameters); } } } diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityEnderman.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityEnderman.java new file mode 100644 index 000000000..42402d16e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityEnderman.java @@ -0,0 +1,20 @@ +package at.hannibal2.skyhanni.mixins.transformers; + +import at.hannibal2.skyhanni.SkyHanniMod; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.util.EnumParticleTypes; +import net.minecraft.world.World; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(EntityEnderman.class) +public class MixinEntityEnderman { + + @Redirect(method = "onLivingUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;spawnParticle(Lnet/minecraft/util/EnumParticleTypes;DDDDDD[I)V")) + private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] parameters) { + if (!SkyHanniMod.getFeature().misc.hideEndermanParticles) { + world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, parameters); + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityFireball.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityFireball.java index bf4f48171..573bbdb04 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityFireball.java +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinEntityFireball.java @@ -12,9 +12,9 @@ import org.spongepowered.asm.mixin.injection.Redirect; public class MixinEntityFireball { @Redirect(method = "onUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;spawnParticle(Lnet/minecraft/util/EnumParticleTypes;DDDDDD[I)V")) - private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] p_175688_14_) { + private void onLivingUpdate(World world, EnumParticleTypes particleType, double x, double y, double z, double xOffset, double yOffset, double zOffset, int[] parameters) { if (!SkyHanniMod.getFeature().misc.hideFireballParticles) { - world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, p_175688_14_); + world.spawnParticle(particleType, x, y, z, xOffset, yOffset, zOffset, parameters); } } } diff --git a/src/main/resources/mixins.skyhanni.json b/src/main/resources/mixins.skyhanni.json index 9157a18a5..ed342797f 100644 --- a/src/main/resources/mixins.skyhanni.json +++ b/src/main/resources/mixins.skyhanni.json @@ -6,6 +6,7 @@ "AccessorGuiPlayerTabOverlay", "MixinBlockFire", "MixinEntityBlaze", + "MixinEntityEnderman", "MixinEntityFireball", "MixinEntityPlayerSP", "MixinItemStack", |