Added new note instruments up to 1.19

1.20 adds extra ones for each type of mob head, but we're not supporting 1.20 yet.
This commit is contained in:
Dylan K. Taylor 2023-05-26 16:58:06 +01:00
parent 06b0fa4d67
commit b8ba2d03ba
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 34 additions and 1 deletions

View File

@ -47,6 +47,17 @@ final class NoteInstrumentIdMap{
$this->register(2, NoteInstrument::SNARE());
$this->register(3, NoteInstrument::CLICKS_AND_STICKS());
$this->register(4, NoteInstrument::DOUBLE_BASS());
$this->register(5, NoteInstrument::BELL());
$this->register(6, NoteInstrument::FLUTE());
$this->register(7, NoteInstrument::CHIME());
$this->register(8, NoteInstrument::GUITAR());
$this->register(9, NoteInstrument::XYLOPHONE());
$this->register(10, NoteInstrument::IRON_XYLOPHONE());
$this->register(11, NoteInstrument::COW_BELL());
$this->register(12, NoteInstrument::DIDGERIDOO());
$this->register(13, NoteInstrument::BIT());
$this->register(14, NoteInstrument::BANJO());
$this->register(15, NoteInstrument::PLING());
}
private function register(int $id, NoteInstrument $instrument) : void{

View File

@ -31,11 +31,22 @@ use pocketmine\utils\EnumTrait;
* @see build/generate-registry-annotations.php
* @generate-registry-docblock
*
* @method static NoteInstrument BANJO()
* @method static NoteInstrument BASS_DRUM()
* @method static NoteInstrument BELL()
* @method static NoteInstrument BIT()
* @method static NoteInstrument CHIME()
* @method static NoteInstrument CLICKS_AND_STICKS()
* @method static NoteInstrument COW_BELL()
* @method static NoteInstrument DIDGERIDOO()
* @method static NoteInstrument DOUBLE_BASS()
* @method static NoteInstrument FLUTE()
* @method static NoteInstrument GUITAR()
* @method static NoteInstrument IRON_XYLOPHONE()
* @method static NoteInstrument PIANO()
* @method static NoteInstrument PLING()
* @method static NoteInstrument SNARE()
* @method static NoteInstrument XYLOPHONE()
*/
final class NoteInstrument{
use EnumTrait;
@ -46,7 +57,18 @@ final class NoteInstrument{
new self("bass_drum"),
new self("snare"),
new self("clicks_and_sticks"),
new self("double_bass")
new self("double_bass"),
new self("bell"),
new self("flute"),
new self("chime"),
new self("guitar"),
new self("xylophone"),
new self("iron_xylophone"),
new self("cow_bell"),
new self("didgeridoo"),
new self("bit"),
new self("banjo"),
new self("pling")
);
}
}