diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-16 14:11:26 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-16 14:11:26 +0200 |
commit | ef0f75d0f85b2e68a4588ebccc107dadaec41fce (patch) | |
tree | 310038d3acd5938bc53eace5af6d046a8d4dc579 | |
parent | 272491d47670922a44c205f041832c25c7a818e6 (diff) | |
download | skyhanni-ef0f75d0f85b2e68a4588ebccc107dadaec41fce.tar.gz skyhanni-ef0f75d0f85b2e68a4588ebccc107dadaec41fce.tar.bz2 skyhanni-ef0f75d0f85b2e68a4588ebccc107dadaec41fce.zip |
add Hide Healer Orbs
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | FEATURES.md | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt | 59 |
4 files changed, 52 insertions, 15 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aa33db27..0add2e179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Added support for links in player chat - Added option to enable that clicking on a player name in chat opens the profile viewer of NotEnoughUpdates (to fix SkyHanni breaking the default NEU feature). - Added support for new SBA chat icon feature (show profile type and faction in chat) +- Added hide the damage, ability damage and defence orbs that spawn when the healer is killing mobs ### Fixed - Links in player chat are clickable again diff --git a/FEATURES.md b/FEATURES.md index 8bef5c054..5f85d9b8e 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -33,6 +33,7 @@ - Option to hide key pickup and door open messages in dungeon. - Hide Skeleton Skulls lying around in dungeon. - Highlight Skeleton Skulls in the dungeon when combining into a skeleton in orange color (not useful combined with feature Hide Skeleton Skull) +- Hide the damage, ability damage and defence orbs that spawn when the healer is killing mobs. ## Inventory - Not Clickable Items: Mark items gray in your inventory when they are not supposed to be moved in certain GUIs (in NPC sell inventories, ender chests and backpacks, salvaging in dungeon hub, player trade, bazaar, action house, accessory bag, sack of sacks, fishing bag, potion bag, chests on the private island, attribute fusion and equipment GUI) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java b/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java index e32fefdcb..78fec2ed9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java @@ -110,6 +110,12 @@ public class Dungeon { @ConfigAccordionId(id = 3) public boolean hideSkeletonSkull = false; + @Expose + @ConfigOption(name = "Hide Healer Orbs", desc = "Hide the damage, ability damage and defence orbs that spawn when the healer is killing mobs") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideHealerOrbs = false; + @ConfigOption(name = "Message Filter", desc = "") @ConfigEditorAccordion(id = 4) public boolean messageFilter = false; diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index 2f36f01e5..0b688680c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.item.EntityItem +import net.minecraft.util.EnumParticleTypes import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -19,15 +20,21 @@ class DungeonHideItems { private val movingSkeletonSkulls = mutableMapOf<EntityArmorStand, Long>() private val blessingTexture = - "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZT" + - "kzZTIwNjg2MTc4NzJjNTQyZWNkYTFkMjdkZjRlY2U5MWM2OTk5MDdiZjMyN2M0ZGRiODUzMDk0MTJkMzkzOSJ9fX0=" + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZT" + "kzZTIwNjg2MTc4NzJjNTQyZWNkYTFkMjdkZjRlY2U5MWM2OTk5MDdiZjMyN2M0ZGRiODUzMDk0MTJkMzkzOSJ9fX0=" - private val reviveStoneTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJ" + - "lcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZhNzZjYzIyZTdjMmFiOWM1NDBkMTI0NGVhZGJhNTgxZ" + - "jVkZDllMThmOWFkYWNmMDUyODBhNWI0OGI4ZjYxOCJ9fX0K" + private val reviveStoneTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJ" + "lcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjZhNzZjYzIyZTdjMmFiOWM1NDBkMTI0NGVhZGJhNTgxZ" + "jVkZDllMThmOWFkYWNmMDUyODBhNWI0OGI4ZjYxOCJ9fX0K" + + private val premiumFleshTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0" + "L3RleHR1cmUvMWE3NWU4YjA0NGM3MjAxYTRiMmU4NTZiZTRmYzMxNmE1YWFlYzY2NTc2MTY5YmFiNTg3MmE4ODUzNGI4MDI1NiJ9fX0K" + + private val abilityOrbTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTAxZTA0MGNiMD" + "FjZjJjY2U0NDI4MzU4YWUzMWQyZTI2NjIwN2M0N2NiM2FkMTM5NzA5YzYyMDEzMGRjOGFkNCJ9fX0=" + private val supportOrbTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTMxYTRmYWIyZ" + "jg3ZGI1NDMzMDEzNjUxN2I0NTNhYWNiOWQ3YzBmZTc4NDMwMDcwOWU5YjEwOWNiYzUxNGYwMCJ9fX0=" + private val damageOrbTexture = + "eyJ0aW1lc3RhbXAiOjE1NzQ5NTEzMTkwNDQsInByb2ZpbGVJZCI6IjE5MjUyMWI0ZWZkYjQyNWM4OTMxZjAyYTg0OTZlMTFiIiwic" + "HJvZmlsZU5hbWUiOiJTZXJpYWxpemFibGUiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2FiODZkYTJlMjQzYzA1ZGMwODk4YjBjYzVkM2U2NDg3NzE3MzE3N2UwYTIzOTQ0MjVjZWMxMDAyNTljYjQ1MjYifX19" - private val premiumFleshTexture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0" + - "L3RleHR1cmUvMWE3NWU4YjA0NGM3MjAxYTRiMmU4NTZiZTRmYzMxNmE1YWFlYzY2NTc2MTY5YmFiNTg3MmE4ODUzNGI4MDI1NiJ9fX0K" private fun isSkeletonSkull(entity: EntityArmorStand): Boolean { val itemStack = entity.inventory[4] @@ -128,6 +135,26 @@ class DungeonHideItems { event.isCanceled = true } } + + if (SkyHanniMod.feature.dungeon.hideHealerOrbs) { + when { + entity.name.startsWith("§c§lDAMAGE §e") -> event.isCanceled = true + entity.name.startsWith("§c§lABILITY DAMAGE §e") -> event.isCanceled = true + entity.name.startsWith("§a§lDEFENSE §e") -> event.isCanceled = true + } + + val itemStack = entity.inventory[4] ?: return + when (itemStack.getSkullTexture()) { + abilityOrbTexture, + supportOrbTexture, + damageOrbTexture, + -> { + event.isCanceled = true + hideParticles[entity] = System.currentTimeMillis() + return + } + } + } } @SubscribeEvent @@ -135,15 +162,17 @@ class DungeonHideItems { if (!LorenzUtils.inDungeons) return if (!SkyHanniMod.feature.dungeon.hideSuperboomTNT && !SkyHanniMod.feature.dungeon.hideReviveStone) return - val packetLocation = event.location - for (armorStand in hideParticles.filter { it.value + 100 > System.currentTimeMillis() }.map { it.key }) { - val distance = packetLocation.distance(armorStand.getLorenzVec()) - if (distance < 2) { - //only hiding white "sparkling" particles - if (event.type.particleID == 3) { - event.isCanceled = true - } + val packetLocation = event.location + for (armorStand in hideParticles.filter { it.value + 100 > System.currentTimeMillis() }.map { it.key }) { + val distance = packetLocation.distance(armorStand.getLorenzVec()) + if (distance < 2) { + if (event.type == EnumParticleTypes.FIREWORKS_SPARK) { + event.isCanceled = true } + if (event.type == EnumParticleTypes.REDSTONE) { + event.isCanceled = true + } + } } } |