aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java45
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java17
5 files changed, 53 insertions, 20 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
index 680637f2..cc463308 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java
@@ -38,6 +38,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@@ -555,8 +556,8 @@ public class StorageManager {
int index = slot - 9;
boolean changed = false;
- if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) &&
- stack.getMetadata() == 14) {
+ if ((stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) &&
+ stack.getMetadata() == 14) || (stack.getItem() == Items.dye && stack.getMetadata() == 8)) {
if (storagePresent[index]) changed = true;
storagePresent[index] = false;
removePage(index);
@@ -596,7 +597,8 @@ public class StorageManager {
boolean changed = false;
- if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane)) {
+ if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane)
+ || (stack.getItem() == Items.dye && stack.getMetadata() == 8)) {
if (storagePresent[index]) changed = true;
storagePresent[index] = false;
removePage(index);
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 7e6b991c..27fea377 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java
@@ -414,7 +414,7 @@ public class StorageOverlay extends GuiElement {
if (stackOnMouse != null) {
String stackDisplay = Utils.cleanColour(stackOnMouse.getDisplayName());
if (stackDisplay.startsWith("Backpack Slot ") || stackDisplay.startsWith("Empty Backpack Slot ") ||
- stackDisplay.startsWith("Ender Chest Page ")) {
+ stackDisplay.startsWith("Ender Chest Page ") || stackDisplay.startsWith("Locked Backpack Slot ")) {
stackOnMouse = null;
}
}
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 d24f005d..03fe9eff 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
@@ -806,6 +806,7 @@ public class MiningOverlay extends TextTabOverlay {
.getItemInformation()
.get("ANVIL"))
);
+ put("First Event", new ItemStack(Items.fireworks, 1, 0));
}};
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index 0f9d1b4a..8576f141 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -61,6 +61,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.text.NumberFormat;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
@@ -749,6 +750,30 @@ public class GuiProfileViewer extends GuiScreen {
lastTime = currentTime;
+ if (currentPage != ProfileViewerPage.LOADING && currentPage != ProfileViewerPage.INVALID_NAME) {
+ int ignoredTabs = 0;
+ List<Integer> configList = NotEnoughUpdates.INSTANCE.config.profileViewer.pageLayout;
+ for (int i = 0; i < configList.size(); i++) {
+ ProfileViewerPage iPage = ProfileViewerPage.getById(configList.get(i));
+ if (iPage == null) continue;
+ if (iPage.stack == null || (iPage == ProfileViewerPage.BINGO && !showBingoPage)) {
+ ignoredTabs++;
+ continue;
+ }
+ int i2 = i - ignoredTabs;
+ int x = guiLeft + i2 * 28;
+ int y = guiTop - 28;
+
+ if (mouseX > x && mouseX < x + 28) {
+ if (mouseY > y && mouseY < y + 32) {
+ tooltipToDisplay = Collections.singletonList(iPage.stack
+ .getTooltip(Minecraft.getMinecraft().thePlayer, false)
+ .get(0));
+ }
+ }
+ }
+ }
+
if (tooltipToDisplay != null) {
List<String> grayTooltip = new ArrayList<>(tooltipToDisplay.size());
for (String line : tooltipToDisplay) {
@@ -1232,16 +1257,16 @@ public class GuiProfileViewer extends GuiScreen {
LOADING(),
INVALID_NAME(),
NO_SKYBLOCK(),
- BASIC(0, Items.paper, "Your Skills"),
- DUNGEON(1, Item.getItemFromBlock(Blocks.deadbush), "Dungeoneering"),
- EXTRA(2, Items.book, "Profile Stats"),
- INVENTORIES(3, Item.getItemFromBlock(Blocks.ender_chest), "Storage"),
- COLLECTIONS(4, Items.painting, "Collections"),
- PETS(5, Items.bone, "Pets"),
- MINING(6, Items.iron_pickaxe, "Heart of the Mountain"),
- BINGO(7, Items.filled_map, "Bingo"),
- TROPHY_FISH(8, Items.fishing_rod, "Trophy Fish"),
- BESTIARY(9, Items.iron_sword, "Bestiary");
+ BASIC(0, Items.paper, "§9Your Skills"),
+ DUNGEON(1, Item.getItemFromBlock(Blocks.deadbush), "§eDungeoneering"),
+ EXTRA(2, Items.book, "§7Profile Stats"),
+ INVENTORIES(3, Item.getItemFromBlock(Blocks.ender_chest), "§bStorage"),
+ COLLECTIONS(4, Items.painting, "§6Collections"),
+ PETS(5, Items.bone, "§aPets"),
+ MINING(6, Items.iron_pickaxe, "§5Heart of the Mountain"),
+ BINGO(7, Items.filled_map, "§zBingo"),
+ TROPHY_FISH(8, Items.fishing_rod, "§3Trophy Fish"),
+ BESTIARY(9, Items.iron_sword, "§cBestiary");
public final ItemStack stack;
public final int id;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java
index efa94ee5..70ea051a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/bestiary/BestiaryPage.java
@@ -71,6 +71,11 @@ public class BestiaryPage extends GuiProfileViewerPage {
int yIndex = 0;
for (ItemStack stack : BestiaryData.getBestiaryLocations().keySet()) {
Minecraft.getMinecraft().getTextureManager().bindTexture(pv_elements);
+ if (mouseX > guiLeft + 30 + bestiaryXSize * yIndex && mouseX < guiLeft + 30 + bestiaryXSize * yIndex + 20) {
+ if (mouseY > guiTop + 10 && mouseY < guiTop + 10 + 20) {
+ tooltipToDisplay = stack.getTooltip(Minecraft.getMinecraft().thePlayer, false);
+ }
+ }
if (stack == selectedBestiaryLocation) {
Utils.drawTexturedRect(
guiLeft + 30 + bestiaryXSize * yIndex,
@@ -109,10 +114,6 @@ public class BestiaryPage extends GuiProfileViewerPage {
Utils.drawTexturedRect(guiLeft, guiTop, 431, 202, GL11.GL_NEAREST);
GlStateManager.color(1, 1, 1, 1);
- GlStateManager.disableLighting();
- RenderHelper.enableGUIStandardItemLighting();
-
- List<String> mobs = BestiaryData.getBestiaryLocations().get(selectedBestiaryLocation);
Color color = new Color(128, 128, 128, 255);
Utils.renderAlignedString(
EnumChatFormatting.RED + "Bestiary Level: ",
@@ -121,6 +122,10 @@ public class BestiaryPage extends GuiProfileViewerPage {
guiTop + 50,
110
);
+
+ GlStateManager.disableLighting();
+ RenderHelper.enableGUIStandardItemLighting();
+ List<String> mobs = BestiaryData.getBestiaryLocations().get(selectedBestiaryLocation);
if (mobs != null) {
for (int i = 0; i < mobs.size(); i++) {
String mob = mobs.get(i);
@@ -148,7 +153,7 @@ public class BestiaryPage extends GuiProfileViewerPage {
20 * (1 - completedness) / 256f,
GL11.GL_NEAREST
);
- GlStateManager.color(1, 185 / 255f, 0, 1);
+ //GlStateManager.color(1, 185 / 255f, 0, 1);
Minecraft.getMinecraft().getTextureManager().bindTexture(pv_elements);
Utils.drawTexturedRect(
guiLeft + x,
@@ -202,7 +207,7 @@ public class BestiaryPage extends GuiProfileViewerPage {
if (level.maxed) {
progressStr = EnumChatFormatting.GOLD + "MAXED!";
} else {
- progressStr =EnumChatFormatting.AQUA +
+ progressStr = EnumChatFormatting.AQUA +
StringUtils.shortNumberFormat(Math.round((levelNum % 1) * level.maxXpForLevel)) +
"/" +
StringUtils.shortNumberFormat(level.maxXpForLevel);