aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
diff options
context:
space:
mode:
authorMoulberry <jjenour@student.unimelb.edu.au>2021-09-02 14:09:31 +0930
committerGitHub <noreply@github.com>2021-09-02 14:09:31 +0930
commit81eea6bf1f653fa194735d892b40614389975dd3 (patch)
treea955e0d03401302332c743f6c396184e45c94c80 /src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
parent05428d1ccb15f58ccbdb4b14eb9e10b61b0477cc (diff)
parent05d6207281e18980b8a28046621c741fa81c1606 (diff)
downloadnotenoughupdates-81eea6bf1f653fa194735d892b40614389975dd3.tar.gz
notenoughupdates-81eea6bf1f653fa194735d892b40614389975dd3.tar.bz2
notenoughupdates-81eea6bf1f653fa194735d892b40614389975dd3.zip
Merge pull request #226 from DoKM/master
Pre31 update
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java9
1 files changed, 9 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 ff618f10..83c4b7ae 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -2,6 +2,7 @@ package io.github.moulberry.notenoughupdates;
import com.google.gson.JsonObject;
import io.github.moulberry.notenoughupdates.auction.APIManager;
+import io.github.moulberry.notenoughupdates.core.config.KeybindHelper;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.item.ItemStack;
@@ -20,6 +21,12 @@ public class ItemPriceInformation {
}
public static boolean addToTooltip(List<String> tooltip, String internalname, ItemStack stack, boolean useStackSize) {
+ if(stack.getTagCompound().hasKey("disableNeuTooltip") && stack.getTagCompound().getBoolean("disableNeuTooltip")){
+ return false;
+ }
+ if(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKey && !KeybindHelper.isKeyDown(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKeyKeybind)){
+ return false;
+ }
JsonObject auctionInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAuctionInfo(internalname);
JsonObject bazaarInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalname);
float lowestBinAvg = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAvgBin(internalname);
@@ -98,6 +105,7 @@ public class ItemPriceInformation {
break;
case 4:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;
@@ -165,6 +173,7 @@ public class ItemPriceInformation {
break;
case 3:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;