aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io')
-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
3 files changed, 22 insertions, 5 deletions
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;
}
}