diff options
| author | BuildTools <james.jenour@protonmail.com> | 2021-03-27 07:40:53 +0800 |
|---|---|---|
| committer | BuildTools <james.jenour@protonmail.com> | 2021-03-27 07:40:53 +0800 |
| commit | 03b9a8dbcc1ebd5f8c39e4733a741a4092ab0a1d (patch) | |
| tree | b8ddc6757fc06f4a325121e7d972c0ddf152b401 /src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java | |
| parent | 06c3c7fcfd8f65e2a30f81626457f4180ea52a36 (diff) | |
| download | notenoughupdates-03b9a8dbcc1ebd5f8c39e4733a741a4092ab0a1d.tar.gz notenoughupdates-03b9a8dbcc1ebd5f8c39e4733a741a4092ab0a1d.tar.bz2 notenoughupdates-03b9a8dbcc1ebd5f8c39e4733a741a4092ab0a1d.zip | |
PRE26
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java index 58efa371..ff618f10 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java @@ -3,6 +3,7 @@ package io.github.moulberry.notenoughupdates; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.auction.APIManager; import io.github.moulberry.notenoughupdates.util.Constants; +import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; @@ -15,6 +16,10 @@ import java.util.Locale; public class ItemPriceInformation { public static boolean addToTooltip(List<String> tooltip, String internalname, ItemStack stack) { + return addToTooltip(tooltip, internalname, stack, true); + } + + public static boolean addToTooltip(List<String> tooltip, String internalname, ItemStack stack, boolean useStackSize) { JsonObject auctionInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAuctionInfo(internalname); JsonObject bazaarInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalname); float lowestBinAvg = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAvgBin(internalname); @@ -35,7 +40,7 @@ public class ItemPriceInformation { boolean shiftPressed = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); int stackMultiplier = 1; - int shiftStackMultiplier = 64; + int shiftStackMultiplier = useStackSize && stack.stackSize > 1 ? stack.stackSize : 64; if(shiftPressed) { stackMultiplier = shiftStackMultiplier; } |
