aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-07-16 20:57:12 +1000
committerGitHub <noreply@github.com>2022-07-16 12:57:12 +0200
commite91d0907148e08352f3679324dc3e6460de1be38 (patch)
tree425ba2fa651fbdfed0d4956e9e7fa9a36ad9819a /src/main/java/io
parent28cc91aee8ec804d3b8b707d1b63a8a6ac9a603a (diff)
downloadNotEnoughUpdates-e91d0907148e08352f3679324dc3e6460de1be38.tar.gz
NotEnoughUpdates-e91d0907148e08352f3679324dc3e6460de1be38.tar.bz2
NotEnoughUpdates-e91d0907148e08352f3679324dc3e6460de1be38.zip
fixed magic power (#187)
* fixed magic power * I feel like this is an important change * fix location * added support for trade money signs
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java11
5 files changed, 26 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index a3755984..c048ce1b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -112,6 +112,9 @@ import java.util.concurrent.atomic.AtomicReference;
public class NEUOverlay extends Gui {
private static final ResourceLocation SUPERGEHEIMNISVERMOGEN = new ResourceLocation(
"notenoughupdates:supersecretassets/bald.png");
+
+ private static final ResourceLocation ATMOULBERRYWHYISMYLUNARCLIENTBUGGING = new ResourceLocation(
+ "notenoughupdates:supersecretassets/lunar.png");
private static final ResourceLocation SEARCH_BAR = new ResourceLocation("notenoughupdates:search_bar.png");
private static final ResourceLocation SEARCH_BAR_GOLD = new ResourceLocation("notenoughupdates:search_bar_gold.png");
@@ -1941,6 +1944,14 @@ public class NEUOverlay extends Gui {
GlStateManager.bindTexture(0);
}
+ if (textField.getText().toLowerCase().contains("lunar")) {
+ Minecraft.getMinecraft().getTextureManager().bindTexture(ATMOULBERRYWHYISMYLUNARCLIENTBUGGING);
+ GlStateManager.color(1, 1, 1, 1);
+ GlStateManager.translate(0,0,100);
+ Utils.drawTexturedRect((width + 410) / 2f, (height + 450) / 2f - 114, 113, 64, GL11.GL_LINEAR);
+ GlStateManager.bindTexture(0);
+ }
+
SunTzu.setEnabled(textField.getText().toLowerCase().startsWith("potato"));
updateGuiGroupSize();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
index 05e2087d..e6472d04 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/misc/CalculatorCommand.java
@@ -46,7 +46,7 @@ public class CalculatorCommand extends ClientCommandBase {
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
if ((args.length == 1 && Objects.equals(args[0], "help")) || args.length == 0) {
sender.addChatMessage(new ChatComponentText(
- "\n§e[NEU] §5Its a calculator.\n" +
+ "\n§e[NEU] §5It's a calculator.\n" +
"§eFor Example §b/neucalc 3m*7k§e.\n" +
"§eYou can also use suffixes (k, m, b, t, s)§e.\n" +
"§eThe \"s\" suffix acts as 64.\n" +
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java
index bee0a36f..51e1d15a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/SignCalculator.java
@@ -52,7 +52,7 @@ public class SignCalculator {
if (!isEnabled()) return;
GuiEditSign guiEditSign = (GuiEditSign) event.gui;
TileEntitySign tileSign = ((AccessorGuiEditSign) guiEditSign).getTileSign();
- if (!tileSign.signText[1].getUnformattedText().equals("^^^^^^^^^^^^^^^")) return;
+ if (!tileSign.signText[1].getUnformattedText().equals("^^^^^^^^^^^^^^^") && !tileSign.signText[1].getUnformattedText().equals("^^^^^^")) return;
refresh(tileSign.signText[0].getUnformattedText());
Utils.drawStringCentered(
getRenderedString(),
@@ -67,7 +67,7 @@ public class SignCalculator {
@SubscribeEvent
public void onSignSubmitted(SignSubmitEvent event) {
if (!isEnabled()) return;
- if (Objects.equals(event.lines[1], "^^^^^^^^^^^^^^^")) {
+ if (Objects.equals(event.lines[1], "^^^^^^^^^^^^^^^") || Objects.equals(event.lines[1], "^^^^^^")) {
refresh(event.lines[0]);
if (lastResult != null) {
event.lines[0] = lastResult.toPlainString();
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 87bab220..e3a2091f 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -2658,7 +2658,7 @@ public class GuiProfileViewer extends GuiScreen {
int magicalPower = PlayerStats.getMagicalPower(inventoryInfo);
tooltipToDisplay.add(magicalPower == -1
? magicalPowerString.append(EnumChatFormatting.RED).append("Error while calculating!").toString()
- : magicalPowerString.append(EnumChatFormatting.GOLD).append(Utils.formatNumberWithDots(magicalPower)).toString());
+ : magicalPowerString.append(EnumChatFormatting.GOLD).append(numberFormat.format(magicalPower)).toString());
StringBuilder selectedPowerString = new StringBuilder(EnumChatFormatting.DARK_GRAY + "Selected Power: ");
String selectedPower = PlayerStats.getSelectedMagicalPower(profile.getProfileInformation(profileId));
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java
index 19668019..4ee1f208 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java
@@ -742,6 +742,7 @@ public class PlayerStats {
}
NBTTagList loreTagList = tag.getCompoundTag("display").getTagList("Lore", 8);
+ String id = tag.getCompoundTag("ExtraAttributes").getString("id");
String lastElement = loreTagList.getStringTagAt(loreTagList.tagCount() - 1);
//strip information that suggests the rarity has been upgraded (obfuscated char)
@@ -751,6 +752,16 @@ public class PlayerStats {
JsonArray lastElementJsonArray = new JsonArray();
lastElementJsonArray.add(new JsonPrimitive(lastElement));
+ if (id.equals("HEGEMONY_ARTIFACT")) {
+ switch (Utils.getRarityFromLore(lastElementJsonArray)) {
+ case 4:
+ powderAmount += 16;
+ break;
+ case 5:
+ powderAmount += 22;
+ break;
+ }
+ }
switch (Utils.getRarityFromLore(lastElementJsonArray)) {
case 0:
case 6: