aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-15 22:49:58 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-15 22:49:58 +0200
commit01d4aef89b7fdad58a320cf1eb4e478ac12aaba4 (patch)
tree3b933dd02f0f976760c0adba9342ea727bcda61a /src/main/java/at/hannibal2/skyhanni/utils
parentf02297bfffcdaaef5da4e04725b0658c00889cb7 (diff)
downloadskyhanni-01d4aef89b7fdad58a320cf1eb4e478ac12aaba4.tar.gz
skyhanni-01d4aef89b7fdad58a320cf1eb4e478ac12aaba4.tar.bz2
skyhanni-01d4aef89b7fdad58a320cf1eb4e478ac12aaba4.zip
added and used events for particle and sound
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
index 117a35f77..0d70b5e5a 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
@@ -1,7 +1,6 @@
package at.hannibal2.skyhanni.utils
import net.minecraft.entity.Entity
-import net.minecraft.network.play.server.S2APacketParticles
import net.minecraft.util.BlockPos
import net.minecraft.util.Rotations
import net.minecraft.util.Vec3
@@ -75,6 +74,8 @@ data class LorenzVec(
return "$x:$y:$z"
}
+ fun isZero(): Boolean = x == 0.0 && y == 0.0 && z == 0.0
+
companion object {
fun getFromYawPitch(yaw: Double, pitch: Double): LorenzVec {
val yaw: Double = (yaw + 90) * Math.PI / 180
@@ -108,6 +109,4 @@ fun Entity.getLorenzVec(): LorenzVec = LorenzVec(posX, posY, posZ)
fun Vec3.toLorenzVec(): LorenzVec = LorenzVec(xCoord, yCoord, zCoord)
-fun Rotations.toLorenzVec(): LorenzVec = LorenzVec(x, y, z)
-
-fun S2APacketParticles.toLorenzVec(): LorenzVec = LorenzVec(xCoordinate, yCoordinate, zCoordinate) \ No newline at end of file
+fun Rotations.toLorenzVec(): LorenzVec = LorenzVec(x, y, z) \ No newline at end of file