diff options
Diffstat (limited to 'src')
15 files changed, 57 insertions, 31 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java index 972557c8..c4c8a408 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java @@ -34,6 +34,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; +import net.minecraft.launchwrapper.Launch; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; @@ -48,18 +49,20 @@ public class DevTestCommand extends ClientCommandBase { private static final List<String> DEV_TESTERS = Arrays.asList( - "moulberry", - "lucycoconut", - "ironm00n", - "ariyio", - "throwpo", - "lrg89", - "dediamondpro", - "lulonaut", - "craftyoldminer", - "eisengolem", - "whalker", - "ascynx" + "d0e05de7-6067-454d-beae-c6d19d886191", // moulberry + "66502b40-6ac1-4d33-950d-3df110297aab", // lucycoconut + "a5761ff3-c710-4cab-b4f4-3e7f017a8dbf", // ironm00n + "5d5c548a-790c-4fc8-bd8f-d25b04857f44", // ariyio + "53924f1a-87e6-4709-8e53-f1c7d13dc239", // throwpo + "d3cb85e2-3075-48a1-b213-a9bfb62360c1", // lrg89 + "0b4d470f-f2fb-4874-9334-1eaef8ba4804", // dediamondpro + "ebb28704-ed85-43a6-9e24-2fe9883df9c2", // lulonaut + "698e199d-6bd1-4b10-ab0c-52fedd1460dc", // craftyoldminer + "8a9f1841-48e9-48ed-b14f-76a124e6c9df", // eisengolem + "a7d6b3f1-8425-48e5-8acc-9a38ab9b86f7", // whalker + "0ce87d5a-fa5f-4619-ae78-872d9c5e07fe", // ascynx + "a049a538-4dd8-43f8-87d5-03f09d48b4dc", // egirlefe + "7a9dc802-d401-4d7d-93c0-8dd1bc98c70d" // efefury ); private static final String[] DEV_FAIL_STRINGS = { @@ -88,7 +91,8 @@ public class DevTestCommand extends ClientCommandBase { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (!DEV_TESTERS.contains(Minecraft.getMinecraft().thePlayer.getName().toLowerCase())) { + if (!DEV_TESTERS.contains(Minecraft.getMinecraft().thePlayer.getUniqueID().toString()) + && !(boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) { if (devFailIndex >= DEV_FAIL_STRINGS.length) { throw new Error("L") { @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java index d69f86f3..c1f88942 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dungeon/JoinDungeonCommand.java @@ -44,7 +44,7 @@ public class JoinDungeonCommand extends ClientCommandBase { EnumChatFormatting.RED + "Example Usage: /join f7, /join m6 or /join 7")); } else { String cataPrefix = "catacombs"; - if (args[0].startsWith("m")) { + if (args[0].toLowerCase().startsWith("m")) { cataPrefix = "master_catacombs"; } String cmd = "/joindungeon " + cataPrefix + " " + args[0].charAt(args[0].length() - 1); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java index b0586210..11547aaa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementBoolean.java @@ -26,7 +26,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; import java.util.function.Consumer; @@ -63,8 +62,10 @@ public class GuiElementBoolean extends GuiElement { @Override public void render() { GlStateManager.color(1, 1, 1, 1); + Minecraft.getMinecraft().getTextureManager().bindTexture(GuiTextures.BAR); + RenderUtils.drawTexturedRect(x, y, xSize, ySize); + ResourceLocation buttonLoc = GuiTextures.ON; - ResourceLocation barLoc = GuiTextures.BAR_ON; long currentMillis = System.currentTimeMillis(); long deltaMillis = currentMillis - lastMillis; lastMillis = currentMillis; @@ -101,25 +102,16 @@ public class GuiElementBoolean extends GuiElement { int animation = (int) (LerpUtils.sigmoidZeroOne(this.animation / 36f) * 36); if (animation < 3) { buttonLoc = GuiTextures.OFF; - barLoc = GuiTextures.BAR; } else if (animation < 13) { buttonLoc = GuiTextures.ONE; - barLoc = GuiTextures.BAR_ONE; } else if (animation < 23) { buttonLoc = GuiTextures.TWO; - barLoc = GuiTextures.BAR_TWO; } else if (animation < 33) { buttonLoc = GuiTextures.THREE; - barLoc = GuiTextures.BAR_THREE; } - GL11.glTranslatef(0, 0, 100); Minecraft.getMinecraft().getTextureManager().bindTexture(buttonLoc); RenderUtils.drawTexturedRect(x + animation, y, 12, 14); - GL11.glTranslatef(0, 0, -100); - - Minecraft.getMinecraft().getTextureManager().bindTexture(barLoc); - RenderUtils.drawTexturedRect(x, y, xSize, ySize); } @Override diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java index 63a932b5..d3b9c04d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorDraggableList.java @@ -72,6 +72,10 @@ public class GuiOptionEditorDraggableList extends GuiOptionEditor { int height = super.getHeight() + 13; for (int strIndex : activeText) { + if (strIndex >= exampleText.length) { + activeText.remove((Integer) strIndex); + break; + } String str = exampleText[strIndex]; height += 10 * str.split("\n").length; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java index b1ab11c1..04d97747 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java @@ -88,7 +88,7 @@ public class DamageCommas { if (matcherNoCrit.matches()) { numbers = matcherNoCrit.group(2).replace(",", ""); prefix = matcherNoCrit.group(1); - suffix = "\u00A7r" + matcherNoCrit.group(3); + suffix = "\u00A7r" + (matcherNoCrit.group(3).contains("♞") ? "\u00A7d" + matcherNoCrit.group(3) : matcherNoCrit.group(3)); } else { replacementMap.put(entity, null); return name; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java index f2b13abc..f68f3c58 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java @@ -40,6 +40,10 @@ public class ItemCooldowns { private static final Map<ItemStack, Float> durabilityOverrideMap = new HashMap<>(); public static long pickaxeUseCooldownMillisRemaining = -1; private static long treecapitatorCooldownMillisRemaining = -1; + + public static boolean firstLoad = true; + public static long firstLoadMillis = 0; + private static long lastMillis = 0; public static long pickaxeCooldown = -1; @@ -57,6 +61,11 @@ public class ItemCooldowns { } long currentTime = System.currentTimeMillis(); + if (firstLoad) { + firstLoadMillis = currentTime; + firstLoad = false; + } + Long key; while ((key = blocksClicked.floorKey(currentTime - 1500)) != null) { @@ -78,7 +87,7 @@ public class ItemCooldowns { } @SubscribeEvent - public void onWorldUnload(WorldEvent.Load event) { + public void onWorldLoad(WorldEvent.Load event) { blocksClicked.clear(); if (pickaxeCooldown > 0) pickaxeUseCooldownMillisRemaining = 60 * 1000; pickaxeCooldown = -1; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java index 03fe9eff..4fe3aa8d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java @@ -397,6 +397,12 @@ public class MiningOverlay extends TextTabOverlay { } } + if (ItemCooldowns.firstLoadMillis > 0) { + //set cooldown on first skyblock load. + ItemCooldowns.pickaxeUseCooldownMillisRemaining = 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis); + ItemCooldowns.firstLoadMillis = 0; + } + String pickaxeCooldown; if (ItemCooldowns.pickaxeUseCooldownMillisRemaining <= 0) { pickaxeCooldown = DARK_AQUA + "Pickaxe CD: \u00a7aReady"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java index a72e0a24..a6457df3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java @@ -802,6 +802,9 @@ public class BasicPage extends GuiProfileViewerPage { } private void drawEntityOnScreen(int posX, int posY, int scale, float mouseX, float mouseY, EntityLivingBase ent) { + + ent.onUpdate(); + GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate((float) posX, (float) posY, 50.0F); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java index 4aeafb9e..a43e2b98 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java @@ -1033,6 +1033,7 @@ public class ProfileViewer { if (profileInfo == null) return null; if (profileName == null) profileName = latestProfile; + List<JsonObject> coopProfileInfo = getCoopProfileInformation(profileName); if (skyblockInfoCache.containsKey(profileName)) return skyblockInfoCache.get(profileName); JsonObject leveling = Constants.LEVELING; @@ -1062,6 +1063,15 @@ public class ProfileViewer { Utils.getElement(profileInfo, "experience_skill_" + (skillName.equals("social") ? "social2" : skillName)), 0 ); + // Get the coop's social skill experience since social is a shared skill + if (skillName.equals("social")) { + for (JsonObject coopProfile : coopProfileInfo) { + skillExperience += Utils.getElementAsFloat( + Utils.getElement(coopProfile, "experience_skill_social2"), + 0 + ); + } + } totalSkillXP += skillExperience; JsonArray levelingArray = Utils.getElement(leveling, "leveling_xp").getAsJsonArray(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java index 3ead5a56..062e65e2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/GuiTextures.java @@ -101,10 +101,6 @@ public class GuiTextures { new ResourceLocation("notenoughupdates:descending_overlay.png"); public static final ResourceLocation BAR = new ResourceLocation("notenoughupdates:core/bar.png"); - public static final ResourceLocation BAR_ONE = new ResourceLocation("notenoughupdates:core/bar_1.png"); - public static final ResourceLocation BAR_TWO = new ResourceLocation("notenoughupdates:core/bar_2.png"); - public static final ResourceLocation BAR_THREE = new ResourceLocation("notenoughupdates:core/bar_3.png"); - public static final ResourceLocation BAR_ON = new ResourceLocation("notenoughupdates:core/bar_on.png"); public static final ResourceLocation OFF = new ResourceLocation("notenoughupdates:core/toggle_off.png"); public static final ResourceLocation ONE = new ResourceLocation("notenoughupdates:core/toggle_1.png"); public static final ResourceLocation TWO = new ResourceLocation("notenoughupdates:core/toggle_2.png"); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java index 8b81d1b4..6187495c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java @@ -250,6 +250,7 @@ public class ItemUtils { for (int i = 0; i < newLore.size(); i++) { String cleaned = Utils.cleanColour(newLore.get(i)); if (cleaned.equals("Right-click to add this pet to")) { + if (heldItem == null) newLore.remove(i + 2); newLore.remove(i + 1); newLore.remove(i); secondLastBlankLine = i - 1; @@ -277,6 +278,7 @@ public class ItemUtils { petItemLore.add(""); } petItemLore.add("§a(" + currentPet.candyUsed + "/10) Pet Candy Used"); + if (heldItem == null) petItemLore.add(""); } newLore.addAll(secondLastBlankLine + 1, petItemLore); } diff --git a/src/main/resources/assets/notenoughupdates/core/bar_1.png b/src/main/resources/assets/notenoughupdates/core/bar_1.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_1.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_2.png b/src/main/resources/assets/notenoughupdates/core/bar_2.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_2.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_3.png b/src/main/resources/assets/notenoughupdates/core/bar_3.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_3.png +++ /dev/null diff --git a/src/main/resources/assets/notenoughupdates/core/bar_on.png b/src/main/resources/assets/notenoughupdates/core/bar_on.png Binary files differdeleted file mode 100644 index 664c0f32..00000000 --- a/src/main/resources/assets/notenoughupdates/core/bar_on.png +++ /dev/null |