#800: Add support for NoteBlock sounds in Skulls

By: Doc <nachito94@msn.com>
This commit is contained in:
Bukkit/Spigot
2022-12-23 12:26:04 +11:00
parent 05e63c40e1
commit 9048c2fc06
4 changed files with 81 additions and 1 deletions

View File

@@ -74,11 +74,43 @@ public enum Instrument {
/**
* Pling is normally played when a note block is on top of a glowstone block.
*/
PLING(0xF);
PLING(0xF),
/**
* Zombie is normally played when a Zombie Head is on top of the note block.
*/
ZOMBIE,
/**
* Skeleton is normally played when a Skeleton Head is on top of the note block.
*/
SKELETON,
/**
* Creeper is normally played when a Creeper Head is on top of the note block.
*/
CREEPER,
/**
* Dragon is normally played when a Dragon Head is on top of the note block.
*/
DRAGON,
/**
* Wither Skeleton is normally played when a Wither Skeleton Head is on top of the note block.
*/
WITHER_SKELETON,
/**
* Piglin is normally played when a Piglin Head is on top of the note block.
*/
PIGLIN,
/**
* Custom Sound is normally played when a Player Head with the required data is on top of the note block.
*/
CUSTOM_HEAD;
private final byte type;
private static final Map<Byte, Instrument> BY_DATA = Maps.newHashMap();
private Instrument() {
this(-1);
}
private Instrument(final int type) {
this.type = (byte) type;
}