aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
diff options
context:
space:
mode:
authorLulonaut <lulonaut@tutanota.de>2022-11-25 21:55:29 +0100
committerGitHub <noreply@github.com>2022-11-25 21:55:29 +0100
commit72904df8c50260e76a784457a5e78a20e4a80b65 (patch)
treed01c4e858ca7116815df53cf6dee99a0f81974fc /src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
parentc2ec12edd5d8e32665edd620ffa2267c5a0a56aa (diff)
downloadnotenoughupdates-72904df8c50260e76a784457a5e78a20e4a80b65.tar.gz
notenoughupdates-72904df8c50260e76a784457a5e78a20e4a80b65.tar.bz2
notenoughupdates-72904df8c50260e76a784457a5e78a20e4a80b65.zip
show price of essence when pressing shift in essence upgrades gui (#440)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index 6811067f..754e2dc3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -52,6 +52,7 @@ public class ItemPriceInformation {
private static HashSet<String> auctionableItems;
private static Gson gson;
private static final NumberFormat format = new DecimalFormat("#,##0.#", new DecimalFormatSymbols(Locale.US));
+ public static String STACKSIZE_OVERRIDE = "NEU_STACKSIZE_OVERRIDE";
public static boolean addToTooltip(List<String> tooltip, String internalname, ItemStack stack) {
return addToTooltip(tooltip, internalname, stack, true);
@@ -131,6 +132,9 @@ public class ItemPriceInformation {
int stackMultiplier = 1;
int shiftStackMultiplier = useStackSize && stack.stackSize > 1 ? stack.stackSize : 64;
+ if (stack.getTagCompound() != null && stack.getTagCompound().hasKey(STACKSIZE_OVERRIDE)) {
+ shiftStackMultiplier = stack.getTagCompound().getInteger(STACKSIZE_OVERRIDE);
+ }
if (shiftPressed) {
stackMultiplier = shiftStackMultiplier;
}