aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java28
1 files changed, 22 insertions, 6 deletions
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 13cafd98..1c4bd867 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -1198,12 +1198,24 @@ public class StorageOverlay extends GuiElement {
if (fastRender) {
fontRendererObj.drawString(
"Fast render and antialiasing do not work with Storage overlay.",
- sizeX / 2 - fontRendererObj.getStringWidth("Fast render and antialiasing do not work with Storage overlay.") / 2,
+ sizeX / 2 -
+ fontRendererObj.getStringWidth("Fast render and antialiasing do not work with Storage overlay.") / 2,
-10,
0xFFFF0000
);
}
+ if (StorageManager.getInstance().storageConfig.displayToStorageIdMapRender.isEmpty()) {
+ Utils.drawStringScaledFillWidth(
+ "Please open /storage instead of /ec",
+ sizeX / 2,
+ sizeY / 3,
+ false,
+ 0xFFFF0000,
+ sizeX - 30
+ );
+ }
+
//Inventory Text
fontRendererObj.drawString("Inventory", 180, storageViewSize + 6, textColour);
searchBar.setCustomTextColour(searchTextColour);
@@ -1887,8 +1899,10 @@ public class StorageOverlay extends GuiElement {
"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."))));
+ 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);
@@ -2126,15 +2140,17 @@ public class StorageOverlay extends GuiElement {
}
if (!searchBar.getFocus() && !renameStorageField.getFocus() &&
- (Keyboard.getEventKey() == manager.keybindViewRecipe.getKeyCode() ||
+ (Keyboard.getEventKey() == manager.keybindViewRecipe.getKeyCode() ||
Keyboard.getEventKey() == manager.keybindViewUsages.getKeyCode())) {
for (Slot slot : container.inventorySlots.inventorySlots) {
if (slot != null && ((AccessorGuiContainer) container).doIsMouseOverSlot(slot, mouseX, mouseY)) {
- String internalName = manager.createItemResolutionQuery().withItemStack(slot.getStack()).resolveInternalName();
+ String internalName =
+ manager.createItemResolutionQuery().withItemStack(slot.getStack()).resolveInternalName();
if (internalName == null) continue;
JsonObject item = manager.getItemInformation().get(internalName);
if (Keyboard.getEventKey() == manager.keybindViewRecipe.getKeyCode()) manager.showRecipe(item);
- if (Keyboard.getEventKey() == manager.keybindViewUsages.getKeyCode()) manager.displayGuiItemUsages(internalName);
+ if (Keyboard.getEventKey() == manager.keybindViewUsages.getKeyCode()) manager.displayGuiItemUsages(
+ internalName);
}
}
}