aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Update Notes/2.0-Pre31.md4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java21
4 files changed, 26 insertions, 5 deletions
diff --git a/Update Notes/2.0-Pre31.md b/Update Notes/2.0-Pre31.md
index bd0360f3..fb452773 100644
--- a/Update Notes/2.0-Pre31.md
+++ b/Update Notes/2.0-Pre31.md
@@ -3,6 +3,8 @@
### **Major new features**
- Added divan's mines metal detector waypoints (DeDiamondPro)
+- Added divan's mines required items overlay (DeDiamondPro)
+- Added lost precusor city required items overlay (DeDiamondPro)
### **New Features:**
- Added Ferocity, Magic find, Mining speed and mining fortune to Accessory bag (and ferocity and magic find to /pv).
@@ -59,6 +61,8 @@
- Stopped tooltip tweak rawcraftcost displaying if the cost was 0 (either due to the price being really low or api issue).
- Added a catch to the capemanger slow to catch duplicate players (https://hst.sh/enuvamecef) (idk how but hey its there now).
- Fix being able to hotkey slotlocked items in a chest gui.
+- (Hopefully) Fix storage overlay nullpointer crash.
+- Fix not being able to dye undyed leather armour.
### **Other**
- Code clean up by Ironm00n.
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java
index 07f1340d..fb0deaaf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java
@@ -68,7 +68,7 @@ public class GuiItemCustomize extends GuiScreen {
this.enchantGlint = stackHasEffect;
}
- supportCustomLeatherColour = stack.getItem() instanceof ItemArmor && ((ItemArmor)stack.getItem()).hasColor(stack);
+ supportCustomLeatherColour = stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).getArmorMaterial() == ItemArmor.ArmorMaterial.LEATHER;
enchantGlintCustomColourAnimation.setValue(enchantGlint ? 17 : 0);
this.enchantGlintButton = new GuiElementBoolean(0, 0, enchantGlint, (bool) -> {
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 91ac5e6f..6b459ecb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -594,14 +594,14 @@ public class StorageOverlay extends GuiElement {
if(coords.y-11 > 3+storageViewSize || coords.y+90 < 3) continue;
StorageManager.StoragePage page = StorageManager.getInstance().getPage(storageId, false);
-
+
if(editingNameId == storageId) {
int len = fontRendererObj.getStringWidth(renameStorageField.getTextDisplay())+10;
renameStorageField.setSize(len, 12);
renameStorageField.render(storageX, storageY-13);
} else {
String pageTitle;
- if(page.customTitle != null && !page.customTitle.isEmpty()) {
+ if(page != null && page.customTitle != null && !page.customTitle.isEmpty()) {
pageTitle = Utils.chromaStringByColourCode(page.customTitle);
} else if(entry.getValue() < 9) {
pageTitle = "Ender Chest Page " + (entry.getValue() + 1);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
index 0d111762..c3e33a83 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java
@@ -1,5 +1,6 @@
package io.github.moulberry.notenoughupdates.overlays;
+import io.github.moulberry.notenoughupdates.NEUManager;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.config.Position;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
@@ -13,6 +14,8 @@ import net.minecraft.init.Items;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
@@ -132,6 +135,9 @@ public class TimersOverlay extends TextOverlay {
ZonedDateTime currentTimeEST = ZonedDateTime.now(ZoneId.of("America/Atikokan"));
long fetchurIndex = (currentTimeEST.getDayOfMonth() % 13)-1;
+ //Added because disabled fetchur and enabled it again but it was showing the wrong item
+ //Lets see if this stays correct
+ fetchurIndex+=2;
if(fetchurIndex < 0) fetchurIndex += 13;
icon = FETCHUR_ICONS[(int)fetchurIndex];
@@ -192,11 +198,22 @@ public class TimersOverlay extends TextOverlay {
if (stack.getItem() == Items.blaze_powder) {
if (hidden.experimentsCompleted == 0) {
hidden.experimentsCompleted = currentTime;
+ return;
}
- } else {
- hidden.experimentsCompleted = 0;
}
}
+ ItemStack stackSuperPairs = lower.getStackInSlot(22);
+ if(stackSuperPairs != null && stackSuperPairs.getItem() == Items.skull && stackSuperPairs.getTagCompound() != null){
+ String[] lore = NotEnoughUpdates.INSTANCE.manager.getLoreFromNBT(stackSuperPairs.getTagCompound());
+ String text = lore[lore.length-1];
+ String cleanText = Utils.cleanColour(text);
+ if(cleanText.equals("Experiments on cooldown!")){
+ hidden.experimentsCompleted = currentTime;
+ return;
+ }
+ }
+ hidden.experimentsCompleted = 0;
+ return;
}
}