diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-10 19:29:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-10 19:29:33 +0100 |
commit | 6b19f73c526fc4bbb196b7b547750ebe60feb76d (patch) | |
tree | f9a875b184c78916a6c7064edcb35cc3a862749c /src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt | |
parent | 498afd58e3405d473107e08a3b1891f93f76a96a (diff) | |
download | skyhanni-6b19f73c526fc4bbb196b7b547750ebe60feb76d.tar.gz skyhanni-6b19f73c526fc4bbb196b7b547750ebe60feb76d.tar.bz2 skyhanni-6b19f73c526fc4bbb196b7b547750ebe60feb76d.zip |
Debug Feature: Added TrackSoundsCommand (#855)
Co-authored-by: Linnea Gräf <nea@nea.moe>
Co-authored-by: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt | 8 |
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 + ) + })" + } } |