mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Config to allow Note Block sounds when blocked
Allows for Note Blocks to ignore whether or not there's air above them to play. Normally, the sounds will only play when the block directly above is air. With this patch enabled, players can place any block above the Note Block and it will still work.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/NoteBlock.java
|
||||
+++ b/net/minecraft/world/level/block/NoteBlock.java
|
||||
@@ -107,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void playNote(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) {
|
||||
- if (state.getValue(INSTRUMENT).worksAboveNoteBlock() || level.getBlockState(pos.above()).isAir()) {
|
||||
+ if (level.purpurConfig.noteBlockIgnoreAbove || state.getValue(INSTRUMENT).worksAboveNoteBlock() || level.getBlockState(pos.above()).isAir()) { // Purpur - Config to allow Note Block sounds when blocked
|
||||
// CraftBukkit start
|
||||
// org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE));
|
||||
// if (event.isCancelled()) {
|
||||
Reference in New Issue
Block a user