PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
NoteInstrumentIdMap.php
1<?php
2
3/*
4 *
5 * ____ _ _ __ __ _ __ __ ____
6 * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8 * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9 * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10 *
11 * This program is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * @author PocketMine Team
17 * @link http://www.pocketmine.net/
18 *
19 *
20 */
21
22declare(strict_types=1);
23
24namespace pocketmine\data\bedrock;
25
26use pocketmine\utils\SingletonTrait;
27use pocketmine\world\sound\NoteInstrument;
28
30 use SingletonTrait;
32 use IntSaveIdMapTrait;
33
34 private function __construct(){
35 foreach(NoteInstrument::cases() as $case){
36 $this->register(match($case){
37 NoteInstrument::PIANO => 0,
38 NoteInstrument::BASS_DRUM => 1,
39 NoteInstrument::SNARE => 2,
40 NoteInstrument::CLICKS_AND_STICKS => 3,
41 NoteInstrument::DOUBLE_BASS => 4,
42 NoteInstrument::BELL => 5,
43 NoteInstrument::FLUTE => 6,
44 NoteInstrument::CHIME => 7,
45 NoteInstrument::GUITAR => 8,
46 NoteInstrument::XYLOPHONE => 9,
47 NoteInstrument::IRON_XYLOPHONE => 10,
48 NoteInstrument::COW_BELL => 11,
49 NoteInstrument::DIDGERIDOO => 12,
50 NoteInstrument::BIT => 13,
51 NoteInstrument::BANJO => 14,
52 NoteInstrument::PLING => 15,
53 }, $case);
54 }
55 }
56}