aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/features
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-01-28 15:30:58 -0600
committeringlettronald <inglettronald@gmail.com>2023-01-28 15:30:58 -0600
commit7b6fef2966838dffcdecb5870204d363811f4b4f (patch)
treede6f37e760c313a6187a2a06361ce36d5a08052d /src/main/kotlin/dulkirmod/features
parentd13f43266a82c81962af8471f471a7824a0bcf7b (diff)
downloadDulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.tar.gz
DulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.tar.bz2
DulkirMod-7b6fef2966838dffcdecb5870204d363811f4b4f.zip
More tooltip rendering logic and adding vanquisher trigger
Diffstat (limited to 'src/main/kotlin/dulkirmod/features')
-rw-r--r--src/main/kotlin/dulkirmod/features/DungeonLeap.kt2
-rw-r--r--src/main/kotlin/dulkirmod/features/ScalableTooltips.kt2
-rw-r--r--src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt13
3 files changed, 16 insertions, 1 deletions
diff --git a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
index 901c839..d1be829 100644
--- a/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
+++ b/src/main/kotlin/dulkirmod/features/DungeonLeap.kt
@@ -19,7 +19,7 @@ class DungeonLeap {
val lastInLeap = inLeapMenuBool
if (!Config.highlightLeap) return
- if (mc.currentScreen == null || !(mc.currentScreen is GuiChest)) {
+ if (mc.currentScreen == null || mc.currentScreen !is GuiChest) {
inLeapMenuBool = false
return
}
diff --git a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
index a3ce2f1..e471849 100644
--- a/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
+++ b/src/main/kotlin/dulkirmod/features/ScalableTooltips.kt
@@ -5,6 +5,7 @@ import net.minecraft.client.Minecraft
import net.minecraft.client.gui.FontRenderer
import net.minecraft.client.renderer.GlStateManager
import net.minecraft.client.renderer.RenderHelper
+import net.minecraft.item.ItemStack
import net.minecraftforge.fml.client.config.GuiUtils
import org.lwjgl.input.Keyboard
import org.lwjgl.input.Mouse
@@ -15,6 +16,7 @@ object ScalableTooltips {
// Checks to see if large tooltips should be snapped (for larger than can fit on screen code)
var snapFlag: Boolean = true
var scaleScale: Float = 0f
+ var previousStack: ItemStack? = null
fun drawScaledHoveringText(
textLines: List<String>,
diff --git a/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
new file mode 100644
index 0000000..c7d4349
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/features/chat/VanquisherTrigger.kt
@@ -0,0 +1,13 @@
+package dulkirmod.features.chat
+
+import dulkirmod.DulkirMod
+import dulkirmod.config.Config
+
+object VanquisherTrigger {
+ fun handle(message: String) {
+ if (!Config.vanqBroadcast) return
+ if (message == "A Vanquisher is spawning nearby!") {
+ DulkirMod.mc.thePlayer.sendChatMessage("/patcher sendcoords")
+ }
+ }
+} \ No newline at end of file