make it better or worse

This commit is contained in:
Chayapak 2023-04-14 09:27:06 +07:00
parent 857ec08116
commit a96d797766

View file

@ -264,16 +264,13 @@ public class MusicPlayerPlugin extends SessionAdapter {
else if (key > 57) key -= 57; else if (key > 57) key -= 57;
else key -= 33; else key -= 33;
// duplicate codes real final double floatingPitch = Math.pow(
double floatingPitch = Math.pow(
2, 2,
(key + (pitch / 10)) / 12 (key + (pitch / 10)) / 12
); );
if (floatingPitch > 2) floatingPitch = Math.pow( // if the thing is still out of range just ignore and don't play it!1!1
2, if (floatingPitch < -1 || floatingPitch > 3) continue;
(key + (pitch / 10)) / 12
);
bot.core().run( bot.core().run(
"minecraft:execute as " + "minecraft:execute as " +