diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 18:33:53 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-10-01 18:33:53 +0200 |
commit | fa46eb546fee0efe2bc41459bdfdde4344ac8ff6 (patch) | |
tree | 17614e622db7e4b58339d83640a18d89cba96ec5 | |
parent | ad998ebd56c43097154d970e2f34898a53d6444d (diff) | |
download | skyhanni-fa46eb546fee0efe2bc41459bdfdde4344ac8ff6.tar.gz skyhanni-fa46eb546fee0efe2bc41459bdfdde4344ac8ff6.tar.bz2 skyhanni-fa46eb546fee0efe2bc41459bdfdde4344ac8ff6.zip |
hide icons circling around ashfang
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java | 22 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt | 24 |
2 files changed, 29 insertions, 17 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java b/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java index ce49cdd95..f92b576b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Ashfang.java @@ -20,7 +20,7 @@ public class Ashfang { public Position freezeCooldownPos = new Position(10, 10, false, true); @Expose - @ConfigOption(name = "Reset Time", desc = "Shows the cooldown until ashfang pulls his underlings back") + @ConfigOption(name = "Reset Time", desc = "Shows the cooldown until ashfang pulls his underlings back.") @ConfigEditorBoolean public boolean nextResetCooldown = false; @@ -30,38 +30,32 @@ public class Ashfang { public Position nextResetCooldownPos = new Position(10, 10, false, true); @Expose - @ConfigOption(name = "Gravity Orbs", desc = "Showing the Gravity Orbs more clearly") + @ConfigOption(name = "Gravity Orbs", desc = "Showing the Gravity Orbs more clearly.") @ConfigEditorBoolean public boolean gravityOrbs = false; @Expose - @ConfigOption( - name = "Orbs Color", - desc = "Color of the Ashfang Gravity Orbs" - ) + @ConfigOption(name = "Orbs Color", desc = "Color of the Ashfang Gravity Orbs.") @ConfigEditorColour public String gravityOrbsColor = "0:120:255:85:85"; @Expose - @ConfigOption(name = "Blazing Souls", desc = "Showing the Blazing Souls more clearly") + @ConfigOption(name = "Blazing Souls", desc = "Showing the Blazing Souls more clearly.") @ConfigEditorBoolean public boolean blazingSouls = false; @Expose - @ConfigOption( - name = "Souls Color", - desc = "Color of the Ashfang Blazing Souls" - ) + @ConfigOption(name = "Souls Color", desc = "Color of the Ashfang Blazing Souls.") @ConfigEditorColour public String blazingSoulsColor = "0:245:85:255:85"; @Expose - @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respected color") + @ConfigOption(name = "Highlight Blazes", desc = "Highlight the different blazes in their respected color.") @ConfigEditorBoolean public boolean highlightBlazes = false; @Expose - @ConfigOption(name = "Hide Particles", desc = "Hide all the particles around the ashfang boss") + @ConfigOption(name = "Hide Particles", desc = "Hide particles around the ashfang boss.") @ConfigEditorBoolean public boolean hideParticles = false; @@ -71,7 +65,7 @@ public class Ashfang { public boolean hideNames = false; @Expose - @ConfigOption(name = "Hide Damage", desc = "Hide damage splashes around ashfang") + @ConfigOption(name = "Hide Damage", desc = "Hide damage splashes around ashfang.") @ConfigEditorBoolean public boolean hideDamageSplash = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt index 266ec3da8..0a43f6940 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHideParticles.kt @@ -1,11 +1,15 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.PlayParticleEvent import at.hannibal2.skyhanni.events.SpawnParticleEvent import at.hannibal2.skyhanni.features.damageindicator.BossType import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager +import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.entity.item.EntityArmorStand +import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent @@ -27,7 +31,6 @@ class AshfangHideParticles { @SubscribeEvent fun onReceivePacket(event: PlayParticleEvent) { if (!isEnabled()) return - if (!hideParticles) return event.isCanceled = true } @@ -35,7 +38,6 @@ class AshfangHideParticles { @SubscribeEvent fun onSpawnParticle(event: SpawnParticleEvent) { if (!isEnabled()) return - if (!hideParticles) return when (event.callerClass) { @@ -46,8 +48,24 @@ class AshfangHideParticles { event.isCanceled = true } } + } + + @SubscribeEvent(priority = EventPriority.HIGH) + fun onCheckRender(event: CheckRenderEntityEvent<*>) { + if (!isEnabled()) return + val entity = event.entity + if (entity is EntityArmorStand) { + for (stack in entity.inventory) { + if (stack == null) continue + val name = stack.name ?: continue + if (name == "§aFairy Souls") continue + if (name == "Glowstone") { + event.isCanceled = true + } + } + } } - private fun isEnabled() = LorenzUtils.inSkyblock && SkyHanniMod.feature.ashfang.hideParticles + private fun isEnabled() = LorenzUtils.inSkyblock && SkyHanniMod.feature.ashfang.hideParticles && hideParticles }
\ No newline at end of file |