Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
Added NoteBlock.play(instrument, note).
Dieser Commit ist enthalten in:
Ursprung
83eecfbd4e
Commit
98cea5cd15
@ -42,4 +42,17 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean play(byte instrument, byte note) {
|
||||||
|
Block block = getBlock();
|
||||||
|
|
||||||
|
synchronized (block) {
|
||||||
|
if (block.getType() == Material.NOTE_BLOCK) {
|
||||||
|
world.getHandle().d(getX(), getY(), getZ(), instrument, note);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren