Skip to content

Commit

Permalink
Remove playNote in NoteblockSongPlayer koca2000#81
Browse files Browse the repository at this point in the history
  • Loading branch information
koca2000 authored Dec 12, 2021
2 parents 57d987b + 7cd8b8e commit a3cc078
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.xxmicloxx.NoteBlockAPI.event.PlayerRangeStateChangeEvent;
import com.xxmicloxx.NoteBlockAPI.model.*;
import com.xxmicloxx.NoteBlockAPI.utils.CompatibilityUtils;
import com.xxmicloxx.NoteBlockAPI.utils.InstrumentUtils;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.block.Block;
Expand Down Expand Up @@ -88,13 +87,6 @@ public void playTick(Player player, int tick) {
if (note == null) {
continue;
}
int key = note.getKey() - 33;

while (key < 0) key += 12;
while (key > 24) key -= 12;

player.playNote(loc, InstrumentUtils.getBukkitInstrument(note.getInstrument()),
new org.bukkit.Note(key));

float volume = ((layer.getVolume() * (int) this.volume * (int) playerVolume * note.getVelocity()) / 100_00_00_00F)
* ((1F / 16F) * getDistance());
Expand Down

0 comments on commit a3cc078

Please sign in to comment.