aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com')
-rw-r--r--src/main/kotlin/com/ambientaddons/AmbientAddons.kt4
-rw-r--r--src/main/kotlin/com/ambientaddons/config/Config.kt7
-rw-r--r--src/main/kotlin/com/ambientaddons/features/dungeon/IgnoreCarpet.kt9
3 files changed, 20 insertions, 0 deletions
diff --git a/src/main/kotlin/com/ambientaddons/AmbientAddons.kt b/src/main/kotlin/com/ambientaddons/AmbientAddons.kt
index 08cd271..b24aa5c 100644
--- a/src/main/kotlin/com/ambientaddons/AmbientAddons.kt
+++ b/src/main/kotlin/com/ambientaddons/AmbientAddons.kt
@@ -56,6 +56,10 @@ class AmbientAddons {
}
companion object {
+ fun isInitialized(): Boolean {
+ return ::config.isInitialized
+ }
+
val mc: Minecraft = Minecraft.getMinecraft()
var currentGui: GuiScreen? = null
diff --git a/src/main/kotlin/com/ambientaddons/config/Config.kt b/src/main/kotlin/com/ambientaddons/config/Config.kt
index 19a11a6..d62ff8f 100644
--- a/src/main/kotlin/com/ambientaddons/config/Config.kt
+++ b/src/main/kotlin/com/ambientaddons/config/Config.kt
@@ -14,6 +14,8 @@ object Config : Vigilant(
var cancelInteractions = false
var closeSecretChests = false
+ var ignoreCarpet = false
+
init {
category("Pre/Post Dungeon") {
@@ -44,6 +46,11 @@ object Config : Vigilant(
name = "Block opening secret chests",
description = "Cancels opening chests containing secrets."
)
+ switch(
+ ::ignoreCarpet,
+ name = "Ignore carpet hitboxes",
+ description = "Removes all carpet hitboxes"
+ )
}
}
}
diff --git a/src/main/kotlin/com/ambientaddons/features/dungeon/IgnoreCarpet.kt b/src/main/kotlin/com/ambientaddons/features/dungeon/IgnoreCarpet.kt
new file mode 100644
index 0000000..6283b9c
--- /dev/null
+++ b/src/main/kotlin/com/ambientaddons/features/dungeon/IgnoreCarpet.kt
@@ -0,0 +1,9 @@
+package com.ambientaddons.features.dungeon
+
+import AmbientAddons.Companion.config
+
+object IgnoreCarpet {
+ fun shouldIgnoreCarpet(): Boolean = if (AmbientAddons.isInitialized()) {
+ config.ignoreCarpet
+ } else false
+} \ No newline at end of file