aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/lorenz
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/lorenz')
-rw-r--r--src/main/java/at/lorenz/mod/HideNotClickableItems.kt2
-rw-r--r--src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt17
-rw-r--r--src/main/java/at/lorenz/mod/bazaar/BazaarOrderHelper.kt4
-rw-r--r--src/main/java/at/lorenz/mod/chat/ChatFilter.kt2
-rw-r--r--src/main/java/at/lorenz/mod/config/Features.java (renamed from src/main/java/at/lorenz/mod/Features.java)65
-rw-r--r--src/main/java/at/lorenz/mod/config/LorenzConfig.kt16
-rw-r--r--src/main/java/at/lorenz/mod/dungeon/DungeonHighlightClickedBlocks.kt8
7 files changed, 74 insertions, 40 deletions
diff --git a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
index cd871ba4f..cffd5932e 100644
--- a/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
+++ b/src/main/java/at/lorenz/mod/HideNotClickableItems.kt
@@ -135,7 +135,7 @@ class HideNotClickableItems {
private fun isDisabled(): Boolean {
if (bypassUntil > System.currentTimeMillis()) return true
- return !LorenzMod.feature.inventory.hideNotClickableItems
+ return !LorenzMod.feature.item.hideNotClickableItems
}
private fun hide(chestName: String, stack: ItemStack): Boolean {
diff --git a/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt b/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
index 2a0ab1a92..86d4a8e45 100644
--- a/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
@@ -1,6 +1,5 @@
package at.lorenz.mod
-import at.lorenz.mod.config.LorenzConfig
import at.lorenz.mod.events.GuiRenderItemEvent
import at.lorenz.mod.utils.ItemUtils
import at.lorenz.mod.utils.ItemUtils.cleanName
@@ -8,6 +7,7 @@ import at.lorenz.mod.utils.LorenzUtils
import at.lorenz.mod.utils.LorenzUtils.between
import at.lorenz.mod.utils.LorenzUtils.matchRegex
import at.lorenz.mod.utils.NumberUtil.romanToDecimal
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -43,7 +43,7 @@ class ItemDisplayOverlayFeatures {
private fun getStackTip(item: ItemStack): String {
val name = item.cleanName()
- if (LorenzConfig.lorenzItemDisplayMasterStarSkullNumber) {
+ if (LorenzMod.feature.item.displayMasterStarNumber) {
when (name) {
"First Master Star" -> return "1"
"Second Master Star" -> return "2"
@@ -51,14 +51,15 @@ class ItemDisplayOverlayFeatures {
"Fourth Master Star" -> return "4"
"Fifth Master Star" -> return "5"
}
+ }
+ if (LorenzMod.feature.item.displayMasterSkullNumber) {
if (name.matchRegex("(.*)Master Skull - Tier .")) {
return name.substring(name.length - 1)
}
-
}
- if (LorenzConfig.lorenzItemDisplayDungeonHeadNumber) {
+ if (LorenzMod.feature.item.displayDungeonHeadFloor) {
if (name.contains("Golden ") || name.contains("Diamond ")) {
when {
name.contains("Bonzo") -> return "1"
@@ -72,13 +73,13 @@ class ItemDisplayOverlayFeatures {
}
}
- if (LorenzConfig.lorenzItemDisplayNewYearCakeNumber) {
+ if (LorenzMod.feature.item.displayNewYearCakeNumber) {
if (name.startsWith("New Year Cake")) {
return "§b" + name.split("(Year ", ")")[1]
}
}
- if (LorenzConfig.lorenzItemDisplayPetLevel) {
+ if (LorenzMod.feature.item.displayPetLevel) {
if (ItemUtils.isPet(name)) {
try {
val level = name.between("Lvl ", "] ").toInt()
@@ -93,7 +94,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (LorenzConfig.lorenzItemSackNameDisplay) {
+ if (LorenzMod.feature.item.displaySackName) {
if (ItemUtils.isSack(name)) {
val split = name.split(" ")
val sackName = split[split.size - 2]
@@ -101,7 +102,7 @@ class ItemDisplayOverlayFeatures {
}
}
- if (LorenzConfig.lorenzItemDisplayMinionTier) {
+ if (LorenzMod.feature.item.displayMinionTier) {
if (name.contains(" Minion ")) {
val array = name.split(" ")
val last = array[array.size - 1]
diff --git a/src/main/java/at/lorenz/mod/bazaar/BazaarOrderHelper.kt b/src/main/java/at/lorenz/mod/bazaar/BazaarOrderHelper.kt
index a393e8b31..c78c44fa7 100644
--- a/src/main/java/at/lorenz/mod/bazaar/BazaarOrderHelper.kt
+++ b/src/main/java/at/lorenz/mod/bazaar/BazaarOrderHelper.kt
@@ -1,10 +1,10 @@
package at.lorenz.mod.bazaar
-import at.lorenz.mod.config.LorenzConfig
import at.lorenz.mod.events.GuiContainerEvent
import at.lorenz.mod.utils.ItemUtils.getLore
import at.lorenz.mod.utils.LorenzColor
import at.lorenz.mod.utils.RenderUtils.highlight
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraft.client.gui.inventory.GuiChest
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.inventory.ContainerChest
@@ -23,7 +23,7 @@ class BazaarOrderHelper {
@SubscribeEvent
fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) {
- if (!LorenzConfig.lorenzBazaarOrderHelper) return
+ if (!LorenzMod.feature.bazaar.orderHelper) return
if (event.gui !is GuiChest) return
val guiChest = event.gui
val chest = guiChest.inventorySlots as ContainerChest
diff --git a/src/main/java/at/lorenz/mod/chat/ChatFilter.kt b/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
index 5239bd088..29700a099 100644
--- a/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
+++ b/src/main/java/at/lorenz/mod/chat/ChatFilter.kt
@@ -10,7 +10,7 @@ class ChatFilter {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!LorenzMod.feature.chat.filter) return
+ if (!LorenzMod.feature.chat.mainFilter) return
val blockReason = block(event.message)
if (blockReason != "") {
diff --git a/src/main/java/at/lorenz/mod/Features.java b/src/main/java/at/lorenz/mod/config/Features.java
index f41359f87..ff4f3ae1d 100644
--- a/src/main/java/at/lorenz/mod/Features.java
+++ b/src/main/java/at/lorenz/mod/config/Features.java
@@ -1,4 +1,4 @@
-package at.lorenz.mod;
+package at.lorenz.mod.config;
import com.google.gson.annotations.Expose;
import com.thatgravyboat.skyblockhud.LorenzMod;
@@ -77,30 +77,79 @@ public class Features extends Config {
public Dungeon dungeon = new Dungeon();
@Expose
- @Category(name = "Inventory", desc = "Changing the behavior around the inventory.")
- public Inventory inventory = new Inventory();
+ @Category(name = "Item", desc = "Changing the behavior around items and the inventory.")
+ public Inventory item = new Inventory();
- public static class Chat {
+ @Expose
+ @Category(name = "Bazaar", desc = "Bazaar settings.")
+ public Bazaar bazaar = new Bazaar();
+ public static class Chat {
@Expose
@ConfigOption(name = "Main Chat Filter", desc = "Hides all the annoying chat messages.")
@ConfigEditorBoolean
- public boolean filter = false;
+ public boolean mainFilter = true;
}
public static class Dungeon {
-
@Expose
@ConfigOption(name = "Hide Dungeon Messages", desc = "Hides annoyung dungeon messages.")
@ConfigEditorBoolean
public boolean hideAnnoyingMessages = false;
+
+ @Expose
+ @ConfigOption(name = "Highlight Clicked Blocks", desc = "Highlight blocks in dungeon when clicked: Lever, Chest, Wither Essence")
+ @ConfigEditorBoolean
+ public boolean highlightClickedBlocks = false;
}
public static class Inventory {
-
@Expose
- @ConfigOption(name = "Hide Not Clickable Items", desc = "Hide items that are not clickable in " + "the current inventory: ah, bz, accessory bag, etc")
+ @ConfigOption(name = "Not Clickable Items", desc = "Hide items that are not clickable in " +
+ "the current inventory: ah, bz, accessory bag, etc")
@ConfigEditorBoolean
public boolean hideNotClickableItems = false;
+
+ @Expose
+ @ConfigOption(name = "Master Star Number", desc = "Shows the Tier of the Master Star.")
+ @ConfigEditorBoolean
+ public boolean displayMasterStarNumber = false;
+
+ @Expose
+ @ConfigOption(name = "Master Skull Number", desc = "Shows the tier of the Master Skull accessory.")
+ @ConfigEditorBoolean
+ public boolean displayMasterSkullNumber = false;
+
+ @Expose
+ @ConfigOption(name = "Dungeon Head Floor", desc = "Shows the correct floor for golden and diamond heads.")
+ @ConfigEditorBoolean
+ public boolean displayDungeonHeadFloor = false;
+
+ @Expose
+ @ConfigOption(name = "New Year Cake Number", desc = "Shows the Number of the Year of New Year Cakes.")
+ @ConfigEditorBoolean
+ public boolean displayNewYearCakeNumber = false;
+
+ @Expose
+ @ConfigOption(name = "Pet Level", desc = "Shows the level of the pet when not maxed.")
+ @ConfigEditorBoolean
+ public boolean displayPetLevel = false;
+
+ @Expose
+ @ConfigOption(name = "Sack Name", desc = "Shows an abbreviation of the Sack name.")
+ @ConfigEditorBoolean
+ public boolean displaySackName = false;
+
+ @Expose
+ @ConfigOption(name = "Minion Tier", desc = "Shows the Minion Tier over Items.")
+ @ConfigEditorBoolean
+ public boolean displayMinionTier = false;
+ }
+
+ public static class Bazaar {
+ @Expose
+ @ConfigOption(name = "Order Helper", desc = "Show visual hints when items are ready to pickup or outbid.")
+ @ConfigEditorBoolean
+ public boolean orderHelper = false;
}
}
diff --git a/src/main/java/at/lorenz/mod/config/LorenzConfig.kt b/src/main/java/at/lorenz/mod/config/LorenzConfig.kt
deleted file mode 100644
index 5106075d6..000000000
--- a/src/main/java/at/lorenz/mod/config/LorenzConfig.kt
+++ /dev/null
@@ -1,16 +0,0 @@
-package at.lorenz.mod.config
-
-class LorenzConfig {
-
- companion object {
- val lorenzBazaarOrderHelper = true
- val lorenzDungeonHighlightClickedBlocks = true
-
- val lorenzItemDisplayMasterStarSkullNumber = true
- val lorenzItemDisplayDungeonHeadNumber = true
- val lorenzItemDisplayNewYearCakeNumber = true
- val lorenzItemDisplayPetLevel = true
- val lorenzItemSackNameDisplay = true
- val lorenzItemDisplayMinionTier = true
- }
-} \ No newline at end of file
diff --git a/src/main/java/at/lorenz/mod/dungeon/DungeonHighlightClickedBlocks.kt b/src/main/java/at/lorenz/mod/dungeon/DungeonHighlightClickedBlocks.kt
index ce885df48..80534c25e 100644
--- a/src/main/java/at/lorenz/mod/dungeon/DungeonHighlightClickedBlocks.kt
+++ b/src/main/java/at/lorenz/mod/dungeon/DungeonHighlightClickedBlocks.kt
@@ -1,12 +1,12 @@
package at.lorenz.mod.dungeon
-import at.lorenz.mod.config.LorenzConfig
import at.lorenz.mod.events.LorenzChatEvent
import at.lorenz.mod.events.PacketEvent
import at.lorenz.mod.utils.*
import at.lorenz.mod.utils.BlockUtils.getBlockAt
import at.lorenz.mod.utils.RenderUtils.drawSkytilsColor
import at.lorenz.mod.utils.RenderUtils.drawString
+import com.thatgravyboat.skyblockhud.LorenzMod
import net.minecraft.init.Blocks
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement
import net.minecraftforge.client.event.RenderWorldLastEvent
@@ -27,7 +27,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!LorenzConfig.lorenzDungeonHighlightClickedBlocks) return
+ if (!LorenzMod.feature.dungeon.highlightClickedBlocks) return
//TODO add
// if (!LorenzUtils.inDungeon) return
@@ -38,7 +38,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onSendPacket(event: PacketEvent.SendEvent) {
- if (!LorenzConfig.lorenzDungeonHighlightClickedBlocks) return
+ if (!LorenzMod.feature.dungeon.highlightClickedBlocks) return
//TODO add
// if (!LorenzUtils.inDungeon) return
// TODO add
@@ -75,7 +75,7 @@ class DungeonHighlightClickedBlocks {
@SubscribeEvent
fun onWorldRender(event: RenderWorldLastEvent) {
- if (!LorenzConfig.lorenzDungeonHighlightClickedBlocks) return
+ if (!LorenzMod.feature.dungeon.highlightClickedBlocks) return
//TODO add
// if (!LorenzUtils.inDungeon) return