From d887e8dd0e24c300722b859cab4222e29f32c83a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 16 Feb 2023 15:04:39 +0100 Subject: Moved packet test into own class. --- src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/events') diff --git a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt index cdf2f29a5..acedbc608 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt @@ -1,8 +1,11 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzVec import net.minecraftforge.fml.common.eventhandler.Cancelable @Cancelable class PlaySoundEvent(val soundName: String, val location: LorenzVec, val pitch: Float, val volume: Float) : - LorenzEvent() \ No newline at end of file + LorenzEvent() { + val distanceToPlayer by lazy { location.distance(LocationUtils.playerLocation()) } +} \ No newline at end of file -- cgit