aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java153
-rw-r--r--src/main/resources/assets/notenoughupdates/invbuttons/presets.json4
-rw-r--r--src/main/resources/assets/notenoughupdates/pv_elements.pngbin5129 -> 3030 bytes
-rw-r--r--src/main/resources/mixins.notenoughupdates.json2
9 files changed, 156 insertions, 22 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index 1bca2a84..83c4b7ae 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -105,6 +105,7 @@ public class ItemPriceInformation {
break;
case 4:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;
@@ -172,6 +173,7 @@ public class ItemPriceInformation {
break;
case 3:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 19bd0dfa..d196f75a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -387,7 +387,8 @@ public class NEUOverlay extends Gui {
if(Mouse.getEventButtonState()) {
//displayInformationPane(HTMLInfoPane.createFromWikiUrl(overlay, manager, "Help",
// "https://moulberry.github.io/files/neu_help.html"));
- Minecraft.getMinecraft().displayGuiScreen(new HelpGUI());
+ //Minecraft.getMinecraft().displayGuiScreen(new HelpGUI());
+ ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neuhelp");
Utils.playPressSound();
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
index 583e3715..75a63644 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java
@@ -312,7 +312,9 @@ public class CapeManager {
playerMap.clear();
for(EntityPlayer player : Minecraft.getMinecraft().theWorld.playerEntities) {
String uuid = player.getUniqueID().toString().replace("-", "");
- playerMap.put(uuid, player);
+ try {
+ playerMap.put(uuid, player);
+ } catch(IllegalArgumentException ignored){}
}
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
index 11351857..7f981092 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
@@ -99,10 +99,11 @@ public class SlotLocking {
public void changedSlot(int slotNumber){
int pingModifier = NotEnoughUpdates.INSTANCE.config.slotLocking.slotLockSwapDelay;
if(pingModifier == 0){ return; };
+ if(!isSlotIndexLocked(slotNumber)){ return;}
long currentTimeMilis = System.currentTimeMillis();
for (int i = 0; i < slotChanges.length; i++) {
- if(i != slotNumber && slotChanges[i] != 0 && slotChanges[i] < (currentTimeMilis+pingModifier)){
+ if(i != slotNumber && slotChanges[i] != 0 && (slotChanges[i] + (long) pingModifier) > currentTimeMilis){
slotChanges[i] = 0;
}
}
@@ -115,10 +116,8 @@ public class SlotLocking {
long currentTimeMilis = System.currentTimeMillis();
for (int i = 0; i < slotChanges.length; i++) {
- if(slotChanges[i] != 0 && slotChanges[i] < (currentTimeMilis+pingModifier)){
- if(isSlotIndexLocked(i)){
- return true;
- }
+ if (slotChanges[i] != 0 && isSlotIndexLocked(i) && (slotChanges[i] + (long) pingModifier) > currentTimeMilis) {
+ return true;
}
}
return false;
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 21d1018d..07f1340d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java
@@ -215,6 +215,7 @@ public class GuiItemCustomize extends GuiScreen {
EnumChatFormatting.LIGHT_PURPLE+"\u00B6d = Purple",
EnumChatFormatting.YELLOW+"\u00B6e = Yellow",
EnumChatFormatting.WHITE+"\u00B6f = White",
+ "\u00A7Z\u00B6Z = SBA Chroma"+EnumChatFormatting.RESET+EnumChatFormatting.GRAY+" (Requires SBA)",
"",
EnumChatFormatting.GREEN+"Available formatting codes:",
EnumChatFormatting.GRAY+"\u00B6k = "+EnumChatFormatting.OBFUSCATED+"Obfuscated",
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 56ed9502..22cbf04d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -553,6 +553,15 @@ public class GuiProfileViewer extends GuiScreen {
}
}
}
+ if(mouseX >= guiLeft-29 && mouseX <= guiLeft){
+ if(mouseY >= guiTop && mouseY<= guiTop+28){
+ onMasterMode = false;
+ return;
+ } else if(mouseY+28 >= guiTop && mouseY<= guiTop+28*2){
+ onMasterMode = true;
+ return;
+ }
+ }
}
protected void keyTypedDung(char typedChar, int keyCode) {
@@ -754,6 +763,13 @@ public class GuiProfileViewer extends GuiScreen {
}
}
+ private static final LinkedHashMap<String, ItemStack> dungeonsModeIcons = new LinkedHashMap<>();
+ static {
+ dungeonsModeIcons.put("catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("DUNGEON_STONE")),EnumChatFormatting.GRAY+"Normal Mode", true));
+ dungeonsModeIcons.put("master_catacombs", Utils.editItemStackInfo(NotEnoughUpdates.INSTANCE.manager.jsonToStack(NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("MASTER_SKULL_TIER_7")),EnumChatFormatting.GRAY+"Master Mode", true));
+
+ }
+
private void drawDungPage(int mouseX, int mouseY, float partialTicks) {
Minecraft.getMinecraft().getTextureManager().bindTexture(pv_dung);
Utils.drawTexturedRect(guiLeft, guiTop, sizeX, sizeY, GL11.GL_NEAREST);
@@ -768,6 +784,13 @@ public class GuiProfileViewer extends GuiScreen {
int sectionWidth = 110;
+ String dungeonString = onMasterMode?"master_catacombs":"catacombs";
+
+ //Utils.drawStringCentered((onMasterMode?"Master Mode":"Catacombs"),fontRendererObj,(guiLeft+sizeX/2), guiTop+10, true, 0xffff0000);
+ Utils.renderShadowedString(EnumChatFormatting.RED+(onMasterMode?"Master Mode":"Catacombs"),
+ (guiLeft+sizeX/2), guiTop+5, sectionWidth);
+
+
ProfileViewer.Level levelObjCata = levelObjCatas.get(profileId);
//Catacombs level thingy
{
@@ -865,35 +888,58 @@ public class GuiProfileViewer extends GuiScreen {
float secrets = Utils.getElementAsFloat(Utils.getElement(hypixelInfo,
"achievements.skyblock_treasure_hunter"), 0);
-
float totalRuns = 0;
+ float totalRunsF = 0;
float totalRunsF5 = 0;
for(int i=1; i<=7; i++) {
float runs = Utils.getElementAsFloat(Utils.getElement(profileInfo,
"dungeons.dungeon_types.catacombs.tier_completions."+i), 0);
- totalRuns += runs;
+ totalRunsF += runs;
if(i >= 5) {
totalRunsF5 += runs;
}
}
+ float totalRunsM = 0;
+ float totalRunsM5 = 0;
+ for(int i=1; i<=7; i++) {
+ float runs = Utils.getElementAsFloat(Utils.getElement(profileInfo,
+ "dungeons.dungeon_types.master_catacombs.tier_completions."+i), 0);
+ totalRunsM += runs;
+ if(i >= 5) {
+ totalRunsM5 += runs;
+ }
+ }
+ totalRuns=totalRunsF+totalRunsM;
float mobKills = 0;
+ float mobKillsF = 0;
float mobKillsF5 = 0;
for(int i=1; i<=7; i++) {
float kills = Utils.getElementAsFloat(Utils.getElement(profileInfo,
"dungeons.dungeon_types.catacombs.mobs_killed."+i), 0);
- mobKills += kills;
+ mobKillsF += kills;
if(i >= 5) {
mobKillsF5 += kills;
}
}
+ float mobKillsM = 0;
+ float mobKillsM5 = 0;
+ for(int i=1; i<=7; i++) {
+ float kills = Utils.getElementAsFloat(Utils.getElement(profileInfo,
+ "dungeons.dungeon_types.master_catacombs.mobs_killed."+i), 0);
+ mobKillsM += kills;
+ if(i >= 5) {
+ mobKillsM5 += kills;
+ }
+ }
+ mobKills = mobKillsF+mobKillsM;
int miscTopY = y+55;
- Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Total Runs ",
- EnumChatFormatting.WHITE.toString()+((int)(totalRuns)), x, miscTopY, sectionWidth);
- Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Total Runs (F5-7) ",
- EnumChatFormatting.WHITE.toString()+((int)(totalRunsF5)), x, miscTopY+10, sectionWidth);
+ Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Total Runs "+(onMasterMode?"M":"F"),
+ EnumChatFormatting.WHITE.toString()+((int)(onMasterMode?totalRunsM:totalRunsF)), x, miscTopY, sectionWidth);
+ Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Total Runs ("+(onMasterMode?"M":"F")+ "5-7) ",
+ EnumChatFormatting.WHITE.toString()+((int)(onMasterMode?totalRunsM5:totalRunsF5)), x, miscTopY+10, sectionWidth);
Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Secrets (Total) ",
EnumChatFormatting.WHITE.toString()+shortNumberFormat(secrets, 0), x, miscTopY+20, sectionWidth);
Utils.renderAlignedString(EnumChatFormatting.YELLOW+"Secrets (/Run) ",
@@ -924,11 +970,11 @@ public class GuiProfileViewer extends GuiScreen {
}
float timeNorm = Utils.getElementAsFloat(Utils.getElement(profileInfo,
- "dungeons.dungeon_types.catacombs.fastest_time."+floorTime), 0);
+ "dungeons.dungeon_types."+dungeonString+".fastest_time."+floorTime), 0);
float timeS = Utils.getElementAsFloat(Utils.getElement(profileInfo,
- "dungeons.dungeon_types.catacombs.fastest_time_s."+floorTime), 0);
+ "dungeons.dungeon_types."+dungeonString+".fastest_time_s."+floorTime), 0);
float timeSPLUS = Utils.getElementAsFloat(Utils.getElement(profileInfo,
- "dungeons.dungeon_types.catacombs.fastest_time_s_plus."+floorTime), 0);
+ "dungeons.dungeon_types."+dungeonString+".fastest_time_s_plus."+floorTime), 0);
String timeNormStr = timeNorm <= 0 ? "N/A" : Utils.prettyTime((long)timeNorm);
String timeSStr = timeS <= 0 ? "N/A" : Utils.prettyTime((long)timeS);
String timeSPlusStr = timeSPLUS <= 0 ? "N/A" : Utils.prettyTime((long)timeSPLUS);
@@ -949,7 +995,7 @@ public class GuiProfileViewer extends GuiScreen {
x+sectionWidth/2, y, sectionWidth);
for(int i=1; i<=7; i++) {
float compl = Utils.getElementAsFloat(Utils.getElement(profileInfo,
- "dungeons.dungeon_types.catacombs.tier_completions."+i), 0);
+ "dungeons.dungeon_types."+dungeonString+".tier_completions."+i), 0);
if(BOSS_HEADS[i-1] == null) {
String textureLink = bossFloorHeads[i-1];
@@ -985,7 +1031,7 @@ public class GuiProfileViewer extends GuiScreen {
Utils.drawItemStack(BOSS_HEADS[i-1], 0, 0);
GlStateManager.popMatrix();
- Utils.renderAlignedString(String.format(EnumChatFormatting.YELLOW+"%s (F%d) ", bossFloorArr[i-1], i),
+ Utils.renderAlignedString(String.format(EnumChatFormatting.YELLOW+"%s ("+(onMasterMode?"M":"F")+"%d) ", bossFloorArr[i-1], i),
EnumChatFormatting.WHITE.toString()+(int)compl,
x+16, y+18+20*(i-1), sectionWidth-15);
@@ -1031,6 +1077,89 @@ public class GuiProfileViewer extends GuiScreen {
renderXpBar(colour+skillName, dungSkillsStack[i], x, y+20+29*i, sectionWidth, levelObj, mouseX, mouseY);
}
}
+
+ drawSideButtons();
+
+ //drawSideButton(0, dungeonsModeIcons.get("catacombs"), true);
+ //drawSideButton(1, dungeonsModeIcons.get("master_catacombs"), true);
+ //drawSideButton(1, dungeonsModeIcons.get("catacombs"), true);
+ //drawSideButton(2, dungeonsModeIcons.get("catacombs"), false);
+
+
+ }
+
+ private boolean onMasterMode = false;
+
+ //TODO: improve this shit
+ private void drawSideButtons(){
+ // GlStateManager.pushMatrix();
+ GlStateManager.enableDepth();
+ GlStateManager.translate(0, 0, 5);
+ if(onMasterMode){
+ drawSideButton(1, dungeonsModeIcons.get("master_catacombs"), true);
+ } else {
+ drawSideButton(0, dungeonsModeIcons.get("catacombs"), true);
+ }
+ GlStateManager.translate(0, 0, -3);
+
+ GlStateManager.translate(0, 0, -2);
+ if(!onMasterMode){
+ drawSideButton(1, dungeonsModeIcons.get("master_catacombs"), false);
+ } else {
+ drawSideButton(0, dungeonsModeIcons.get("catacombs"), false);
+ }
+ GlStateManager.disableDepth();
+ //GlStateManager.popMatrix();
+ }
+
+
+
+
+ private void drawSideButton(int yIndex, ItemStack itemStack, boolean pressed){
+ GlStateManager.disableLighting();
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.enableAlpha();
+ GlStateManager.alphaFunc(516, 0.1F);
+
+ int x = guiLeft-28;
+ int y = guiTop+yIndex*28;
+
+ float uMin = 193/256f;
+ float uMax = 223/256f;
+ float vMin = 200/256f;
+ float vMax = 228/256f;
+ if(pressed) {
+ uMin = 224/256f;
+ uMax = 1f;
+
+
+ if(yIndex != 0) {
+ vMin = 228/256f;
+ vMax = 1f;
+ }
+
+ renderBlurredBackground(width, height, x+2, y+2, 30, 28-4);
+ } else {
+ renderBlurredBackground(width, height, x+2, y+2, 28-2, 28-4);
+ }
+
+ GlStateManager.disableLighting();
+ GlStateManager.enableBlend();
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.enableAlpha();
+ GlStateManager.alphaFunc(516, 0.1F);
+
+ Minecraft.getMinecraft().getTextureManager().bindTexture(pv_elements);
+
+ Utils.drawTexturedRect(x, y, pressed?32:28, 28, uMin, uMax, vMin, vMax, GL11.GL_NEAREST);
+
+ GlStateManager.enableDepth();
+ Utils.drawItemStack(itemStack, x+8, y+7);
+
+
+
+
}
private void renderXpBar(String skillName, ItemStack stack, int x, int y, int xSize, ProfileViewer.Level levelObj, int mouseX, int mouseY) {
diff --git a/src/main/resources/assets/notenoughupdates/invbuttons/presets.json b/src/main/resources/assets/notenoughupdates/invbuttons/presets.json
index b6d56e90..4184e6d4 100644
--- a/src/main/resources/assets/notenoughupdates/invbuttons/presets.json
+++ b/src/main/resources/assets/notenoughupdates/invbuttons/presets.json
@@ -2529,7 +2529,7 @@
"anchorRight": false,
"anchorBottom": false,
"backgroundIndex": 0,
- "command": "joindungeon master_catacombs 1",
+ "command": "joindungeon master_catacombs 3",
"icon": "DIAMOND_PROFESSOR_HEAD"
},
{
@@ -2732,4 +2732,4 @@
"command": ""
}
]
-} \ No newline at end of file
+}
diff --git a/src/main/resources/assets/notenoughupdates/pv_elements.png b/src/main/resources/assets/notenoughupdates/pv_elements.png
index 68c4fd9f..7e9033bd 100644
--- a/src/main/resources/assets/notenoughupdates/pv_elements.png
+++ b/src/main/resources/assets/notenoughupdates/pv_elements.png
Binary files differ
diff --git a/src/main/resources/mixins.notenoughupdates.json b/src/main/resources/mixins.notenoughupdates.json
index f82f6311..bec344ec 100644
--- a/src/main/resources/mixins.notenoughupdates.json
+++ b/src/main/resources/mixins.notenoughupdates.json
@@ -22,7 +22,7 @@
"MixinItemStack",
"MixinLayerArmorBase",
"MixinLayerCustomHead",
- "MixinLoadingScreenRenderer",
+
"MixinMouseHelper",
"MixinNetHandlerPlayClient",
"MixinPlayerControllerMP",