aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-09-20 22:38:27 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-09-20 22:38:27 +0200
commited91bbeaca46b3bbbf51cbeb208b14aa87de1cf6 (patch)
tree9150efdb6258da7d84c6fca19315b21244ab63c9 /src
parenta99f0bdd1c2c5df1495996844dcf62791c19498d (diff)
downloadskyhanni-ed91bbeaca46b3bbbf51cbeb208b14aa87de1cf6.tar.gz
skyhanni-ed91bbeaca46b3bbbf51cbeb208b14aa87de1cf6.tar.bz2
skyhanni-ed91bbeaca46b3bbbf51cbeb208b14aa87de1cf6.zip
misc changes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt b/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt
index 0646b884c..15fcbe8a9 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/model/TextInput.kt
@@ -111,7 +111,7 @@ class TextInput {
}
if (KeyboardManager.isPastingKeysDown()) {
runBlocking {
- textBox = OSUtils.readFromClipboard() ?: return@runBlocking
+ textBox = OSUtils.readFromClipboard()?.take(2024) ?: return@runBlocking
updated()
}
return
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
index ae0028b33..ae7ec12de 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
@@ -41,8 +41,7 @@ object BlockUtils {
}
fun rayTrace(start: LorenzVec, direction: LorenzVec, distance: Double = 50.0): LorenzVec? {
- val help = direction.normalize() * distance
- val target = start + help
+ val target = start + direction.normalize() * distance
val result = Minecraft.getMinecraft().theWorld.rayTraceBlocks(start.toVec3(), target.toVec3())
return result?.blockPos?.toLorenzVec()