From 01d4aef89b7fdad58a320cf1eb4e478ac12aaba4 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 15 Sep 2022 22:49:58 +0200 Subject: added and used events for particle and sound --- src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') 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 -- cgit