aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Diana.java25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt29
3 files changed, 27 insertions, 28 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6605b92b6..5d7fd7571 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@
### Changes
+ Reworked reputation helper design in the crimson isle.
++ Moved the key setting for diana `warp to nearest burrow waypoint` from vanilla mc (esc -> config -> controls -> scroll all the way down to skyhanni category) to simply `/sh diana`
### Fixed
+ Barbarian Duke Damage Indicator now only starts displaying after the player is getting close to him. (30 blocks)
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java b/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
index f783358c1..984cc4165 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Diana.java
@@ -1,40 +1,43 @@
package at.hannibal2.skyhanni.config.features;
-import at.hannibal2.skyhanni.config.core.config.annotations.ConfigAccordionId;
-import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorAccordion;
import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorBoolean;
+import at.hannibal2.skyhanni.config.core.config.annotations.ConfigEditorKeybind;
import at.hannibal2.skyhanni.config.core.config.annotations.ConfigOption;
import com.google.gson.annotations.Expose;
+import org.lwjgl.input.Keyboard;
public class Diana {
@Expose
- @ConfigOption(name = "Griffin Burrows", desc = "")
- @ConfigEditorAccordion(id = 0)
- public boolean griffinBurrows = false;
-
- @Expose
@ConfigOption(name = "Soopy Guess", desc = "Uses §eSoopy's Guess Logic §7to find the next burrow. Does not require SoopyV2 or chat triggers to be installed.")
@ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
public boolean burrowsSoopyGuess = false;
@Expose
@ConfigOption(name = "Nearby Detection", desc = "Show burrows near you.")
@ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
public boolean burrowsNearbyDetection = false;
@Expose
@ConfigOption(name = "Smooth Transition", desc = "Show the way from one burrow to another smoothly.")
@ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
public boolean burrowSmoothTransition = false;
@Expose
+ @ConfigOption(name = "Griffin Burrows", desc = "")
+ public boolean griffinBurrows = false;
+
+ @Expose
@ConfigOption(name = "Nearest Warp", desc = "Warps to the nearest warp point on the hub, if closer to the next burrow.")
@ConfigEditorBoolean
- @ConfigAccordionId(id = 0)
public boolean burrowNearestWarp = false;
+ @Expose
+ @ConfigOption(
+ name = "Warp Key",
+ desc = "Press this key to warp to nearest burrow waypoint."
+ )
+ @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
+ public int keyBindWarp = Keyboard.KEY_NONE;
+
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
index 949b3c4e3..ef1cc5cec 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
@@ -1,42 +1,37 @@
package at.hannibal2.skyhanni.features.event.diana
+import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.sorted
import at.hannibal2.skyhanni.utils.LorenzVec
-import at.hannibal2.skyhanni.utils.OSUtils.isActive
import net.minecraft.client.Minecraft
-import net.minecraft.client.settings.KeyBinding
-import net.minecraftforge.fml.client.registry.ClientRegistry
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import net.minecraftforge.fml.common.gameevent.TickEvent
+import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent
import org.lwjgl.input.Keyboard
class BurrowWarpHelper {
- private val keyBinding = KeyBinding(
- "Nearest Burrow Warp",
- Keyboard.KEY_X,
- "SkyHanni"
- )
-
private var lastWarpTime = 0L
private var lastWarp: WarpPoint? = null
- init {
- ClientRegistry.registerKeyBinding(keyBinding)
- }
-
@SubscribeEvent
- fun onClientTick(event: TickEvent.ClientTickEvent) {
- if (keyBinding.isActive()) {
+ fun onKeyBindPressed(event: KeyInputEvent?) {
+ if (!LorenzUtils.inSkyBlock) return
+ if(LorenzUtils.skyBlockIsland != IslandType.HUB) return
+ if (!SkyHanniMod.feature.diana.burrowNearestWarp) return
+
+ if (!Keyboard.getEventKeyState()) return
+ val key = if (Keyboard.getEventKey() == 0) Keyboard.getEventCharacter().code + 256 else Keyboard.getEventKey()
+ if (SkyHanniMod.feature.diana.keyBindWarp == key) {
currentWarp?.let {
if (System.currentTimeMillis() > lastWarpTime + 5_000) {
+ lastWarpTime = System.currentTimeMillis()
val thePlayer = Minecraft.getMinecraft().thePlayer
thePlayer.sendChatMessage("/warp " + currentWarp?.name)
lastWarp = currentWarp
- lastWarpTime = System.currentTimeMillis()
}
}
}