diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-07 05:09:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-07 05:09:48 +0200 |
| commit | 31854117b7c8c29af838d1726cf7e2621805ce14 (patch) | |
| tree | 2d4cbf11b8f5b93b6d907404399ffcd8ae08e763 /src/main/java | |
| parent | 59c878978e9eb59c77b98cbb9e2dfff31a54b3e3 (diff) | |
| download | SkyHanni-31854117b7c8c29af838d1726cf7e2621805ce14.tar.gz SkyHanni-31854117b7c8c29af838d1726cf7e2621805ce14.tar.bz2 SkyHanni-31854117b7c8c29af838d1726cf7e2621805ce14.zip | |
0.7 (#2)
* code cleanup
* Option to hide the Skyblock Level from the chat messages,
Option to change the way the Skyblock Level gets displayed in the chat
* change version to 0.6.1
* add highlight the voidling extremist in pink color
* add highlight corrupted mobs in purple color
* fixed highlight corrupted mobs in purple color in the private island
* another minor fix for highlight corrupted mobs in purple color
* created EntityHealthUpdateEvent and fixing CorruptedMobHighlight
* using EntityHealthUpdateEvent everywhere
* added marking a player with yellow color
* highlight slayer miniboss in blue color
* /copyentities now shows health correctly for every entity
* infer fix
* fixing bazaar message filter
* changelog
* hides the death messages of other players, except for players who are close to the player.
* hiding tip messages
* highlight deathmites in dungeon in red color
* code cleanup
* code cleanup
* hide tnt laying around in dungeon
* fix infer
* remove debug
* Added hide Blessings laying around in dungeon.
Added hide Revive Stones laying around in dungeon.
* Hide Premium Flesh laying around in dungeon.
* edited LorenzTest
* Added dungeon copilot and separate filter for hiding dungeon key and door messages.
* Added hide Journal Entry pages laying around in dungeon.
* Added hide Skeleton Skulls laying around in dungeon.
* credits
* Added highlight Skeleton Skulls when combining into a skeleton in orange color (not useful combined with feature Hide Skeleton Skull)
* Added highlight Skeleton Skulls when combining into a skeleton in orange color (not useful combined with feature Hide Skeleton Skull)
* fix wording
* clarification
* small fixes
* Highlight the enderman slayer Yang Glyph (Beacon) in red color (supports beacon in hand and beacon flying)
* better/more readability for CopyNearbyEntitiesCommand
* make version 0.7
Diffstat (limited to 'src/main/java')
47 files changed, 1491 insertions, 187 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java index e7ca8c882..353a00614 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.java @@ -3,22 +3,18 @@ package at.hannibal2.skyhanni; import at.hannibal2.skyhanni.config.ConfigManager; import at.hannibal2.skyhanni.config.Features; import at.hannibal2.skyhanni.config.gui.commands.Commands; -import at.hannibal2.skyhanni.data.ApiKeyGrabber; -import at.hannibal2.skyhanni.data.HypixelData; -import at.hannibal2.skyhanni.data.ItemRenderBackground; -import at.hannibal2.skyhanni.data.ScoreboardData; +import at.hannibal2.skyhanni.data.*; import at.hannibal2.skyhanni.data.repo.RepoManager; import at.hannibal2.skyhanni.features.*; import at.hannibal2.skyhanni.features.anvil.AnvilCombineHelper; import at.hannibal2.skyhanni.features.bazaar.BazaarApi; import at.hannibal2.skyhanni.features.bazaar.BazaarBestSellMethod; import at.hannibal2.skyhanni.features.bazaar.BazaarOrderHelper; -import at.hannibal2.skyhanni.features.chat.ChatFilter; -import at.hannibal2.skyhanni.features.chat.ChatManager; -import at.hannibal2.skyhanni.features.chat.PlayerChatFilter; +import at.hannibal2.skyhanni.features.chat.*; import at.hannibal2.skyhanni.features.commands.WikiCommand; import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager; import at.hannibal2.skyhanni.features.dungeon.*; +import at.hannibal2.skyhanni.features.end.VoidlingExtremistColor; import at.hannibal2.skyhanni.features.fishing.SeaCreatureManager; import at.hannibal2.skyhanni.features.fishing.SeaCreatureMessageShortener; import at.hannibal2.skyhanni.features.fishing.TrophyFishMessages; @@ -29,6 +25,8 @@ import at.hannibal2.skyhanni.features.items.RngMeterInventory; import at.hannibal2.skyhanni.features.items.abilitycooldown.ItemAbilityCooldown; import at.hannibal2.skyhanni.features.minion.MinionFeatures; import at.hannibal2.skyhanni.features.nether.ashfang.*; +import at.hannibal2.skyhanni.features.slayer.EndermanSlayerBeacon; +import at.hannibal2.skyhanni.features.slayer.HighlightSlayerMiniboss; import at.hannibal2.skyhanni.test.LorenzTest; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; @@ -43,7 +41,7 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; public class SkyHanniMod { public static final String MODID = "skyhanni"; - public static final String VERSION = "0.6"; + public static final String VERSION = "0.7"; public static Features feature; @@ -61,10 +59,13 @@ public class SkyHanniMod { registerEvent(new ApiKeyGrabber()); registerEvent(new SeaCreatureManager()); registerEvent(new ItemRenderBackground()); + registerEvent(new EntityData()); + registerEvent(new EntityMovementHelper()); registerEvent(new BazaarOrderHelper()); registerEvent(new ChatFilter()); registerEvent(new PlayerChatFilter()); + registerEvent(new SkyBlockLevelChatMessage()); registerEvent(new DungeonChatFilter()); registerEvent(new HideNotClickableItems()); registerEvent(new ItemDisplayOverlayFeatures()); @@ -97,6 +98,15 @@ public class SkyHanniMod { registerEvent(new RngMeterInventory()); registerEvent(new WikiCommand()); registerEvent(new SummoningMobManager()); + registerEvent(new VoidlingExtremistColor()); + registerEvent(new CorruptedMobHighlight()); + registerEvent(new PlayerMarker()); + registerEvent(new HighlightSlayerMiniboss()); + registerEvent(new HideFarDeathMessages()); + registerEvent(new HighlightDungeonDeathmite()); + registerEvent(new DungeonHideItems()); + registerEvent(new DungeonCopilot()); + registerEvent(new EndermanSlayerBeacon()); Commands.init(); diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 16e2b42f0..fa2cf6ac1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -76,6 +76,11 @@ public class Features { editOverlay(activeConfigCategory, 200, 16, abilities.summoningMobDisplayPos); return; } + + if (runnableId.equals("dungeonCopilot")) { + editOverlay(activeConfigCategory, 200, 16, dungeon.copilotPos); + return; + } } @Expose diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java index c7bfa2973..3fe253cc0 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java @@ -1,9 +1,6 @@ package at.hannibal2.skyhanni.config.features; -import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigAccordionId; -import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigEditorAccordion; -import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigEditorBoolean; -import at.hannibal2.skyhanni.config.gui.core.config.annotations.ConfigOption; +import at.hannibal2.skyhanni.config.gui.core.config.annotations.*; import com.google.gson.annotations.Expose; public class Chat { @@ -45,17 +42,49 @@ public class Chat { public boolean others = false; @Expose - @ConfigOption(name = "Player Messages", desc = "Add a fancy new chat format for player messages.") - @ConfigEditorBoolean + @ConfigOption(name = "Player Messages", desc = "") + @ConfigEditorAccordion(id = 1) public boolean playerMessages = false; @Expose - @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages inside dungeon.") + @ConfigOption(name = "Player Messages Format", desc = "Add a fancy new chat format for player messages.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean playerMessagesFormat = false; + + @Expose + @ConfigOption(name = "Hide SkyBlock Level", desc = "Hiding the Skyblock Level from the chat messages") + @ConfigEditorBoolean + @ConfigAccordionId(id = 1) + public boolean hideSkyblockLevel = false; + + @Expose + @ConfigOption( + name = "SkyBlock Level Design", + desc = "Change the way the Skyblock Level gets displayed in the chat\n" + + "§cRequires SkyBlock Level and player messages format both enabled" + ) + @ConfigEditorDropdown( + values = {"§8[§6123§8] §bname §fmsg", + "§6§l123 §bname §fmsg", + "§bname §8[§6123§8]§f: msg"} + ) + @ConfigAccordionId(id = 1) + public int skyblockLevelDesign = 0; + + @Expose + @ConfigOption(name = "Dungeon Filter", desc = "Hide annoying messages in the dungeon.") @ConfigEditorBoolean public boolean dungeonMessages = false; @Expose - @ConfigOption(name = "Dungeon Boss Messages", desc = "Hide messages from watcher and bosses inside dungeon.") + @ConfigOption(name = "Dungeon Boss Messages", desc = "Hide messages from watcher and bosses in the dungeon.") @ConfigEditorBoolean public boolean dungeonBossMessages = false; + + @Expose + @ConfigOption(name = "Hide Far Deaths", desc = "Hide the death messages of other players, " + + "except for players who are close to the player, inside dungeon or doing a Kuudra fight.") + @ConfigEditorBoolean + public boolean hideFarDeathMessages = false; } 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 67b61d737..75fd777fc 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 inside Dungeons.") + @ConfigOption(name = "Milestones Display", desc = "Show the current milestone in the Dungeon.") @ConfigEditorBoolean @ConfigAccordionId(id = 0) public boolean showMilestonesDisplay = false; @@ -61,7 +61,84 @@ public class Dungeon { public boolean cleanEndF3IgnoreGuardians = false; @Expose - @ConfigOption(name = "Boss Damage Splash", desc = "Hiding damage splashes while inside the boss room (fixing Skytils feature)") + @ConfigOption(name = "Boss Damage Splash", desc = "Hiding damage splashes while inside the boss room. (fixing Skytils feature)") @ConfigEditorBoolean public boolean damageSplashBoss = false; + + @Expose + @ConfigOption(name = "Highlight Deathmites", desc = "Highlight deathmites in dungeon in red color.") + @ConfigEditorBoolean + public boolean highlightDeathmites = false; + + @ConfigOption(name = "Item Hider", desc = "") + @ConfigEditorAccordion(id = 3) + public boolean itemHider = false; + + @Expose + @ConfigOption(name = "Hide Superboom TNT", desc = "Hide Superboom TNT laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideSuperboomTNT = false; + + @Expose + @ConfigOption(name = "Hide Blessings", desc = "Hide Blessings laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideBlessing = false; + + @Expose + @ConfigOption(name = "Hide Revive Stones", desc = "Hide Revive Stones laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideReviveStone = false; + + @Expose + @ConfigOption(name = "Hide Premium Flesh", desc = "Hide Premium Flesh laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hidePremiumFlesh = false; + + @Expose + @ConfigOption(name = "Hide Journal Entry", desc = "Hide Journal Entry pages laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideJournalEntry = false; + + @Expose + @ConfigOption(name = "Hide Skeleton Skull", desc = "Hide Skeleton Skulls laying around in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 3) + public boolean hideSkeletonSkull = false; + + @ConfigOption(name = "Message Filter", desc = "") + @ConfigEditorAccordion(id = 4) + public boolean messageFilter = false; + + @Expose + @ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 4) + public boolean messageFilterKeysAndDoors = false; + + @ConfigOption(name = "Dungeon Copilot", desc = "") + @ConfigEditorAccordion(id = 5) + public boolean dungeonCopilot = false; + + @Expose + @ConfigOption(name = "Copilot Enabled", desc = "Suggests what to do next in dungeon.") + @ConfigEditorBoolean + @ConfigAccordionId(id = 5) + public boolean copilotEnabled = false; + + @Expose + @ConfigOption(name = "Copilot Pos", desc = "") + @ConfigEditorButton(runnableId = "dungeonCopilot", buttonText = "Edit") + @ConfigAccordionId(id = 5) + public Position copilotPos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Moving Skeleton Skulls", desc = "Highlight Skeleton Skulls when combining into a " + + "Skeletor in orange color (not useful combined with feature Hide Skeleton Skull)") + @ConfigEditorBoolean + public boolean highlightSkeletonSkull = false; }
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index 64b5e0630..d8ad7886e 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -48,4 +48,24 @@ public class Misc { @ConfigOption(name = "Real Time Position", desc = "") @ConfigEditorButton(runnableId = "realTime", buttonText = "Edit") public Position realTimePos = new Position(10, 10, false, true); + + @Expose + @ConfigOption(name = "Voidling Extremist Color", desc = "Highlight the voidling extremist in pink color") + @ConfigEditorBoolean + public boolean voidlingExtremistColor = false; + + @Expose + @ConfigOption(name = "Corrupted Mob Highlight", desc = "Highlight corrupted mobs in purple color") + @ConfigEditorBoolean + public boolean corruptedMobHighlight = false; + + @Expose + @ConfigOption(name = "Slayer Miniboss Highlight", desc = "Highlight slayer miniboss in blue color") + @ConfigEditorBoolean + public boolean slayerMinibossHighlight = false; + + @Expose + @ConfigOption(name = "Slayer Enderman Beacon", desc = "Highlight the enderman slayer Yang Glyph (Beacon) in red color (supports beacon in hand and beacon flying)") + @ConfigEditorBoolean + public boolean slayerEndermanBeacon = false; }
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/config/gui/commands/Commands.java b/src/main/java/at/hannibal2/skyhanni/config/gui/commands/Commands.java index 9aca72ec3..e2bfad8f2 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/gui/commands/Commands.java +++ b/src/main/java/at/hannibal2/skyhanni/config/gui/commands/Commands.java @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.gui.commands; import at.hannibal2.skyhanni.SkyHanniMod; import at.hannibal2.skyhanni.config.gui.config.ConfigEditor; import at.hannibal2.skyhanni.config.gui.core.GuiScreenElementWrapper; +import at.hannibal2.skyhanni.features.PlayerMarker; import at.hannibal2.skyhanni.test.LorenzTest; import at.hannibal2.skyhanni.test.command.CopyItemCommand; import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand; @@ -87,5 +88,25 @@ public class Commands { } ) ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "shmarkplayer", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + PlayerMarker.Companion.command(args); + } + } + ) + ); + ClientCommandHandler.instance.registerCommand( + new SimpleCommand( + "togglepacketlog", + new SimpleCommand.ProcessCommandRunnable() { + public void processCommand(ICommandSender sender, String[] args) { + LorenzTest.Companion.togglePacketLog(); + } + } + ) + ); } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt new file mode 100644 index 000000000..79d0107c7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent +import at.hannibal2.skyhanni.events.PacketEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import net.minecraft.client.Minecraft +import net.minecraft.entity.EntityLivingBase +import net.minecraft.network.play.server.S1CPacketEntityMetadata +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class EntityData { + + @SubscribeEvent + fun onHealthUpdatePacket(event: PacketEvent.ReceiveEvent) { + val packet = event.packet + if (packet !is S1CPacketEntityMetadata) return + + if (packet == null) { + LorenzUtils.debug("packet is null in CorruptedMobHigh light!") + return + } + + val watchableObjects = packet.func_149376_c() ?: return + for (watchableObject in watchableObjects) { + if (watchableObject.dataValueId != 6) continue + + val theWorld = Minecraft.getMinecraft().theWorld + if (theWorld == null) { + LorenzUtils.debug("theWorld is null in CorruptedMobHighlight!") + continue + } + val entityId = packet.entityId + if (entityId == null) { + LorenzUtils.debug("entityId is null in CorruptedMobHighlight!") + continue + } + + val entity = theWorld.getEntityByID(entityId) ?: continue + if (entity !is EntityLivingBase) continue + + val health = watchableObject.`object` as Float + EntityHealthUpdateEvent(entity, health).postAndCatch() + return + } + } +}
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementHelper.kt new file mode 100644 index 000000000..908aae388 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementHelper.kt @@ -0,0 +1,47 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.events.EntityMoveEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.getLorenzVec +import net.minecraft.entity.Entity +import net.minecraftforge.event.world.WorldEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import net.minecraftforge.fml.common.gameevent.TickEvent + +class EntityMovementHelper { + + companion object { + private val entityLocation = mutableMapOf<Entity, LorenzVec>() + + fun addToTrack(entity: Entity) { + if (entity !in entityLocation) { + entityLocation[entity] = entity.getLorenzVec() + } + } + } + + var tick = 0 + + @SubscribeEvent + fun onTick(event: TickEvent.Clien |
