From 428f8e6ecdff1ea461d086633a86283048cedcfa Mon Sep 17 00:00:00 2001 From: RabbitType99 Date: Sat, 13 Mar 2021 20:11:26 +0100 Subject: Added Arachne highlighting, Added missing Text in README.md --- src/main/java/me/Danker/features/ArachneESP.java | 96 ++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/main/java/me/Danker/features/ArachneESP.java (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java new file mode 100644 index 0000000..c0aeab6 --- /dev/null +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -0,0 +1,96 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.passive.EntityWolf; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraft.world.World; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.event.entity.player.AttackEntityEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + + +import java.util.List; + +/** + * @author RabbitType99 + */ + +public class ArachneESP { + + + static Entity arachne = null; + static boolean arachneActive = true; + public static final int ARACHANE_COLOUR = 0x00FF00; + + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + arachne = null; + } + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + //if (!Utils.inSkyblock) return; + if (event.phase != TickEvent.Phase.START) return; + + World world = Minecraft.getMinecraft().theWorld; + if (DankersSkyblockMod.tickAmount % 2 == 0 && ToggleCommand.highlightArachne) { + if (world != null) { + if (!arachneActive) return; + List entities = world.getLoadedEntityList(); + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (Entity e : entities) { + System.out.println(e.getName()); + if (e.getName().contains("Arachne")) { + for (String s : scoreboard) { + if (ScoreboardHandler.cleanSB(s).contains("Spiders Den")) { + arachne = e; + } + } + } + + } + } + } + } + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + if (!Utils.inSkyblock) return; + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (message.contains("You dare call me, the queen of the dark, to accept you. I'll accept no excuses, you shall die!") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!")){ + arachneActive = true; + } + if (message.contains("You are lucky this time, you only called out a portion of my power, if you dared to my face me at my peak, you would not survive!") || message.contains("How can this be...how could I lose to a puny being like you...I shall get my revenge") || message.contains("Arachne is bored with your feeble attempt!" )){ + arachneActive = false; + } + + } + + + @SubscribeEvent + public void onWorldRender(RenderWorldLastEvent event) { + if (!Utils.inSkyblock) return; + if (arachneActive && ToggleCommand.highlightSlayers) { + AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); + Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + } + } + +} + -- cgit From cfa878d994032f1d7f829b09e862587ad0db07e4 Mon Sep 17 00:00:00 2001 From: RabbitType99 Date: Sun, 14 Mar 2021 02:10:31 +0100 Subject: Not Working do not merge --- src/main/java/me/Danker/DankersSkyblockMod.java | 1 + src/main/java/me/Danker/commands/ToggleCommand.java | 6 +++--- src/main/java/me/Danker/features/ArachneESP.java | 13 +++++++------ src/main/java/me/Danker/features/SlayerESP.java | 2 +- src/main/java/me/Danker/gui/DankerGui.java | 9 ++++++++- 5 files changed, 20 insertions(+), 11 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 46c1547..74625f5 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -130,6 +130,7 @@ public class DankersSkyblockMod { MinecraftForge.EVENT_BUS.register(new WatcherReadyAlert()); MinecraftForge.EVENT_BUS.register(new WaterSolver()); MinecraftForge.EVENT_BUS.register(new SlayerESP()); + MinecraftForge.EVENT_BUS.register(new ArachneESP()); ConfigHandler.reloadConfig(); GoldenEnchants.init(); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 5b8e274..c4f3ca4 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -417,10 +417,10 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "HighlightSlayers", highlightSlayers); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Slayer Bosses " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSlayers + DankersSkyblockMod.MAIN_COLOUR + ".")); break; - case "highlighteArachne": + case "highlightArachne": highlightArachne = !highlightArachne; - ConfigHandler.writeBooleanConfig("toggles", "HighlightSlayers", highlightSlayers); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Slayer Bosses " + DankersSkyblockMod.SECONDARY_COLOUR + highlightSlayers + DankersSkyblockMod.MAIN_COLOUR + ".")); + ConfigHandler.writeBooleanConfig("toggles", "HighlightArachne", highlightArachne); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Arachne " + DankersSkyblockMod.SECONDARY_COLOUR + highlightArachne + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "list": player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" + diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index c0aeab6..4ef9bc0 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -73,22 +73,23 @@ public class ArachneESP { if (!Utils.inSkyblock) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - if (message.contains("You dare call me, the queen of the dark, to accept you. I'll accept no excuses, you shall die!") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!")){ + if (message.contains("You dare call me, the queen of the dark, to accept you. I'll accept no excuses, you shall die!") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!") || message.contains("placed an Arachne Keeper Fragment! Something is awakening! (4/4)")){ arachneActive = true; } - if (message.contains("You are lucky this time, you only called out a portion of my power, if you dared to my face me at my peak, you would not survive!") || message.contains("How can this be...how could I lose to a puny being like you...I shall get my revenge") || message.contains("Arachne is bored with your feeble attempt!" )){ + if (message.contains("You are lucky this time, you only called out a portion of my power, if you dared to my face me at my peak, you would not survive!") || message.contains("How can this be...how could I lose to a puny being like you...I shall get my revenge") || message.contains("Arachne is bored with your feeble attempt!" ) || message.contains (" dealt the final blow")){ arachneActive = false; } - } @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (!Utils.inSkyblock) return; - if (arachneActive && ToggleCommand.highlightSlayers) { - AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); - Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + if (arachneActive && ToggleCommand.highlightArachne) { + if (arachne != null) { + AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); + Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + } } } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index c9b9c9b..ff53b7e 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -34,7 +34,7 @@ public class SlayerESP { static Entity spider = null; static Entity wolf = null; static boolean slayerActive = false; - public static final int SLAYER_COLOUR = 0xFF0000; + public static final int SLAYER_COLOUR = 0x0000FF; @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index b0409fc..fe791e1 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -214,9 +214,12 @@ public class DankerGui extends GuiScreen { this.buttonList.add(specialHoe); this.buttonList.add(melodyTooltips); this.buttonList.add(backPage); + this.buttonList.add(nextPage); break; case 7: this.buttonList.add(highlightArachne); + this.buttonList.add(backPage); + break; } this.buttonList.add(githubLink); @@ -228,7 +231,7 @@ public class DankerGui extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); - String pageText = "Page: " + page + "/6"; + String pageText = "Page: " + page + "/7"; int pageWidth = mc.fontRendererObj.getStringWidth(pageText); new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D); super.drawScreen(mouseX, mouseY, partialTicks); @@ -414,6 +417,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.killComboMessages = !ToggleCommand.killComboMessages; ConfigHandler.writeBooleanConfig("toggles", "KillComboMessages", ToggleCommand.killComboMessages); killComboMessages.displayString = "Kill Combo Messages: " + Utils.getColouredBoolean(ToggleCommand.killComboMessages); + } else if (button == highlightArachne) { + ToggleCommand.highlightArachne = !ToggleCommand.highlightArachne; + ConfigHandler.writeBooleanConfig("toggles", "HighlightArachne", ToggleCommand.highlightArachne); + highlightArachne.displayString = "Kill Combo Messages: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne); } } -- cgit From 5fbbbdb0305f350ea857234ff72afea372a469fc Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Sun, 14 Mar 2021 02:50:36 +0100 Subject: fixed Arachne Highlight --- src/main/java/me/Danker/features/ArachneESP.java | 37 ++++++++++++++---------- src/main/java/me/Danker/gui/DankerGui.java | 2 +- 2 files changed, 22 insertions(+), 17 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 4ef9bc0..320338c 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -42,27 +42,33 @@ public class ArachneESP { arachne = null; } + public boolean isSpidersDen(List scoreboard) { + for (String s : scoreboard) { + if (ScoreboardHandler.cleanSB(s).contains("Spiders Den")) { + return true; + } + } + return false; + } + @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - //if (!Utils.inSkyblock) return; + if (!Utils.inSkyblock) return; if (event.phase != TickEvent.Phase.START) return; World world = Minecraft.getMinecraft().theWorld; if (DankersSkyblockMod.tickAmount % 2 == 0 && ToggleCommand.highlightArachne) { if (world != null) { - if (!arachneActive) return; + List entities = world.getLoadedEntityList(); List scoreboard = ScoreboardHandler.getSidebarLines(); + //if (!isSpidersDen(scoreboard)) return; + if (!arachneActive) return; for (Entity e : entities) { System.out.println(e.getName()); - if (e.getName().contains("Arachne")) { - for (String s : scoreboard) { - if (ScoreboardHandler.cleanSB(s).contains("Spiders Den")) { - arachne = e; - } - } + if (e.getName().contains("Arachne") && !e.getName().contains("Arachne's Brood")) { + arachne = e; } - } } } @@ -72,8 +78,7 @@ public class ArachneESP { public void onChat(ClientChatReceivedEvent event) { if (!Utils.inSkyblock) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - - if (message.contains("You dare call me, the queen of the dark, to accept you. I'll accept no excuses, you shall die!") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!") || message.contains("placed an Arachne Keeper Fragment! Something is awakening! (4/4)")){ + if (message.contains("Something is awakening (4/4)") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!") || message.contains("placed an Arachne Keeper Fragment! Something is awakening! (4/4)")){ arachneActive = true; } if (message.contains("You are lucky this time, you only called out a portion of my power, if you dared to my face me at my peak, you would not survive!") || message.contains("How can this be...how could I lose to a puny being like you...I shall get my revenge") || message.contains("Arachne is bored with your feeble attempt!" ) || message.contains (" dealt the final blow")){ @@ -85,11 +90,11 @@ public class ArachneESP { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (!Utils.inSkyblock) return; - if (arachneActive && ToggleCommand.highlightArachne) { - if (arachne != null) { - AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); - Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); - } + if (arachneActive && ToggleCommand.highlightArachne) { + if (arachne != null) { + AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); + Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + } } } diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index fe791e1..c49f498 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -420,7 +420,7 @@ public class DankerGui extends GuiScreen { } else if (button == highlightArachne) { ToggleCommand.highlightArachne = !ToggleCommand.highlightArachne; ConfigHandler.writeBooleanConfig("toggles", "HighlightArachne", ToggleCommand.highlightArachne); - highlightArachne.displayString = "Kill Combo Messages: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne); + highlightArachne.displayString = "Highlight Arachne: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne); } } -- cgit From 22f9a760f373cfbedb542e02b08ebf15bc4dfb10 Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Sun, 14 Mar 2021 03:31:35 +0100 Subject: reworked triggers --- src/main/java/me/Danker/features/ArachneESP.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 320338c..4ce7ff3 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -78,10 +78,10 @@ public class ArachneESP { public void onChat(ClientChatReceivedEvent event) { if (!Utils.inSkyblock) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - if (message.contains("Something is awakening (4/4)") || message.contains("Hahahahaha, YOU MORTAL FOOL! You dare to summon me at my full strength to this plane, you are seeking death. With this power, I will not let a weakling survive here, this land will be a brilliant place to start a new invasion of my empire. Tremble beneath me if you wish to survive!") || message.contains("placed an Arachne Keeper Fragment! Something is awakening! (4/4)")){ + if (message.contains("Something is awakening")){ arachneActive = true; } - if (message.contains("You are lucky this time, you only called out a portion of my power, if you dared to my face me at my peak, you would not survive!") || message.contains("How can this be...how could I lose to a puny being like you...I shall get my revenge") || message.contains("Arachne is bored with your feeble attempt!" ) || message.contains (" dealt the final blow")){ + if (message.contains("ARACHNE DOWN!")) { arachneActive = false; } } -- cgit From 740d6b33cb227ea0e2699e1bc24003463ec28d52 Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Sun, 14 Mar 2021 04:42:48 +0100 Subject: performance improvement and config --- src/main/java/me/Danker/features/ArachneESP.java | 3 +- src/main/java/me/Danker/features/SlayerESP.java | 38 ++++++++++------------ .../java/me/Danker/handlers/ConfigHandler.java | 1 + 3 files changed, 20 insertions(+), 22 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 4ce7ff3..6187eed 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -62,10 +62,9 @@ public class ArachneESP { List entities = world.getLoadedEntityList(); List scoreboard = ScoreboardHandler.getSidebarLines(); - //if (!isSpidersDen(scoreboard)) return; + if (!isSpidersDen(scoreboard)) return; if (!arachneActive) return; for (Entity e : entities) { - System.out.println(e.getName()); if (e.getName().contains("Arachne") && !e.getName().contains("Arachne's Brood")) { arachne = e; } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index ff53b7e..5628dcc 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -6,6 +6,7 @@ import me.Danker.handlers.ScoreboardHandler; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityWolf; @@ -45,32 +46,29 @@ public class SlayerESP { @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - //if (!Utils.inSkyblock) return; + if (!Utils.inSkyblock) return; if (event.phase != TickEvent.Phase.START) return; World world = Minecraft.getMinecraft().theWorld; + if (world == null) return; if (DankersSkyblockMod.tickAmount % 2 == 0 && ToggleCommand.highlightSlayers) { - if (world != null) { - for (String line : ScoreboardHandler.getSidebarLines()) { + for (String line : ScoreboardHandler.getSidebarLines()) { - String cleanedLine = ScoreboardHandler.cleanSB(line); - if (cleanedLine.contains("Slay the boss!")) { - slayerActive = true; - break; - } + String cleanedLine = ScoreboardHandler.cleanSB(line); + if (cleanedLine.contains("Slay the boss!")) { + slayerActive = true; + break; } - if (!slayerActive) return; - List entities = world.getLoadedEntityList(); - for (Entity e : entities) { - System.out.println(e.getName()); - if (e.getName().contains("Revenant Horror")) { - zombie = e; - } else if (e.getName().contains("Tarantula Broodfather")) { - spider = e; - } else if (e.getName().contains("Sven Packmaster")) { - wolf = e; - } - + } + if (!slayerActive) return; + List entities = world.getLoadedEntityList(); + for (Entity e : entities) { + if (e.getName().contains("Revenant Horror")) { + zombie = e; + } else if (e.getName().contains("Tarantula Broodfather")) { + spider = e; + } else if (e.getName().contains("Sven Packmaster")) { + wolf = e; } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 3b08e94..dc43dca 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -231,6 +231,7 @@ public class ConfigHandler { ToggleCommand.specialHoeRightClick = initBoolean("toggles", "SpecialHoe", false); ToggleCommand.melodyTooltips = initBoolean("toggles", "MelodyTooltips", false); ToggleCommand.highlightSlayers = initBoolean("toggles", "HighlightSlayers", false); + ToggleCommand.highlightArachne = initBoolean("toggles", "HighlightArachne", false); // Chat Messages ToggleCommand.sceptreMessages = initBoolean("toggles", "SceptreMessages", true); ToggleCommand.midasStaffMessages = initBoolean("toggles", "MidasStaffMessages", true); -- cgit From 42e10338f773cd444c92e21e83f4609140bc278a Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Sun, 14 Mar 2021 17:17:24 +0100 Subject: completely reworked ArachneESP due to performance issues --- src/main/java/me/Danker/features/ArachneESP.java | 44 ++++++++---------------- 1 file changed, 15 insertions(+), 29 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 6187eed..d31a0bd 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -42,7 +42,7 @@ public class ArachneESP { arachne = null; } - public boolean isSpidersDen(List scoreboard) { + public boolean inSpidersDen(List scoreboard) { for (String s : scoreboard) { if (ScoreboardHandler.cleanSB(s).contains("Spiders Den")) { return true; @@ -51,49 +51,35 @@ public class ArachneESP { return false; } - @SubscribeEvent - public void onTick(TickEvent.ClientTickEvent event) { - if (!Utils.inSkyblock) return; - if (event.phase != TickEvent.Phase.START) return; - - World world = Minecraft.getMinecraft().theWorld; - if (DankersSkyblockMod.tickAmount % 2 == 0 && ToggleCommand.highlightArachne) { - if (world != null) { - - List entities = world.getLoadedEntityList(); - List scoreboard = ScoreboardHandler.getSidebarLines(); - if (!isSpidersDen(scoreboard)) return; - if (!arachneActive) return; - for (Entity e : entities) { - if (e.getName().contains("Arachne") && !e.getName().contains("Arachne's Brood")) { - arachne = e; - } - } - } - } - } - @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { if (!Utils.inSkyblock) return; + if (!inSpidersDen(ScoreboardHandler.getSidebarLines())) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); if (message.contains("Something is awakening")){ arachneActive = true; + World world = Minecraft.getMinecraft().theWorld; + List entities = world.getLoadedEntityList(); + for (Entity e : entities) { + if (e.getName().contains("Arachne") && !e.getName().contains("Arachne's Brood")) { + arachne = e; + } + } } if (message.contains("ARACHNE DOWN!")) { arachneActive = false; + arachne = null; } } - @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (!Utils.inSkyblock) return; - if (arachneActive && ToggleCommand.highlightArachne) { - if (arachne != null) { - AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); - Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); - } + if (arachne != null) { + if (arachneActive && ToggleCommand.highlightArachne) { + AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); + Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + } } } -- cgit From 4effca575301c7be5a964b4869531c46cb273a4e Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Tue, 16 Mar 2021 20:02:01 +0100 Subject: added colours to the config --- src/main/java/me/Danker/features/ArachneESP.java | 2 +- src/main/java/me/Danker/features/SlayerESP.java | 2 +- src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index d31a0bd..1a9b0b2 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -34,7 +34,7 @@ public class ArachneESP { static Entity arachne = null; static boolean arachneActive = true; - public static final int ARACHANE_COLOUR = 0x00FF00; + public static int ARACHANE_COLOUR; @SubscribeEvent diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index 5f1783c..17a1c0e 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -29,7 +29,7 @@ public class SlayerESP { static Entity wolf = null; static boolean slayerActive = false; static boolean slayerStarted = false; - public static final int SLAYER_COLOUR = 0x0000FF; + public static int SLAYER_COLOUR; @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index dc43dca..aa35ded 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -508,6 +508,8 @@ public class ConfigHandler { BonzoMaskTimer.BONZO_COLOR = initString("colors", "bonzoDisplay", EnumChatFormatting.RED.toString()); BlazeSolver.LOWEST_BLAZE_COLOUR = initInt("colors", "blazeLowest", 0xFF0000); BlazeSolver.HIGHEST_BLAZE_COLOUR = initInt("colors", "blazeHighest", 0x40FF40); + SlayerESP.SLAYER_COLOUR = initInt("colors", "slayerColor", 0x0000FF); + ArachneESP.ARACHANE_COLOUR = initInt("colors", "arachneColor", 0x00FF00); PetColours.PET_1_TO_9 = initInt("colors", "pet1To9", 0x999999); // Grey PetColours.PET_10_TO_19 = initInt("colors", "pet10To19", 0xD62440); // Red PetColours.PET_20_TO_29 = initInt("colors", "pet20To29", 0xEF5230); // Orange -- cgit From e499665f275c324bcbf4c3c78b6ef40c20ba611b Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Wed, 24 Mar 2021 14:59:29 -0400 Subject: Add dungeon and blood room custom music --- README.md | 8 +- src/main/java/me/Danker/DankersSkyblockMod.java | 3 + .../me/Danker/commands/CustomMusicCommand.java | 53 ++++++---- .../java/me/Danker/commands/DankerGuiCommand.java | 2 + .../java/me/Danker/commands/LobbyBankCommand.java | 1 - .../java/me/Danker/commands/ToggleCommand.java | 34 +++++-- src/main/java/me/Danker/features/ArachneESP.java | 10 -- src/main/java/me/Danker/features/CustomMusic.java | 111 ++++++++++++++++----- src/main/java/me/Danker/features/SlayerESP.java | 1 - src/main/java/me/Danker/gui/CustomMusicGui.java | 73 ++++++++++++++ src/main/java/me/Danker/gui/DankerGui.java | 35 ++----- src/main/java/me/Danker/gui/OnlySlayerGui.java | 1 - .../java/me/Danker/handlers/ConfigHandler.java | 5 + 13 files changed, 239 insertions(+), 98 deletions(-) create mode 100644 src/main/java/me/Danker/gui/CustomMusicGui.java (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/README.md b/README.md index f6c76e6..0bd7c27 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Discord Server: https://discord.gg/QsEkNQS - Watcher ready message - Catacombs F7 Stage 3 solvers (Starts with letter, select all colour, ignore arrows on sea lanterns) - Find correct Livid (with graphic display of HP) -- Use custom music in dungeon boss room +- Use custom music in supported locations - Experimentation solvers (Ultrasequencer, Chronomatron, Superpairs) - Hide tooltips in experiment addons - Hide tooltips in Melody's Harp @@ -85,7 +85,7 @@ Discord Server: https://discord.gg/QsEkNQS - /reparty - Disbands and reparties all members in the party - /fairysouls - Check the fairysouls of a player - /lobbybank - Uses API to find the average bank total of the lobby, as well the three players with the highest total money in the bank (and purse). -- /dsmmusic [dungeonboss] [#] - Stops or reloads the custom music. +- /dsmmusic [dungeonboss/bloodroom/dungeon] [#] - Stops, reloads or changes the volume of custom music. ## Keybinds - Open Maddox menu - M by default. @@ -93,7 +93,9 @@ Discord Server: https://discord.gg/QsEkNQS - Start/Stop Skill Tracker - Numpad 5 by default. ## Custom Music -- To use custom music, place a music file with the given name in the `.minecraft/config/dsmmusic` folder and enable the custom song in /dsm. +- To use custom music, place a music file with the given name in the `.minecraft/config/dsmmusic` folder, either run `/dsmmusic reload` or restart your game, and enable the custom song in `/dsm`. + - Dungeon music: `dungeon.wav` + - Blood room music: `bloodroom.wav` - Dungeon boss music: `dungeonboss.wav` ### Notes diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 0e7000b..17def9a 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -340,6 +340,9 @@ public class DankersSkyblockMod { case "skilltracker": mc.displayGuiScreen(new SkillTrackerGui()); break; + case "custommusic": + mc.displayGuiScreen(new CustomMusicGui()); + break; } } guiToOpen = null; diff --git a/src/main/java/me/Danker/commands/CustomMusicCommand.java b/src/main/java/me/Danker/commands/CustomMusicCommand.java index 8e389ac..6412474 100644 --- a/src/main/java/me/Danker/commands/CustomMusicCommand.java +++ b/src/main/java/me/Danker/commands/CustomMusicCommand.java @@ -10,8 +10,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import javax.sound.sampled.Clip; -import javax.sound.sampled.FloatControl; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.UnsupportedAudioFileException; import java.io.IOException; @@ -26,7 +24,7 @@ public class CustomMusicCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " [dungeonboss] [#]"; + return "/" + getCommandName() + " [dungeonboss/bloodroom/dungeon] [#]"; } public static String usage(ICommandSender arg0) { @@ -43,7 +41,7 @@ public class CustomMusicCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "stop", "reload", "volume"); } else if (args.length == 2) { - return getListOfStringsMatchingLastWord(args, "dungeonboss"); + return getListOfStringsMatchingLastWord(args, "dungeonboss", "bloodroom", "dungeon"); } return null; } @@ -59,7 +57,7 @@ public class CustomMusicCommand extends CommandBase { switch (arg1[0].toLowerCase()) { case "stop": - if (CustomMusic.dungeonboss != null) CustomMusic.dungeonboss.stop(); + CustomMusic.reset(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Stopped custom music.")); break; case "reload": @@ -77,28 +75,43 @@ public class CustomMusicCommand extends CommandBase { return; } + float volume = Float.parseFloat(arg1[2]); + boolean success; + switch (arg1[1].toLowerCase()) { case "dungeonboss": - try { - float volume = Float.parseFloat(arg1[2]); - - FloatControl bounds = (FloatControl) CustomMusic.dungeonboss.getControl(FloatControl.Type.MASTER_GAIN); - if (volume <= bounds.getMinimum() || volume >= bounds.getMaximum()) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Volume can only be set between " + bounds.getMinimum() + " and " + bounds.getMaximum() + ".")); - return; - } - - CustomMusic.dungeonbossDecibels = volume; - ConfigHandler.writeIntConfig("music", "DungeonBossDecibels", (int) volume); - CustomMusic.init(DankersSkyblockMod.configDirectory); - } catch (IOException | LineUnavailableException | UnsupportedAudioFileException e) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "An error occurred while trying to reload music.")); - e.printStackTrace(); + success = CustomMusic.dungeonboss.setVolume(volume); + if (!success) { + return; } + + CustomMusic.dungeonbossDecibels = volume; + ConfigHandler.writeIntConfig("music", "DungeonBossDecibels", (int) volume); + break; + case "bloodroom": + success = CustomMusic.bloodroom.setVolume(volume); + if (!success) { + return; + } + + CustomMusic.bloodroomDecibels = volume; + ConfigHandler.writeIntConfig("music", "BloodRoomDecibels", (int) volume); + break; + case "dungeon": + success = CustomMusic.dungeon.setVolume(volume); + if (!success) { + return; + } + + CustomMusic.dungeonDecibels = volume; + ConfigHandler.writeIntConfig("music", "DungeonDecibels", (int) volume); break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + return; } + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + DankersSkyblockMod.MAIN_COLOUR + " was set to " + DankersSkyblockMod.SECONDARY_COLOUR + volume + "db")); break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 97af0df..40fcb0a 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -97,6 +97,8 @@ public class DankerGuiCommand extends CommandBase { debug.append("[specialhoe][").append(ToggleCommand.specialHoeRightClick).append("]\n"); debug.append("[melodyTooltips][").append(ToggleCommand.melodyTooltips).append("]\n"); debug.append("[dungeonbossmusic][").append(ToggleCommand.dungeonBossMusic).append("]\n"); + debug.append("[bloodroommusic][").append(ToggleCommand.bloodRoomMusic).append("]\n"); + debug.append("[dungeonmusic][").append(ToggleCommand.dungeonMusic).append("]\n"); debug.append("# Locations\n"); debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n"); debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n"); diff --git a/src/main/java/me/Danker/commands/LobbyBankCommand.java b/src/main/java/me/Danker/commands/LobbyBankCommand.java index 77dce2a..886077c 100644 --- a/src/main/java/me/Danker/commands/LobbyBankCommand.java +++ b/src/main/java/me/Danker/commands/LobbyBankCommand.java @@ -5,7 +5,6 @@ import com.google.gson.JsonObject; import me.Danker.DankersSkyblockMod; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; -import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetworkPlayerInfo; import net.minecraft.command.CommandBase; diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index b8b5845..73011ad 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -80,6 +80,8 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean melodyTooltips; // Custom Music public static boolean dungeonBossMusic; + public static boolean bloodRoomMusic; + public static boolean dungeonMusic; @Override public String getCommandName() { @@ -96,8 +98,9 @@ public class ToggleCommand extends CommandBase implements ICommand { "notifyslayerslain/necronnotifications/bonzotimer/threemanpuzzle/oruopuzzle/blazepuzzle/" + "creeperpuzzle/waterpuzzle/tictactoepuzzle/boulderpuzzle/silverfishpuzzle/icewalkpuzzle/watchermessage/" + "startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" + - "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/ " + - "/specialhoe/melodytooltips/highlightslayers/highlightArachne/dungeonbossmusic/list>"; + "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/" + + "specialhoe/melodytooltips/highlightslayers/highlightarachne/dungeonbossmusic/bloodroommusic/" + + "dungeonmusic/list>"; } public static String usage(ICommandSender arg0) { @@ -124,7 +127,8 @@ public class ToggleCommand extends CommandBase implements ICommand { "silverfishpuzzle", "icewalkpuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", - "hidetooltipsinaddons", "pickblock", "specialhoe", "melodytooltips", "highlightslayers", "dungeonbossmusic", "list"); + "hidetooltipsinaddons", "pickblock", "specialhoe", "melodytooltips", "highlightslayers", + "dungeonbossmusic", "bloodroommusic", "dungeonmusic", "list"); } return null; } @@ -436,16 +440,22 @@ public class ToggleCommand extends CommandBase implements ICommand { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Highlight Arachne " + DankersSkyblockMod.SECONDARY_COLOUR + highlightArachne + DankersSkyblockMod.MAIN_COLOUR + ".")); case "dungeonbossmusic": dungeonBossMusic = !dungeonBossMusic; - if (CustomMusic.dungeonboss != null) { - if (dungeonBossMusic) { - CustomMusic.start(); - } else { - CustomMusic.dungeonboss.stop(); - } - } + CustomMusic.dungeonboss.stop(); ConfigHandler.writeBooleanConfig("toggles", "DungeonBossMusic", dungeonBossMusic); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom dungeon boss music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonBossMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "bloodroommusic": + bloodRoomMusic = !bloodRoomMusic; + CustomMusic.bloodroom.stop(); + ConfigHandler.writeBooleanConfig("toggles", "BloodRoomMusic", bloodRoomMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom blood room music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + bloodRoomMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "dungeonmusic": + dungeonMusic = !dungeonMusic; + CustomMusic.dungeon.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DungeonMusic", dungeonMusic); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Custom dungeon music has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + dungeonMusic + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "list": player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Coord/Angle display: " + DankersSkyblockMod.VALUE_COLOUR + coordsToggled + "\n" + @@ -496,7 +506,9 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Hide tooltips in Melody's Harp " + DankersSkyblockMod.VALUE_COLOUR + melodyTooltips + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Highlight Slayer Bosses " + DankersSkyblockMod.VALUE_COLOUR + highlightSlayers + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Highlight Arachne Boss " + DankersSkyblockMod.VALUE_COLOUR + highlightArachne + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon boss music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonBossMusic + DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon boss music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonBossMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom blood room music: " + DankersSkyblockMod.VALUE_COLOUR + bloodRoomMusic + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Custom dungeon music: " + DankersSkyblockMod.VALUE_COLOUR + dungeonMusic )); break; default: diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 1a9b0b2..491c42a 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -1,27 +1,17 @@ package me.Danker.features; -import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; import me.Danker.handlers.ScoreboardHandler; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; -import net.minecraft.entity.monster.EntitySpider; -import net.minecraft.entity.monster.EntityZombie; -import net.minecraft.entity.passive.EntityWolf; import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StringUtils; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.event.entity.player.AttackEntityEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; - import java.util.List; diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java index ee0a2cc..342913f 100644 --- a/src/main/java/me/Danker/features/CustomMusic.java +++ b/src/main/java/me/Danker/features/CustomMusic.java @@ -6,6 +6,8 @@ import me.Danker.handlers.ScoreboardHandler; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.StringUtils; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; @@ -22,10 +24,15 @@ import java.util.List; public class CustomMusic { + static boolean cancelNotes; static boolean prevInDungeonBossRoom = false; - static boolean inDungeonBossRoom = false; - public static Clip dungeonboss; + public static boolean inDungeonBossRoom = false; + public static Song dungeonboss; public static float dungeonbossDecibels; + public static Song bloodroom; + public static float bloodroomDecibels; + public static Song dungeon; + public static float dungeonDecibels; @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { @@ -56,30 +63,44 @@ public class CustomMusic { firstLine.contains("necron")) { // F7 inDungeonBossRoom = true; - if (!prevInDungeonBossRoom && dungeonboss != null) { - start(); + if (!prevInDungeonBossRoom) { + dungeonboss.start(); } } else { - reset(); + inDungeonBossRoom = false; + dungeonboss.stop(); } } } } } - @SubscribeEvent + @SubscribeEvent(receiveCanceled = true) public void onChat(ClientChatReceivedEvent event) { - if (!Utils.inDungeons) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - if (message.contains("EXTRA STATS ")) { - if (dungeonboss != null) dungeonboss.stop(); + if (ToggleCommand.dungeonMusic && Utils.inDungeons) { + if (message.contains("[NPC] Mort: Here, I found this map when I first entered the dungeon.")) { + dungeon.start(); + } + } + + if (message.contains(":")) return; + + if (Utils.inDungeons) { + if (message.contains("EXTRA STATS ")) { + dungeonboss.stop(); + bloodroom.stop(); + dungeon.stop(); + } else if (ToggleCommand.bloodRoomMusic && message.contains("The BLOOD DOOR has been opened!")) { + bloodroom.start(); + } } } @SubscribeEvent public void onSound(PlaySoundEvent event) { - if (ToggleCommand.dungeonBossMusic && Utils.inDungeons && inDungeonBossRoom) { + if (cancelNotes) { if (event.isCancelable() && event.name.startsWith("note.")) event.setCanceled(true); } } @@ -91,29 +112,69 @@ public class CustomMusic { reset(); - dungeonboss = AudioSystem.getClip(); - File dungeonBossFile = new File(configDirectory + "/dsmmusic/dungeonboss.wav"); + File dungeonBossFile = new File(directory + "/dungeonboss.wav"); System.out.println("dungeonboss.wav exists?: " + dungeonBossFile.exists()); - if (dungeonBossFile.exists()) { - AudioInputStream ais = AudioSystem.getAudioInputStream(dungeonBossFile); - dungeonboss.open(ais); + dungeonboss = new Song(dungeonBossFile, dungeonbossDecibels); - FloatControl volume = (FloatControl) dungeonboss.getControl(FloatControl.Type.MASTER_GAIN); - volume.setValue(dungeonbossDecibels); - } + File bloodRoomFile = new File(directory + "/bloodroom.wav"); + System.out.println("bloodroom.wav exists?: " + bloodRoomFile.exists()); + bloodroom = new Song(bloodRoomFile, bloodroomDecibels); + + File dungeonFile = new File(directory + "/dungeon.wav"); + System.out.println("dungeon.wav exists?: " + dungeonFile.exists()); + dungeon = new Song(dungeonFile, dungeonDecibels); } - static void reset() { - inDungeonBossRoom = false; + public static void reset() { + cancelNotes = false; if (dungeonboss != null) dungeonboss.stop(); + if (bloodroom != null) bloodroom.stop(); + if (dungeon != null) dungeon.stop(); } - public static void start() { - if (dungeonboss != null && inDungeonBossRoom) { - dungeonboss.setMicrosecondPosition(0); - dungeonboss.start(); - dungeonboss.loop(Clip.LOOP_CONTINUOUSLY); + public static class Song { + + public Clip music; + + public Song(File file, float decibels) throws IOException, UnsupportedAudioFileException, LineUnavailableException { + if (file.exists()) { + music = AudioSystem.getClip(); + AudioInputStream ais = AudioSystem.getAudioInputStream(file); + music.open(ais); + + setVolume(decibels); + } } + + public void start() { + reset(); + cancelNotes = true; + if (music != null) { + music.setMicrosecondPosition(0); + music.start(); + music.loop(Clip.LOOP_CONTINUOUSLY); + } + } + + public void stop() { + cancelNotes = false; + if (music != null) music.stop(); + } + + public boolean setVolume(float decibels) { + if (music == null) return false; + + FloatControl control = (FloatControl) music.getControl(FloatControl.Type.MASTER_GAIN); + if (decibels <= control.getMinimum() || decibels >= control.getMaximum()) { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (player != null) player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Volume can only be set between " + control.getMinimum() + " and " + control.getMaximum() + ".")); + return false; + } + + control.setValue(decibels); + return true; + } + } } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index 17a1c0e..51537ba 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -11,7 +11,6 @@ import net.minecraft.util.StringUtils; import net.minecraft.world.World; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; -import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; diff --git a/src/main/java/me/Danker/gui/CustomMusicGui.java b/src/main/java/me/Danker/gui/CustomMusicGui.java new file mode 100644 index 0000000..505bf34 --- /dev/null +++ b/src/main/java/me/Danker/gui/CustomMusicGui.java @@ -0,0 +1,73 @@ +package me.Danker.gui; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.ToggleCommand; +import me.Danker.features.CustomMusic; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; + +public class CustomMusicGui extends GuiScreen { + + private GuiButton goBack; + + private GuiButton dungeonBossMusic; + private GuiButton bloodRoomMusic; + private GuiButton dungeonMusic; + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + @Override + public void initGui() { + super.initGui(); + + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + int height = sr.getScaledHeight(); + int width = sr.getScaledWidth(); + + goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back"); + dungeonMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Custom Dungeon Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonMusic)); + bloodRoomMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Custom Blood Room Music: " + Utils.getColouredBoolean(ToggleCommand.bloodRoomMusic)); + dungeonBossMusic = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Custom Dungeon Boss Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonBossMusic)); + + this.buttonList.add(dungeonMusic); + this.buttonList.add(bloodRoomMusic); + this.buttonList.add(dungeonBossMusic); + this.buttonList.add(goBack); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + this.drawDefaultBackground(); + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void actionPerformed(GuiButton button) { + if (button == goBack) { + DankersSkyblockMod.guiToOpen = "dankergui1"; + } else if (button == dungeonBossMusic) { + ToggleCommand.dungeonBossMusic = !ToggleCommand.dungeonBossMusic; + CustomMusic.dungeonboss.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DungeonBossMusic", ToggleCommand.dungeonBossMusic); + dungeonBossMusic.displayString = "Custom Dungeon Boss Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonBossMusic); + } else if (button == bloodRoomMusic) { + ToggleCommand.bloodRoomMusic = !ToggleCommand.bloodRoomMusic; + CustomMusic.bloodroom.stop(); + ConfigHandler.writeBooleanConfig("toggles", "BloodRoomMusic", ToggleCommand.bloodRoomMusic); + bloodRoomMusic.displayString = "Custom Blood Room Music: " + Utils.getColouredBoolean(ToggleCommand.bloodRoomMusic); + } else if (button == dungeonMusic) { + ToggleCommand.dungeonMusic = !ToggleCommand.dungeonMusic; + CustomMusic.dungeon.stop(); + ConfigHandler.writeBooleanConfig("toggles", "DungeonMusic", ToggleCommand.dungeonMusic); + dungeonMusic.displayString = "Custom Dungeon Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonMusic); + } + } + +} diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 307882f..796be2b 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -2,7 +2,6 @@ package me.Danker.gui; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; -import me.Danker.features.CustomMusic; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; @@ -40,7 +39,7 @@ public class DankerGui extends GuiScreen { private GuiButton puzzleSolvers; private GuiButton experimentationTableSolvers; private GuiButton skillTracker; - private GuiButton highlightArachne; + private GuiButton customMusic; // Toggles private GuiButton gparty; private GuiButton coords; @@ -57,10 +56,13 @@ public class DankerGui extends GuiScreen { private GuiButton skill50Display; private GuiButton outlineText; private GuiButton cakeTimer; + private GuiButton pickBlock; + private GuiButton notifySlayerSlain; private GuiButton shadowFury; private GuiButton specialHoe; private GuiButton melodyTooltips; - private GuiButton dungeonBossMusic; + private GuiButton autoSkillTracker; + private GuiButton highlightArachne; // Chat Messages private GuiButton lividDagger; private GuiButton sceptreMessages; @@ -77,11 +79,8 @@ public class DankerGui extends GuiScreen { private GuiButton stopSalvageStarred; private GuiButton watcherReadyMessage; private GuiButton flowerWeapons; - private GuiButton pickBlock; - private GuiButton notifySlayerSlain; private GuiButton necronNotifications; private GuiButton bonzoTimer; - private GuiButton autoSkillTracker; public DankerGui(int page, String searchText) { this.page = page; @@ -110,15 +109,14 @@ public class DankerGui extends GuiScreen { editLocations = new GuiButton(0, 2, 5, 100, 20, "Edit Locations"); search = new GuiTextField(0, this.fontRendererObj, width - 202, 5, 200, 20); - // Page 1 changeDisplay = new GuiButton(0, 0, 0, "Change Display Settings"); onlySlayer = new GuiButton(0, 0, 0, "Set Slayer Quest"); puzzleSolvers = new GuiButton(0, 0, 0, "Toggle Dungeons Puzzle Solvers"); experimentationTableSolvers = new GuiButton(0, 0, 0, "Toggle Experimentation Table Solvers"); skillTracker = new GuiButton(0, 0, 0, "Toggle Skill XP/Hour Tracking"); + customMusic = new GuiButton(0, 0, 0, "Custom Music"); outlineText = new GuiButton(0, 0, 0, "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); pickBlock = new GuiButton(0, 0, 0, "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled)); - // Page 2 coords = new GuiButton(0, 0, 0, "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); chatMaddox = new GuiButton(0, 0, 0, "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); cakeTimer = new GuiButton(0, 0, 0, "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled)); @@ -126,7 +124,6 @@ public class DankerGui extends GuiScreen { slayerCount = new GuiButton(0, 0, 0, "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); aotd = new GuiButton(0, 0, 0, "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled)); lividDagger = new GuiButton(0, 0, 0, "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled)); - // Page 3 spiritBearAlert = new GuiButton(0, 0, 0, "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); sceptreMessages = new GuiButton(0, 0, 0, "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); midasStaffMessages = new GuiButton(0, 0, 0, "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); @@ -134,7 +131,6 @@ public class DankerGui extends GuiScreen { healMessages = new GuiButton(0, 0, 0, "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages)); cooldownMessages = new GuiButton(0, 0, 0, "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages)); manaMessages = new GuiButton(0, 0, 0, "Mana Messages: " + Utils.getColouredBoolean(ToggleCommand.manaMessages)); - // Page 4 killComboMessages = new GuiButton(0, 0, 0, "Kill Combo Messages: " + Utils.getColouredBoolean(ToggleCommand.killComboMessages)); goldenEnch = new GuiButton(0, 0, 0, "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); petColours = new GuiButton(0, 0, 0, "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); @@ -142,7 +138,6 @@ public class DankerGui extends GuiScreen { gparty = new GuiButton(0, 0, 0, "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); golemAlerts = new GuiButton(0, 0, 0, "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); rngesusAlert = new GuiButton(0, 0, 0, "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts)); - // Page 5 splitFishing = new GuiButton(0, 0, 0, "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); lowHealthNotify = new GuiButton(0, 0, 0, "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); lividSolver = new GuiButton(0, 0, 0, "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); @@ -150,15 +145,12 @@ public class DankerGui extends GuiScreen { stopSalvageStarred = new GuiButton(0, 0, 0, "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, 0, 0, "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); flowerWeapons = new GuiButton(0, 0, 0, "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); - // Page 6 notifySlayerSlain = new GuiButton(0, 0, 0, "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); necronNotifications = new GuiButton(0, 0, 0, "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); bonzoTimer = new GuiButton(0, 0, 0, "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); autoSkillTracker = new GuiButton(0, 0, 0, "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled)); - dungeonBossMusic = new GuiButton(0, 0, 0, "Custom Dungeon Boss Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonBossMusic)); shadowFury = new GuiButton(0, 0, 0, "Block Shadow Fury ability: " + Utils.getColouredBoolean(ToggleCommand.shadowFuryToggled)); specialHoe = new GuiButton(0, 0, 0, "Block Special Hoe right click: " + Utils.getColouredBoolean(ToggleCommand.specialHoeRightClick)); - // Page 7 melodyTooltips = new GuiButton(0, 0, 0, "Hide tooltips in Melody's Harp: " + Utils.getColouredBoolean(ToggleCommand.melodyTooltips)); highlightArachne = new GuiButton(0, 0, 0, "Highlight Arachne: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne)); @@ -167,6 +159,7 @@ public class DankerGui extends GuiScreen { allButtons.add(puzzleSolvers); allButtons.add(experimentationTableSolvers); allButtons.add(skillTracker); + allButtons.add(customMusic); allButtons.add(outlineText); allButtons.add(pickBlock); allButtons.add(coords); @@ -201,7 +194,6 @@ public class DankerGui extends GuiScreen { allButtons.add(necronNotifications); allButtons.add(bonzoTimer); allButtons.add(autoSkillTracker); - allButtons.add(dungeonBossMusic); allButtons.add(shadowFury); allButtons.add(specialHoe); allButtons.add(melodyTooltips); @@ -289,6 +281,8 @@ public class DankerGui extends GuiScreen { DankersSkyblockMod.guiToOpen = "experimentsolvers"; } else if (button == skillTracker) { DankersSkyblockMod.guiToOpen = "skilltracker"; + } else if (button == customMusic) { + DankersSkyblockMod.guiToOpen = "custommusic"; } else if (button == outlineText) { ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled; ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled); @@ -441,17 +435,6 @@ public class DankerGui extends GuiScreen { ToggleCommand.highlightArachne = !ToggleCommand.highlightArachne; ConfigHandler.writeBooleanConfig("toggles", "HighlightArachne", ToggleCommand.highlightArachne); highlightArachne.displayString = "Highlight Arachne: " + Utils.getColouredBoolean(ToggleCommand.highlightArachne); - } else if (button == dungeonBossMusic) { - ToggleCommand.dungeonBossMusic = !ToggleCommand.dungeonBossMusic; - if (CustomMusic.dungeonboss != null) { - if (ToggleCommand.dungeonBossMusic) { - CustomMusic.start(); - } else { - CustomMusic.dungeonboss.stop(); - } - } - ConfigHandler.writeBooleanConfig("toggles", "DungeonBossMusic", ToggleCommand.dungeonBossMusic); - dungeonBossMusic.displayString = "Custom Dungeon Boss Music: " + Utils.getColouredBoolean(ToggleCommand.dungeonBossMusic); } } diff --git a/src/main/java/me/Danker/gui/OnlySlayerGui.java b/src/main/java/me/Danker/gui/OnlySlayerGui.java index 762e5e5..ec26a13 100644 --- a/src/main/java/me/Danker/gui/OnlySlayerGui.java +++ b/src/main/java/me/Danker/gui/OnlySlayerGui.java @@ -7,7 +7,6 @@ import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 8a95ae5..6d474d4 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -274,7 +274,12 @@ public class ConfigHandler { ToggleCommand.hideTooltipsInExperimentAddonsToggled = initBoolean("toggles", "HideTooltipsInExperimentAddons", false); // Custom Music ToggleCommand.dungeonBossMusic = initBoolean("toggles", "DungeonBossMusic", false); + ToggleCommand.bloodRoomMusic = initBoolean("toggles", "BloodRoomMusic", false); + ToggleCommand.dungeonMusic = initBoolean("toggles", "DungeonMusic", false); + // Music Volume CustomMusic.dungeonbossDecibels = (float) initInt("music", "DungeonBossDecibels", -20); + CustomMusic.bloodroomDecibels = (float) initInt("music", "BloodRoomDecibels", -20); + CustomMusic.dungeonDecibels = (float) initInt("music", "DungeonDecibels", -20); // API if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); -- cgit From a288554be92f2f4ff8cdc26cd1d86d4316d7b756 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 8 Apr 2021 08:27:56 -0400 Subject: Fix hitboxes for arachne/broodfather highlight --- src/main/java/me/Danker/features/ArachneESP.java | 8 +++----- src/main/java/me/Danker/features/SlayerESP.java | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/main/java/me/Danker/features/ArachneESP.java') diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index 491c42a..c78c385 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -21,12 +21,10 @@ import java.util.List; public class ArachneESP { - static Entity arachne = null; static boolean arachneActive = true; public static int ARACHANE_COLOUR; - @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { arachne = null; @@ -67,9 +65,9 @@ public class ArachneESP { if (!Utils.inSkyblock) return; if (arachne != null) { if (arachneActive && ToggleCommand.highlightArachne) { - AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.5, arachne.posY - 1, arachne.posZ - 0.5, arachne.posX + 0.5, arachne.posY, arachne.posZ + 0.5); - Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); - } + AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.75, arachne.posY - 1, arachne.posZ - 0.75, arachne.posX + 0.75, arachne.posY, arachne.posZ + 0.75); + Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + } } } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index 51537ba..522e696 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -37,7 +37,6 @@ public class SlayerESP { wolf = null; } - @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { if (!Utils.inSkyblock) return; @@ -105,7 +104,7 @@ public class SlayerESP { return; } if (spider != null) { - AxisAlignedBB aabb = new AxisAlignedBB(spider.posX - 0.5, spider.posY - 1, spider.posZ - 0.5, spider.posX + 0.5, spider.posY, spider.posZ + 0.5); + AxisAlignedBB aabb = new AxisAlignedBB(spider.posX - 0.75, spider.posY - 1, spider.posZ - 0.75, spider.posX + 0.75, spider.posY, spider.posZ + 0.75); Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); return; } -- cgit