aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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()