From 783243ad0683303184bc83ab7be1d984e3b7aaff Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 10 Jun 2023 13:48:03 +0700 Subject: [PATCH] actually do how minecraft did it --- .../chayapak/chomens_bot/plugins/MusicPlayerPlugin.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java index dad24c4..c700e9c 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/MusicPlayerPlugin.java @@ -291,7 +291,9 @@ public class MusicPlayerPlugin extends Bot.Listener { float key = note.pitch; - final double floatingPitch = 0.5 * (Math.pow(2, ((key + (pitch / 10)) / 12))); + // totally didn't look at the minecraft code and found the note block pitch thingy so i totallydidnotskidded™ it + final double floatingPitch = Math.pow(2.0, ((key + (pitch / 10)) - 12) / 12.0); + // final double floatingPitch = 0.5 * (Math.pow(2, ((key + (pitch / 10)) / 12))); // totallynotskidded from opennbs int blockPosition = 0;