aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-02-16 17:35:45 -0500
committerGitHub <noreply@github.com>2021-02-16 17:35:45 -0500
commita49a841d44c682036099db3bbb2c1edef609d60c (patch)
tree892f6515fc3b38661a598d225f28b97651824cf1 /src
parentb0a07f3b5861415e3d5b3f24dce06b03bf34e13d (diff)
parent5d20b7fec0a3f9a866cad488f73fa061cc66efd9 (diff)
downloadSkyblockMod-a49a841d44c682036099db3bbb2c1edef609d60c.tar.gz
SkyblockMod-a49a841d44c682036099db3bbb2c1edef609d60c.tar.bz2
SkyblockMod-a49a841d44c682036099db3bbb2c1edef609d60c.zip
Merge branch 'development' into patch-1
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java70
-rw-r--r--src/main/java/me/Danker/commands/SkillsCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/SlayerCommand.java6
-rw-r--r--src/main/java/me/Danker/gui/OnlySlayerGui.java1
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java15
-rw-r--r--src/main/java/me/Danker/utils/Utils.java66
6 files changed, 139 insertions, 21 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index bead466..69dc6ee 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -1,6 +1,5 @@
package me.Danker;
-import akka.event.Logging;
import com.google.gson.JsonObject;
import me.Danker.commands.*;
import me.Danker.gui.*;
@@ -46,7 +45,6 @@ import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
-import net.minecraftforge.event.entity.player.AttackEntityEvent;
import net.minecraftforge.event.entity.player.*;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
@@ -69,7 +67,6 @@ import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import java.awt.*;
-import java.net.URLDecoder;
import java.text.NumberFormat;
import java.util.List;
import java.util.*;
@@ -79,7 +76,7 @@ import java.util.regex.Pattern;
@Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true)
public class DankersSkyblockMod {
public static final String MODID = "Danker's Skyblock Mod";
- public static final String VERSION = "1.8.5-beta8";
+ public static final String VERSION = "1.8.5-beta9";
static double checkItemsNow = 0;
static double itemsChecked = 0;
public static Map<String, String> t6Enchants = new HashMap<>();
@@ -113,6 +110,7 @@ public class DankersSkyblockMod {
static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in",
"My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth",
"The reward isn't in any of our chests", "Both of them are telling the truth."};
+ static BlockPos riddleChest = null;
static Map<String, String[]> triviaSolutions = new HashMap<>();
static String[] triviaAnswers = null;
static Entity highestBlaze = null;
@@ -193,6 +191,12 @@ public class DankersSkyblockMod {
public static int PET_80_TO_89;
public static int PET_90_TO_99;
public static int PET_100;
+ public static int ULTRASEQUENCER_NEXT;
+ public static int ULTRASEQUENCER_NEXT_TO_NEXT;
+ public static int CHRONOMATRON_NEXT;
+ public static int CHRONOMATRON_NEXT_TO_NEXT;
+ public static int CLICK_IN_ORDER_NEXT;
+ public static int CLICK_IN_ORDER_NEXT_TO_NEXT;
@EventHandler
public void init(FMLInitializationEvent event) {
@@ -414,6 +418,7 @@ public class DankersSkyblockMod {
@SubscribeEvent
public void onWorldChange(WorldEvent.Load event) {
+ riddleChest = null;
foundLivid = false;
livid = null;
lowestBlaze = null;
@@ -685,8 +690,30 @@ public class DankersSkyblockMod {
if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) {
for (String solution : riddleSolutions) {
if (message.contains(solution)) {
+ Minecraft mc = Minecraft.getMinecraft();
String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":"));
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing."));
+ mc.thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing."));
+ if (riddleChest == null) {
+ List<Entity> entities = mc.theWorld.getLoadedEntityList();
+ for (Entity entity : entities) {
+ if (entity == null || !entity.hasCustomName()) continue;
+ if (entity.getCustomNameTag().contains(npcName)) {
+ BlockPos npcLocation = new BlockPos(entity.posX, 69, entity.posZ);
+ if (mc.theWorld.getBlockState(npcLocation.north()).getBlock() == Blocks.chest) {
+ riddleChest = npcLocation.north();
+ } else if (mc.theWorld.getBlockState(npcLocation.east()).getBlock() == Blocks.chest) {
+ riddleChest = npcLocation.east();
+ } else if (mc.theWorld.getBlockState(npcLocation.south()).getBlock() == Blocks.chest) {
+ riddleChest = npcLocation.south();
+ } else if (mc.theWorld.getBlockState(npcLocation.west()).getBlock() == Blocks.chest) {
+ riddleChest = npcLocation.west();
+ } else {
+ System.out.print("Could not find correct riddle chest.");
+ }
+ break;
+ }
+ }
+ }
break;
}
}
@@ -2518,6 +2545,17 @@ public class DankersSkyblockMod {
new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale);
}
}
+
+ @SubscribeEvent
+ public void onRenderEntity(RenderLivingEvent.Pre event) {
+ Entity entity = event.entity;
+ String name = entity.getName();
+ if (entity instanceof EntityArmorStand) {
+ if (ToggleCommand.lividSolverToggled && !entity.isEntityEqual(livid) && name.contains("Livid") && name.length() > 5 && name.charAt(1) == name.charAt(5)) {
+ event.setCanceled(true);
+ }
+ }
+ }
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onSound(final PlaySoundEvent event) {
@@ -3022,7 +3060,7 @@ public class DankersSkyblockMod {
if (ToggleCommand.lowHealthNotifyToggled && Utils.inDungeons && world != null) {
List<String> scoreboard = ScoreboardHandler.getSidebarLines();
for (String score : scoreboard) {
- if (score.endsWith("❤") && score.matches(".*§c\\d.*")) {
+ if (score.endsWith("❤") && score.matches(".* §c\\d.*")) {
String name = score.substring(score.indexOf(" ") + 1);
Utils.createTitle(EnumChatFormatting.RED + "LOW HEALTH!\n" + name, 1);
break;
@@ -3145,6 +3183,10 @@ public class DankersSkyblockMod {
@SubscribeEvent
public void onWorldRender(RenderWorldLastEvent event) {
+ if (ToggleCommand.threeManToggled && riddleChest != null) {
+ Utils.drawFilled3DBox(new AxisAlignedBB(riddleChest.getX() - 0.05, riddleChest.getY(), riddleChest.getZ() - 0.05, riddleChest.getX() + 1.05, riddleChest.getY() + 1, riddleChest.getZ() + 1.05), 0x197F19, true, event.partialTicks);
+ }
+
if (ToggleCommand.blazeToggled && Utils.inDungeons) {
if (lowestBlaze != null) {
BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ);
@@ -3762,10 +3804,10 @@ public class DankersSkyblockMod {
if (ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) {
Slot slot = invSlots.get(terminalNumberNeeded[1]);
- Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB());
+ Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, CLICK_IN_ORDER_NEXT + 0xFF000000);
Slot nextSlot = invSlots.get(terminalNumberNeeded[3]);
if (nextSlot != slot && nextSlot.getSlotIndex() != 0) {
- Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(11, 239, 231, 255).getRGB());
+ Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, CLICK_IN_ORDER_NEXT_TO_NEXT + 0xFF000000);
}
}
@@ -3783,12 +3825,12 @@ public class DankersSkyblockMod {
}
if (clickInOrderSlots[lastUltraSequencerClicked] != null) {
Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked];
- Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40);
+ Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT + 0xE5000000);
}
if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) {
if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) {
Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1];
- Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6);
+ Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT_TO_NEXT + 0xD7000000);
}
}
}
@@ -3821,15 +3863,15 @@ public class DankersSkyblockMod {
if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) {
if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) {
if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) {
- Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40);
+ Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000);
}
} else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) {
- Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40);
+ Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000);
} else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) {
- Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xBE40DAE6);
+ Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000);
}
} else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) {
- Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40);
+ Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000);
}
}
}
diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java
index bcaa783..6edbb4e 100644
--- a/src/main/java/me/Danker/commands/SkillsCommand.java
+++ b/src/main/java/me/Danker/commands/SkillsCommand.java
@@ -141,7 +141,7 @@ public class SkillsCommand extends CommandBase {
farmingLevel = achievementObject.get("skyblock_harvester").getAsInt();
}
if (achievementObject.has("skyblock_excavator")) {
- miningLevel = Math.min(achievementObject.get("skyblock_excavator").getAsInt(), 50);
+ miningLevel = achievementObject.get("skyblock_excavator").getAsInt();
}
if (achievementObject.has("skyblock_combat")) {
combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50);
diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java
index 6c83934..e7f78f1 100644
--- a/src/main/java/me/Danker/commands/SlayerCommand.java
+++ b/src/main/java/me/Danker/commands/SlayerCommand.java
@@ -14,6 +14,7 @@ import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import java.text.NumberFormat;
+import java.util.Collections;
import java.util.List;
import java.util.Locale;
@@ -25,6 +26,11 @@ public class SlayerCommand extends CommandBase {
}
@Override
+ public List<String> getCommandAliases() {
+ return Collections.singletonList("slayer");
+ }
+
+ @Override
public String getCommandUsage(ICommandSender arg0) {
return "/" + getCommandName() + " [name]";
}
diff --git a/src/main/java/me/Danker/gui/OnlySlayerGui.java b/src/main/java/me/Danker/gui/OnlySlayerGui.java
index 89c701d..a3c8ffc 100644
--- a/src/main/java/me/Danker/gui/OnlySlayerGui.java
+++ b/src/main/java/me/Danker/gui/OnlySlayerGui.java
@@ -95,6 +95,7 @@ public class OnlySlayerGui extends GuiScreen {
public void actionPerformed(GuiButton button) {
if (button == goBack) {
DankersSkyblockMod.guiToOpen = "dankergui1";
+ return;
} else if (button == off) {
BlockSlayerCommand.onlySlayerName = "";
BlockSlayerCommand.onlySlayerNumber = "";
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 9038218..05c6804 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -394,7 +394,6 @@ public class ConfigHandler {
if (!hasKey("misc", "showSkillTracker")) writeBooleanConfig("misc", "showSkillTracker", false);
if (!hasKey("misc", "firstLaunch")) writeBooleanConfig("misc", "firstLaunch", true);
-
ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft());
int height = scaled.getScaledHeight();
if (!hasKey("locations", "coordsX")) writeIntConfig("locations", "coordsX", 5);
@@ -452,8 +451,14 @@ public class ConfigHandler {
if (!hasKey("colors", "pet80To89")) writeIntConfig("colors", "pet80To89", 0x5C1F35); // idk weird magenta
if (!hasKey("colors", "pet90To99")) writeIntConfig("colors", "pet90To99", 0x9E794E); // Brown
if (!hasKey("colors", "pet100")) writeIntConfig("colors", "pet100", 0xF2D249); // Gold
+ if (!hasKey("colors", "ultrasequencerNext")) writeIntConfig("colors", "ultrasequencerNext", 0x40FF40);
+ if (!hasKey("colors", "ultrasequencerNextToNext")) writeIntConfig("colors", "ultrasequencerNextToNext", 0x40DAE6);
+ if (!hasKey("colors", "chronomatronNext")) writeIntConfig("colors", "chronomatronNext", 0x40FF40);
+ if (!hasKey("colors", "chronomatronNextToNext")) writeIntConfig("colors", "chronomatronNextToNext", 0x40DAE6);
+ if (!hasKey("colors", "clickInOrderNext")) writeIntConfig("colors", "clickInOrderNext", 0xFF00DD);
+ if (!hasKey("colors", "clickInOrderNextToNext")) writeIntConfig("colors", "clickInOrderNextToNext", 0x0BEFE7);
- //Commands
+ // Commands
if (!hasKey("commands", "reparty")) writeBooleanConfig("commands", "reparty", false);
ToggleCommand.gpartyToggled = getBoolean("toggles", "GParty");
@@ -740,6 +745,12 @@ public class ConfigHandler {
DankersSkyblockMod.PET_80_TO_89 = getInt("colors", "pet80To89");
DankersSkyblockMod.PET_90_TO_99 = getInt("colors", "pet90To99");
DankersSkyblockMod.PET_100 = getInt("colors", "pet100");
+ DankersSkyblockMod.ULTRASEQUENCER_NEXT = getInt("colors", "ultrasequencerNext");
+ DankersSkyblockMod.ULTRASEQUENCER_NEXT_TO_NEXT = getInt("colors", "ultrasequencerNextToNext");
+ DankersSkyblockMod.CHRONOMATRON_NEXT = getInt("colors", "chronomatronNext");
+ DankersSkyblockMod.CHRONOMATRON_NEXT_TO_NEXT = getInt("colors", "chronomatronNextToNext");
+ DankersSkyblockMod.CLICK_IN_ORDER_NEXT = getInt("colors", "clickInOrderNext");
+ DankersSkyblockMod.CLICK_IN_ORDER_NEXT_TO_NEXT = getInt("colors", "clickInOrderNextToNext");
}
}
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index abda6a3..b7c2ddf 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -8,10 +8,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.network.NetworkPlayerInfo;
-import net.minecraft.client.renderer.GlStateManager;
-import net.minecraft.client.renderer.RenderHelper;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.WorldRenderer;
+import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.entity.Entity;
@@ -413,6 +410,67 @@ public class Utils {
GlStateManager.popMatrix();
}
+ public static void drawFilled3DBox(AxisAlignedBB aabb, int colourInt, boolean translucent, float partialTicks) {
+ Entity render = Minecraft.getMinecraft().getRenderViewEntity();
+ WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer();
+ Color colour = new Color(colourInt);
+
+ double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks;
+ double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks;
+ double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks;
+
+ GlStateManager.pushMatrix();
+ GlStateManager.pushAttrib();
+ GlStateManager.translate(-realX, -realY, -realZ);
+ GlStateManager.disableTexture2D();
+ GlStateManager.enableAlpha();
+ GlStateManager.enableBlend();
+ GlStateManager.tryBlendFuncSeparate(770, translucent ? 1 : 771, 1, 0);
+ GlStateManager.disableCull();
+ GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue() / 255f, colour.getAlpha() / 255f);
+ worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
+ // Bottom
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
+ // Top
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
+ // West
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
+ // East
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
+ // North
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex();
+ // South
+ worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex();
+ worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex();
+ Tessellator.getInstance().draw();
+
+ GlStateManager.translate(realX, realY, realZ);
+ GlStateManager.enableCull();
+ GlStateManager.disableAlpha();
+ GlStateManager.disableBlend();
+ GlStateManager.enableTexture2D();
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ GlStateManager.popAttrib();
+ GlStateManager.popMatrix();
+ }
+
public static void renderItem(ItemStack item, float x, float y, float z) {
GlStateManager.enableRescaleNormal();