diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-16 14:37:47 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-16 14:37:47 +0200 |
commit | fb04bfb0af39773dd3d60ba9a0a98fa57e6f4efb (patch) | |
tree | dfd0f00f513f37d268cd8a3af10c881b592edc8f /src/main/java/at/hannibal2/skyhanni | |
parent | ef0f75d0f85b2e68a4588ebccc107dadaec41fce (diff) | |
download | skyhanni-fb04bfb0af39773dd3d60ba9a0a98fa57e6f4efb.tar.gz skyhanni-fb04bfb0af39773dd3d60ba9a0a98fa57e6f4efb.tar.bz2 skyhanni-fb04bfb0af39773dd3d60ba9a0a98fa57e6f4efb.zip |
add Hide Healer Fairy and optimize wording
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java | 16 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt | 43 |
2 files changed, 40 insertions, 19 deletions
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 78fec2ed9..6cc58f211 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Dungeon.java @@ -16,7 +16,7 @@ public class Dungeon { public boolean showMilestone = false; @Expose - @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in the Dungeon.") + @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in dungeon.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean showMilestonesDisplay = false; @@ -70,9 +70,9 @@ public class Dungeon { @ConfigEditorBoolean public boolean highlightDeathmites = false; - @ConfigOption(name = "Item Hider", desc = "") + @ConfigOption(name = "Object Hider", desc = "Hide various things in dungeon.") @ConfigEditorAccordion(id = 3) - public boolean itemHider = false; + public boolean objectHider = false; @Expose @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in dungeon.") @@ -105,17 +105,23 @@ public class Dungeon { public boolean hideJournalEntry = false; @Expose - @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in dungeon.") + @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide skeleton skulls laying around in dungeon.") @ConfigEditorBoolean @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") + @ConfigOption(name = "Hide Healer Orbs", desc = "Hides the damage, ability damage and defensive orbs that spawn when the healer kills mobs.") @ConfigEditorBoolean @ConfigAccordionId(id = 3) public boolean hideHealerOrbs = false; + @Expose + @ConfigOption(name = "Hide Healer Fairy", desc = "Hide the golden fairy that follows the healer in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideHealerFairy = 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 0b688680c..ceec6103c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -20,20 +20,23 @@ class DungeonHideItems { private val movingSkeletonSkulls = mutableMapOf<EntityArmorStand, Long>() private val blessingTexture = - "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZT" + "kzZTIwNjg2MTc4NzJjNTQyZWNkYTFkMjdkZjRlY2U5MWM2OTk5MDdiZjMyN2M0ZGRiODUzMDk0MTJkMzkzOSJ9fX0=" + "eyJ0ZXh0dXJlcyI6eyJTS0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1lc3RhbXAiOjE1NzQ5NTEzMTkwNDQsInByb2ZpbGVJZCI6IjE5MjUyMWI0ZWZkYjQyNWM4OTMxZjAyYTg0OTZlMTFiIiwicHJvZmlsZU5hbWUiOiJTZXJpYWxpemFibGUiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2FiODZkYTJlMjQzYzA1ZGMwODk4YjBjYzVkM2U2NDg3NzE3MzE3N2UwYTIzOTQ0MjVjZWMxMDAyNTljYjQ1MjYifX19" + + private val healerFairyTexture = + "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19" private fun isSkeletonSkull(entity: EntityArmorStand): Boolean { @@ -143,14 +146,26 @@ class DungeonHideItems { entity.name.startsWith("§a§lDEFENSE §e") -> event.isCanceled = true } - val itemStack = entity.inventory[4] ?: return - when (itemStack.getSkullTexture()) { - abilityOrbTexture, - supportOrbTexture, - damageOrbTexture, - -> { + val itemStack = entity.inventory[4] + if (itemStack != null) { + when (itemStack.getSkullTexture()) { + abilityOrbTexture, + supportOrbTexture, + damageOrbTexture, + -> { + event.isCanceled = true + hideParticles[entity] = System.currentTimeMillis() + return + } + } + } + } + + if (SkyHanniMod.feature.dungeon.hideHealerFairy) { + val itemStack = entity.inventory[0] + if (itemStack != null) { + if (itemStack.getSkullTexture() == healerFairyTexture) { event.isCanceled = true - hideParticles[entity] = System.currentTimeMillis() return } } @@ -211,7 +226,7 @@ class DungeonHideItems { if (entity is EntityArmorStand) { if (isSkeletonSkull(entity)) { val lastMove = movingSkeletonSkulls.getOrDefault(entity, 0) - if (lastMove + 100 > System.currentTimeMillis()) { + if (lastMove + 200 > System.currentTimeMillis()) { event.shouldReset = true } } |