aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/config
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2021-07-06 20:24:21 +0200
committerCow <cow@volloeko.de>2021-07-06 20:24:21 +0200
commit65e5ee4b431cc7513e53d61827249148b06de79a (patch)
treec55e9c7ebd0c7e37a7a81de0df10b79f67e39930 /src/main/java/de/cowtipper/cowlection/config
parentc0c7011643a6ffa7c549ad4eff662309644b244c (diff)
downloadCowlection-65e5ee4b431cc7513e53d61827249148b06de79a.tar.gz
Cowlection-65e5ee4b431cc7513e53d61827249148b06de79a.tar.bz2
Cowlection-65e5ee4b431cc7513e53d61827249148b06de79a.zip
Added 'lowest BINs' support to Chest Tracker & Analyzer
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/config')
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/MooConfig.java24
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java7
-rw-r--r--src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java4
3 files changed, 24 insertions, 11 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
index d6e93cd..ba1c2dc 100644
--- a/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
+++ b/src/main/java/de/cowtipper/cowlection/config/MooConfig.java
@@ -74,8 +74,10 @@ public class MooConfig {
public static int notifyFreshServer;
public static int notifyOldServer;
public static boolean notifyServerAge;
- public static boolean chestAnalyzerShowNonBazaarItems;
+ public static boolean chestAnalyzerShowBazaarItems;
private static String chestAnalyzerUseBazaarPrices;
+ public static boolean chestAnalyzerShowLowestBinItems;
+ public static boolean chestAnalyzerShowNoPriceItems;
public static boolean chestAnalyzerShowCommandUsage;
public static int tooltipToggleKeyBinding;
private static String tooltipItemAge;
@@ -393,17 +395,21 @@ public class MooConfig {
Property propNotifyServerAge = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"notifyServerAge", true, "Show server age notifications?"));
- // Sub-Category: Chest Analyzer (Bazaar prices)
- subCat = configCat.addSubCategory("Chest Tracker & Analyzer (Bazaar prices)");
+ // Sub-Category: Chest Analyzer (Bazaar & lowest BIN prices)
+ subCat = configCat.addSubCategory("Chest Tracker & Analyzer (Bazaar & lowest BIN prices)");
String analyzeCommand = "/moo analyzeChests";
subCat.addExplanations("Use " + EnumChatFormatting.YELLOW + analyzeCommand + EnumChatFormatting.RESET + " to start tracking chests on your island! " + EnumChatFormatting.GREEN + "Then you can...",
EnumChatFormatting.GREEN + " ❶ " + EnumChatFormatting.RESET + "add chests by opening them; deselect chests by Sneaking + Right Click.",
EnumChatFormatting.GREEN + " ❷ " + EnumChatFormatting.RESET + "use " + EnumChatFormatting.YELLOW + analyzeCommand + EnumChatFormatting.RESET + " again to run the chest analysis.",
EnumChatFormatting.GREEN + " ❸ " + EnumChatFormatting.RESET + "use " + EnumChatFormatting.YELLOW + analyzeCommand + " stop" + EnumChatFormatting.RESET + " to stop the chest tracker and clear current results.");
- Property propChestAnalyzerShowNonBazaarItems = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
- "chestAnalyzerShowNonBazaarItems", false, "Show non-Bazaar items in Chest Tracker?"));
+ Property propChestAnalyzerShowBazaarItems = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
+ "chestAnalyzerShowBazaarItems", true, "Show Bazaar items in Chest Tracker?"));
Property propChestAnalyzerUseBazaarPrices = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"chestAnalyzerUseBazaarPrices", "Instant-Sell", "Use Bazaar prices?", new String[]{"Instant-Sell", "Sell Offer"}));
+ Property propChestAnalyzerShowLowestBinItems = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
+ "chestAnalyzerShowLowestBinItems", true, "Show lowest BIN items in Chest Tracker?"));
+ Property propChestAnalyzerShowNoPriceItems = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
+ "chestAnalyzerShowNoPriceItems", false, "Show items without price in Chest Tracker?"));
Property propChestAnalyzerShowCommandUsage = subCat.addConfigEntry(cfg.get(configCat.getConfigName(),
"chestAnalyzerShowCommandUsage", true, "Show command usage?"));
@@ -684,8 +690,10 @@ public class MooConfig {
notifyFreshServer = propNotifyFreshServer.getInt();
notifyOldServer = propNotifyOldServer.getInt();
notifyServerAge = propNotifyServerAge.getBoolean();
- chestAnalyzerShowNonBazaarItems = propChestAnalyzerShowNonBazaarItems.getBoolean();
+ chestAnalyzerShowBazaarItems = propChestAnalyzerShowBazaarItems.getBoolean();
chestAnalyzerUseBazaarPrices = propChestAnalyzerUseBazaarPrices.getString();
+ chestAnalyzerShowLowestBinItems = propChestAnalyzerShowLowestBinItems.getBoolean();
+ chestAnalyzerShowNoPriceItems = propChestAnalyzerShowNoPriceItems.getBoolean();
chestAnalyzerShowCommandUsage = propChestAnalyzerShowCommandUsage.getBoolean();
tooltipToggleKeyBinding = propTooltipToggleKeyBinding.getInt();
tooltipItemAge = propTooltipItemAge.getString();
@@ -774,8 +782,10 @@ public class MooConfig {
propNotifyFreshServer.set(notifyFreshServer);
propNotifyOldServer.set(notifyOldServer);
propNotifyServerAge.set(notifyServerAge);
- propChestAnalyzerShowNonBazaarItems.set(chestAnalyzerShowNonBazaarItems);
+ propChestAnalyzerShowBazaarItems.set(chestAnalyzerShowBazaarItems);
propChestAnalyzerUseBazaarPrices.set(chestAnalyzerUseBazaarPrices);
+ propChestAnalyzerShowLowestBinItems.set(chestAnalyzerShowLowestBinItems);
+ propChestAnalyzerShowNoPriceItems.set(chestAnalyzerShowNoPriceItems);
propChestAnalyzerShowCommandUsage.set(chestAnalyzerShowCommandUsage);
propTooltipToggleKeyBinding.set(tooltipToggleKeyBinding);
propTooltipItemAge.set(tooltipItemAge);
diff --git a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java
index a3b28e6..731e9f9 100644
--- a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java
+++ b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigCategoryScrolling.java
@@ -27,6 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
import java.util.*;
@@ -333,9 +334,9 @@ public class MooConfigCategoryScrolling extends GuiListExtended {
this.overlayBackground(0, this.top, 255, 255);
this.overlayBackground(this.bottom, this.height, 255, 255);
GlStateManager.enableBlend();
- GlStateManager.tryBlendFuncSeparate(770, 771, 0, 1);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 0, 1);
GlStateManager.disableAlpha();
- GlStateManager.shadeModel(7425);
+ GlStateManager.shadeModel(GL11.GL_SMOOTH);
GlStateManager.disableTexture2D();
int maxScroll = this.func_148135_f();
@@ -374,7 +375,7 @@ public class MooConfigCategoryScrolling extends GuiListExtended {
this.func_148142_b(mouseX, mouseY); // GuiSlot#renderDecorations
GlStateManager.enableTexture2D();
- GlStateManager.shadeModel(7424);
+ GlStateManager.shadeModel(GL11.GL_FLAT);
GlStateManager.enableAlpha();
GlStateManager.disableBlend();
diff --git a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java
index 675c392..5afb052 100644
--- a/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java
+++ b/src/main/java/de/cowtipper/cowlection/config/gui/MooConfigPreview.java
@@ -18,6 +18,7 @@ import net.minecraft.util.IChatComponent;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.config.GuiUtils;
import org.apache.commons.lang3.text.WordUtils;
+import org.lwjgl.opengl.GL11;
import java.util.HashMap;
import java.util.Map;
@@ -118,7 +119,8 @@ public class MooConfigPreview {
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();
- GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
+
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
RenderHelper.enableGUIStandardItemLighting();
int xItem = xFakeHotbar + 1;