diff options
| author | Lulonaut <lulonaut@tutanota.de> | 2022-11-25 21:55:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 21:55:29 +0100 |
| commit | 72904df8c50260e76a784457a5e78a20e4a80b65 (patch) | |
| tree | d01c4e858ca7116815df53cf6dee99a0f81974fc /src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java | |
| parent | c2ec12edd5d8e32665edd620ffa2267c5a0a56aa (diff) | |
| download | notenoughupdates-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.java | 4 |
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; } |
