aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt
index 123d5e881..2f793ff28 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.events
import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer
+import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.LorenzVec
import net.minecraftforge.fml.common.eventhandler.Cancelable
@@ -9,4 +10,11 @@ class PlaySoundEvent(val soundName: String, val location: LorenzVec, val pitch:
LorenzEvent() {
val distanceToPlayer by lazy { location.distanceToPlayer() }
+ override fun toString(): String {
+ return "PlaySoundEvent(soundName='$soundName', pitch=$pitch, volume=$volume, location=${location.round(1)}, distanceToPlayer=${
+ distanceToPlayer.round(
+ 1
+ )
+ })"
+ }
}