Skip to content

Commit

Permalink
fix playNote will not trigger alley fix IntelligenceModding#603
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed May 1, 2024
1 parent 5dc15af commit bd047e5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.NoteBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.gameevent.GameEvent;
import org.jetbrains.annotations.NotNull;

public class NoteBlockIntegration extends BlockIntegrationPeripheral<NoteBlock> {
Expand Down Expand Up @@ -50,6 +51,7 @@ public final int getNote() {
public final void playNote() {
if (world.isEmptyBlock(pos.above())) {
world.blockEvent(pos, getBlock(), 0, 0);
world.gameEvent(null, GameEvent.NOTE_BLOCK_PLAY, pos);
}
}
}

0 comments on commit bd047e5

Please sign in to comment.