From a96d797766044411add58edae2522945cee85c90 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 14 Apr 2023 09:27:06 +0700 Subject: [PATCH] make it better or worse --- .../chayapak/chomens_bot/plugins/MusicPlayerPlugin.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 effc46e..fccbdfd 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 @@ -264,16 +264,13 @@ public class MusicPlayerPlugin extends SessionAdapter { else if (key > 57) key -= 57; else key -= 33; - // duplicate codes real - double floatingPitch = Math.pow( + final double floatingPitch = Math.pow( 2, (key + (pitch / 10)) / 12 ); - if (floatingPitch > 2) floatingPitch = Math.pow( - 2, - (key + (pitch / 10)) / 12 - ); + // if the thing is still out of range just ignore and don't play it!1!1 + if (floatingPitch < -1 || floatingPitch > 3) continue; bot.core().run( "minecraft:execute as " +