aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Update Notes/2.1.md4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java (renamed from src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinSkyclientCosmetics.java)30
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java15
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java108
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/DungeonMapConfig.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java25
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java48
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java6
-rw-r--r--src/main/resources/mixins.notenoughupdates.json1
14 files changed, 130 insertions, 143 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md
index 50e2d0e4..e6b2b472 100644
--- a/Update Notes/2.1.md
+++ b/Update Notes/2.1.md
@@ -7,7 +7,7 @@
- Added combat skill overlay - nopo
- Added slayer overlay - nopo
- Added blocking clicks back to the enchanting minigames (because apparently, it's not bannable?)
-- [Donpireso replied to a sba dev's email about some of sba features, and it seems to imply that blocking clicks in guis aren't bannable](https://cdn.discordapp.com/attachments/823769568933576764/906101631861526559/unknown.png)
+ - [Donpireso replied to a sba dev's email about some of sba features, and it seems to imply that blocking clicks in guis aren't bannable](https://cdn.discordapp.com/attachments/823769568933576764/906101631861526559/unknown.png)
- Made it if you hold shift in the enchant solvers it overrides prevent missclicks - nopo
- Fixed pet overlay not updating when going into /pets - nopo
- Fixed pet overlay randomly going to level 100 - nopo
@@ -153,6 +153,8 @@
- Fixed priceless items showing first in the missing tab of the accessory bag overlay - nopo
- Fixed clicking outside of experimentation game causing it to go count that as a valid click - nopo
- Fixed storage gui when having locked backpack slots - nopo
+- Fixed hyphens in /peek being the wrong color - whalker
+- Fixed skill average calculation to include carpentry in /peek - whalker
### **Other:**
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
index fcb2aaf9..62981a30 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
@@ -23,6 +23,7 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.commands.dev.DevTestCommand;
import io.github.moulberry.notenoughupdates.commands.dev.DiagCommand;
import io.github.moulberry.notenoughupdates.commands.dev.DungeonWinTestCommand;
+import io.github.moulberry.notenoughupdates.commands.dev.EnableStorageCommand;
import io.github.moulberry.notenoughupdates.commands.dev.NullzeeSphereCommand;
import io.github.moulberry.notenoughupdates.commands.dev.PackDevCommand;
import io.github.moulberry.notenoughupdates.commands.dev.ReloadRepoCommand;
@@ -74,6 +75,7 @@ public class Commands {
ClientCommandHandler.instance.registerCommand(new DiagCommand());
ClientCommandHandler.instance.registerCommand(new ReloadRepoCommand());
ClientCommandHandler.instance.registerCommand(new ResetRepoCommand());
+ ClientCommandHandler.instance.registerCommand(new EnableStorageCommand());
// Profile Commands
ClientCommandHandler.instance.registerCommand(new PeekCommand());
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 aa5cd903..2fb6b624 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
@@ -62,7 +62,8 @@ public class DevTestCommand extends ClientCommandBase {
"lulonaut",
"craftyoldminer",
"eisengolem",
- "hannibal2"
+ "hannibal2",
+ "whalker"
);
private static final String[] DEV_FAIL_STRINGS = {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinSkyclientCosmetics.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java
index 32c9f418..3415b030 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinSkyclientCosmetics.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/dev/EnableStorageCommand.java
@@ -17,23 +17,23 @@
* along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
*/
-package io.github.moulberry.notenoughupdates.mixins;
+package io.github.moulberry.notenoughupdates.commands.dev;
-import net.minecraftforge.event.world.WorldEvent;
-import org.spongepowered.asm.mixin.Dynamic;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.Pseudo;
-import org.spongepowered.asm.mixin.injection.At;
-import org.spongepowered.asm.mixin.injection.Inject;
-import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
+import io.github.moulberry.notenoughupdates.commands.ClientCommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
-@Pseudo
-@Mixin(targets = "co.skyclient.scc.SkyclientCosmetics")
-public class MixinSkyclientCosmetics {
+public class EnableStorageCommand extends ClientCommandBase {
- @Dynamic
- @Inject(method = "onWorldLoad", at = @At("HEAD"), cancellable = true, remap = false)
- public void onWorldLoad(WorldEvent.Load event, CallbackInfo ci) {
- ci.cancel();
+ public EnableStorageCommand() {
+ super("neuenablestorage");
}
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = true;
+ NotEnoughUpdates.INSTANCE.saveConfig();
+ }
+
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java
index 77f685e1..a5f1d7f4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/profile/PeekCommand.java
@@ -121,7 +121,7 @@ public class PeekCommand extends ClientCommandBase {
float totalSkillLVL = 0;
float totalSkillCount = 0;
- List<String> skills = Arrays.asList("taming", "mining", "foraging", "enchanting", "farming", "combat", "fishing", "alchemy");
+ List<String> skills = Arrays.asList("taming", "mining", "foraging", "enchanting", "farming", "combat", "fishing", "alchemy", "carpentry");
for (String skillName : skills) {
totalSkillLVL += skyblockInfo.get(skillName).level;
totalSkillCount++;
@@ -132,6 +132,7 @@ public class PeekCommand extends ClientCommandBase {
float spider = skyblockInfo.get("spider").level;
float wolf = skyblockInfo.get("wolf").level;
float enderman = skyblockInfo.get("enderman").level;
+ float blaze = skyblockInfo.get("blaze").level;
float avgSkillLVL = totalSkillLVL / totalSkillCount;
@@ -142,6 +143,7 @@ public class PeekCommand extends ClientCommandBase {
spider = 1;
wolf = 2;
enderman = 0;
+ blaze = 0;
}
EnumChatFormatting combatPrefix = combat > 20
@@ -160,6 +162,11 @@ public class PeekCommand extends ClientCommandBase {
? EnumChatFormatting.GREEN
: EnumChatFormatting.YELLOW)
: EnumChatFormatting.RED;
+ EnumChatFormatting blazePrefix = blaze > 3
+ ? (blaze > 6
+ ? EnumChatFormatting.GREEN
+ : EnumChatFormatting.YELLOW)
+ : EnumChatFormatting.RED;
EnumChatFormatting avgPrefix = avgSkillLVL > 20
? (avgSkillLVL > 35
? EnumChatFormatting.GREEN
@@ -170,6 +177,7 @@ public class PeekCommand extends ClientCommandBase {
overallScore += spider * spider / 81f;
overallScore += wolf * wolf / 81f;
overallScore += enderman * enderman / 81f;
+ overallScore += blaze * blaze / 81f;
overallScore += avgSkillLVL / 20f;
int cata = (int) skyblockInfo.get("catacombs").level;
@@ -184,8 +192,9 @@ public class PeekCommand extends ClientCommandBase {
g + " - AVG: " + avgPrefix + (int) Math.floor(avgSkillLVL));
Utils.addChatMessage(g + "Slayer: " + zombiePrefix + (int) Math.floor(zombie) + g + "-" +
spiderPrefix + (int) Math.floor(spider) + g + "-" +
- wolfPrefix + (int) Math.floor(wolf) + "-" +
- endermanPrefix + (int) Math.floor(enderman));
+ wolfPrefix + (int) Math.floor(wolf) + g+ "-" +
+ endermanPrefix + (int) Math.floor(enderman) + g + "-" +
+ blazePrefix + (int) Math.floor(blaze));
}
if (stats == null) {
Utils.addChatMessage(EnumChatFormatting.YELLOW + "Skills, collection and/or inventory apis disabled!");
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java
index d4e0becd..c522e70a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ItemTooltipListener.java
@@ -382,6 +382,7 @@ public class ItemTooltipListener {
}
}
if (hasEnchantments || hasAttributes) {
+ ArrayList<String> addedEnchants = new ArrayList<>();
for (String op : NotEnoughUpdates.INSTANCE.config.hidden.enchantColours) {
List<String> colourOps = GuiEnchantColour.splitter.splitToList(op);
String enchantName = GuiEnchantColour.getColourOpIndex(colourOps, 0);
@@ -475,20 +476,22 @@ public class ItemTooltipListener {
String extraMods = extraModifiersBuilder.toString();
if (!colourCode.equals("z")) {
- line = line.replace("\u00A79" + enchantText, "\u00A7" + colourCode + extraMods + enchantText);
- line = line.replace("\u00A7b" + enchantText, "\u00A7" + colourCode + extraMods + enchantText);
- line = line.replace(
- "\u00A79\u00A7d\u00A7l" + enchantText,
- "\u00A7" + colourCode + extraMods + enchantText
- );
- line = line.replace(
- "\u00A7b\u00A7d\u00A7l" + enchantText,
- "\u00A7" + colourCode + extraMods + enchantText
- );
- line = line.replace(
- "\u00A7l\u00A7d\u00A7l" + enchantText,
- "\u00A7" + colourCode + extraMods + enchantText
- );
+ if (!addedEnchants.contains(enchantText)) {
+ line = line.replace("\u00A79" + enchantText, "\u00A7" + colourCode + extraMods + enchantText);
+ line = line.replace("\u00A7b" + enchantText, "\u00A7" + colourCode + extraMods + enchantText);
+ line = line.replace(
+ "\u00A79\u00A7d\u00A7l" + enchantText,
+ "\u00A7" + colourCode + extraMods + enchantText
+ );
+ line = line.replace(
+ "\u00A7b\u00A7d\u00A7l" + enchantText,
+ "\u00A7" + colourCode + extraMods + enchantText
+ );
+ line = line.replace(
+ "\u00A7l\u00A7d\u00A7l" + enchantText,
+ "\u00A7" + colourCode + extraMods + enchantText
+ );
+ }
} else {
int offset = Minecraft.getMinecraft().fontRendererObj.getStringWidth(line.replaceAll(
"\\u00A79" + enchantText + ".*",
@@ -516,6 +519,7 @@ public class ItemTooltipListener {
Utils.chromaString(enchantText, offset / 12f + index, true)
);
}
+ addedEnchants.add(enchantText);
}
}
}
@@ -689,18 +693,6 @@ public class ItemTooltipListener {
index++;
}
- for (int i = newTooltip.size() - 1; i >= 0; i--) {
- String line = Utils.cleanColour(newTooltip.get(i));
- for (int i1 = 0; i1 < Utils.rarityArr.length; i1++) {
- if (line.equals(Utils.rarityArr[i1])) {
- if (i - 2 < 0) {
- break;
- }
- newTooltip.addAll(i - 1, petToolTipXPExtend(event));
- break;
- }
- }
- }
pressedShiftLast = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
pressedArrowLast = Keyboard.isKeyDown(Keyboard.KEY_LEFT) || Keyboard.isKeyDown(Keyboard.KEY_RIGHT);
@@ -718,64 +710,6 @@ public class ItemTooltipListener {
}
}
- private List<String> petToolTipXPExtend(ItemTooltipEvent event) {
- List<String> tooltipText = new ArrayList<>();
- if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) {
- if (event.itemStack.getTagCompound().hasKey("DisablePetExp")) {
- if (event.itemStack.getTagCompound().getBoolean("DisablePetExp")) {
- return tooltipText;
- }
- }
- //7 is just a random number i chose, prob no pets with less lines than 7
- if (event.toolTip.size() > 7) {
- if (Utils.cleanColour(event.toolTip.get(1)).matches(petToolTipRegex)) {
-
- GuiProfileViewer.PetLevel petlevel = null;
-
- //this is the item itself
- NBTTagCompound tag = event.itemStack.getTagCompound();
- if (tag.hasKey("ExtraAttributes")) {
- if (tag.getCompoundTag("ExtraAttributes").hasKey("petInfo")) {
- JsonObject petInfo = NotEnoughUpdates.INSTANCE.manager.gson.fromJson(tag
- .getCompoundTag("ExtraAttributes")
- .getString("petInfo"), JsonObject.class);
- if (petInfo.has("exp") && petInfo.get("exp").isJsonPrimitive()) {
- JsonPrimitive exp = petInfo.getAsJsonPrimitive("exp");
- String petName = NotEnoughUpdates.INSTANCE.manager.getInternalNameForItem(event.itemStack);
- //Utils.getRarityFromInt(Utils.checkItemTypePet(event.toolTip))).getAsInt();
- petlevel = GuiProfileViewer.getPetLevel(
- petName,
- Utils.getRarityFromInt(Utils.checkItemTypePet(event.toolTip)),
- exp.getAsLong()
- );
- }
- }
- }
-
- if (petlevel != null) {
- tooltipText.add("");
- if (petlevel.totalXp > petlevel.maxXP) {
- tooltipText.add(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "MAX LEVEL");
- } else {
- tooltipText.add(
- EnumChatFormatting.GRAY + "Progress to Level " + (int) Math.floor(petlevel.level + 1) + ": " +
- EnumChatFormatting.YELLOW + Utils.round(petlevel.levelPercentage * 100, 1) + "%");
- int levelpercentage = Math.round(petlevel.levelPercentage * 20);
- tooltipText.add(
- EnumChatFormatting.DARK_GREEN + String.join("", Collections.nCopies(levelpercentage, "-")) +
- EnumChatFormatting.WHITE + String.join("", Collections.nCopies(20 - levelpercentage, "-")));
- tooltipText.add(
- EnumChatFormatting.GRAY + "EXP: " + EnumChatFormatting.YELLOW + myFormatter.format(petlevel.levelXp) +
- EnumChatFormatting.GOLD + "/" + EnumChatFormatting.YELLOW +
- myFormatter.format(petlevel.currentLevelRequirement) + " EXP");
- }
- }
- }
- }
- }
- return tooltipText;
- }
-
private void petToolTipXPExtendPetMenu(ItemTooltipEvent event) {
if (NotEnoughUpdates.INSTANCE.config.tooltipTweaks.petExtendExp) {
//7 is just a random number i chose, prob no pets with less lines than 7
@@ -906,15 +840,11 @@ public class ItemTooltipListener {
boolean m = Keyboard.isKeyDown(Keyboard.KEY_M);
boolean n = Keyboard.isKeyDown(Keyboard.KEY_N);
boolean f = Keyboard.isKeyDown(Keyboard.KEY_F);
- boolean l = Keyboard.isKeyDown(Keyboard.KEY_L);
if (!copied && f && NotEnoughUpdates.INSTANCE.config.hidden.dev) {
MiscUtils.copyToClipboard(NotEnoughUpdates.INSTANCE.manager.getSkullValueForItem(event.itemStack));
}
- if (!copied && l) {
- NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI = !NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI;
- }
event.toolTip.add(
EnumChatFormatting.AQUA + "Internal Name: " + EnumChatFormatting.GRAY + internal + EnumChatFormatting.GOLD +
@@ -953,7 +883,7 @@ public class ItemTooltipListener {
}
}
- copied = k || m || n || f || l;
+ copied = k || m || n || f;
}
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
index 27fea377..8878c284 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -45,13 +45,17 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.shader.Framebuffer;
+import net.minecraft.event.ClickEvent;
+import net.minecraft.event.HoverEvent;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.IChatComponent;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.ClientCommandHandler;
import org.lwjgl.input.Keyboard;
@@ -1966,6 +1970,16 @@ public class StorageOverlay extends GuiElement {
switch (buttonIndex) {
case 0:
NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = false;
+ ChatComponentText storageMessage = new ChatComponentText(
+ EnumChatFormatting.YELLOW + "[NEU] " + EnumChatFormatting.YELLOW +
+ "You just disabled the custom storage gui, did you mean to do that? If not click this message to turn it back on.");
+ storageMessage.setChatStyle(Utils.createClickStyle(ClickEvent.Action.RUN_COMMAND, "/neuenablestorage"));
+ storageMessage.setChatStyle(storageMessage.getChatStyle().setChatHoverEvent(
+ new HoverEvent(HoverEvent.Action.SHOW_TEXT,
+ new ChatComponentText(EnumChatFormatting.YELLOW + "Click to enable the custom storage gui."))));
+ ChatComponentText storageChatMessage = new ChatComponentText("");
+ storageChatMessage.appendSibling(storageMessage);
+ Minecraft.getMinecraft().thePlayer.addChatMessage(storageChatMessage);
break;
case 1:
int size =
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java
index 39374f9d..c59a7003 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/hex/GuiCustomHex.java
@@ -243,7 +243,7 @@ public class GuiCustomHex extends Gui {
searchField.setText("");
return false;
}
- boolean config = NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI;
+ boolean config = NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableHexGUI;
final List<String> gemList = new ArrayList<>(Arrays.asList(
"\u2764",
"\u2748",
@@ -4334,7 +4334,7 @@ public class GuiCustomHex extends Gui {
switch (index) {
case 0: {
- NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableTableGUI = false;
+ NotEnoughUpdates.INSTANCE.config.enchantingSolvers.enableHexGUI = false;
break;
}
case 2: {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/DungeonMapConfig.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/DungeonMapConfig.java
index 4397c02e..8e211bd6 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/DungeonMapConfig.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/DungeonMapConfig.java
@@ -73,7 +73,7 @@ public class DungeonMapConfig {
name = "Show Dungeon Map",
desc = "Show/hide the NEU dungeon map"
)
- public boolean dmEnable = false;
+ public boolean dmEnable = true;
@Expose
@ConfigOption(
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
index 2f3ffa36..306629f7 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Enchanting.java
@@ -28,7 +28,7 @@ import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption
public class Enchanting {
@ConfigOption(
- name = "Enchant Table GUI",
+ name = "Enchant Table / Hex GUI",
desc = ""
)
@ConfigEditorAccordion(id = 1)
@@ -43,6 +43,15 @@ public class Enchanting {
@ConfigAccordionId(id = 1)
public boolean enableTableGUI = true;
+ @Expose
+ @ConfigOption(
+ name = "Enable Hex GUI",
+ desc = "Show a custom GUI when using the Hex"
+ )
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 1)
+ public boolean enableHexGUI = true;
+
/*@Expose
@ConfigOption(
name = "Incompatible Enchants",
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
index 69a0cd00..8073062c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextTabOverlay.java
@@ -36,12 +36,29 @@ public abstract class TextTabOverlay extends TextOverlay {
}
private boolean lastTabState = false;
+ private boolean shouldUpdateOverlay = true;
- public void realTick() {
- boolean currentTabState = Keyboard.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindPlayerList.getKeyCode());
- if (lastTabState != currentTabState) {
- lastTabState = currentTabState;
+ @Override
+ public void tick() {
+ if (shouldUpdateOverlay) {
update();
}
}
+
+ public void realTick() {
+ shouldUpdateOverlay = shouldUpdate();
+ if (shouldUpdateOverlay) {
+ boolean currentTabState =
+ Keyboard.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindPlayerList.getKeyCode());
+ if (lastTabState != currentTabState) {
+ lastTabState = currentTabState;
+ update();
+ }
+ }
+ }
+
+ private boolean shouldUpdate() {
+ //prevent rendering unless no gui is open
+ return Minecraft.getMinecraft().currentScreen == null;
+ }
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java
index c98792ee..b4f1da30 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/InventoriesPage.java
@@ -240,28 +240,6 @@ public class InventoriesPage extends GuiProfileViewerPage {
if (currentInventoryIndex < 0) currentInventoryIndex = 0;
ItemStack[][] inventory = inventories[currentInventoryIndex];
- if (inventory == null) {
- if (selectedInventory.equalsIgnoreCase("personal_vault_contents")) {
- Utils.drawStringCentered(
- EnumChatFormatting.RED + "Personal Vault API not enabled!",
- Minecraft.getMinecraft().fontRendererObj,
- guiLeft + 317,
- guiTop + 101,
- true,
- 0
- );
- } else {
- Utils.drawStringCentered(
- EnumChatFormatting.RED + "Inventory API not enabled!",
- Minecraft.getMinecraft().fontRendererObj,
- guiLeft + 317,
- guiTop + 101,
- true,
- 0
- );
- }
- return;
- }
if (bestWeapons == null) {
bestWeapons =
@@ -363,6 +341,32 @@ public class InventoriesPage extends GuiProfileViewerPage {
}
}
+ if (inventory == null) {
+ String strToRender = "Inventory API not enabled!";
+ if (selectedInventory.equalsIgnoreCase("personal_vault_contents")) {
+ strToRender = "Personal Vault API not enabled!";
+ } else if (selectedInventory.equalsIgnoreCase("backpack_contents")) {
+ strToRender = "Inventory API not enabled";
+ Utils.drawStringCentered(
+ EnumChatFormatting.RED + "Or has no backpacks!",
+ Minecraft.getMinecraft().fontRendererObj,
+ guiLeft + 317,
+ guiTop + 112,
+ true,
+ 0
+ );
+ }
+ Utils.drawStringCentered(
+ EnumChatFormatting.RED + strToRender,
+ Minecraft.getMinecraft().fontRendererObj,
+ guiLeft + 317,
+ guiTop + 101,
+ true,
+ 0
+ );
+ return;
+ }
+
int inventoryRows = inventory.length;
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.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 ea42c7f0..d3bf266d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java
@@ -350,14 +350,14 @@ public class ProfileViewer {
/* FISHING COLLECTIONS */
put("RAW_FISH", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Raw Fish"));
- put("RAW_FISH:1", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Salmon", 1));
+ put("RAW_FISH:1", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Raw Salmon", 1));
put("RAW_FISH:2", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Clownfish", 2));
put("RAW_FISH:3", Utils.createItemStack(Items.fish, EnumChatFormatting.AQUA + "Pufferfish", 3));
put("PRISMARINE_SHARD", Utils.createItemStack(Items.prismarine_shard, EnumChatFormatting.AQUA + "Prismarine Shard"));
put("PRISMARINE_CRYSTALS", Utils.createItemStack(Items.prismarine_crystals, EnumChatFormatting.AQUA + "Prismarine Crystals"));
put("CLAY_BALL", Utils.createItemStack(Items.clay_ball, EnumChatFormatting.AQUA + "Clay"));
- put("WATER_LILY", Utils.createItemStack(Item.getItemFromBlock(Blocks.waterlily), EnumChatFormatting.AQUA + "Lilypad"));
- put("INK_SACK", Utils.createItemStack(Items.dye, EnumChatFormatting.AQUA + "Ink Sack"));
+ put("WATER_LILY", Utils.createItemStack(Item.getItemFromBlock(Blocks.waterlily), EnumChatFormatting.AQUA + "Lily Pad"));
+ put("INK_SACK", Utils.createItemStack(Items.dye, EnumChatFormatting.AQUA + "Ink Sac"));
put("SPONGE", Utils.createItemStack(Item.getItemFromBlock(Blocks.sponge), EnumChatFormatting.AQUA + "Sponge"));
put(
"MAGMA_FISH",
diff --git a/src/main/resources/mixins.notenoughupdates.json b/src/main/resources/mixins.notenoughupdates.json
index 0a547b4b..ed1ba55a 100644
--- a/src/main/resources/mixins.notenoughupdates.json
+++ b/src/main/resources/mixins.notenoughupdates.json
@@ -40,7 +40,6 @@
"MixinRenderGlobal",
"MixinRenderItem",
"MixinRenderList",
- "MixinSkyclientCosmetics",
"MixinTextureManager",
"MixinTileEntitySkullRenderer",
"MixinTileEntitySpecialRenderer",