mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 06:40:19 +08:00
Make CraftJukebox.isPlaying locally consistent
This commit is contained in:
parent
473febc73a
commit
e17c3d285b
@ -47,10 +47,12 @@ public class CraftJukebox extends CraftBlockState implements Jukebox {
|
||||
}
|
||||
jukebox.update();
|
||||
if (record == Material.AIR) {
|
||||
setRawData((byte) 0);
|
||||
world.getHandle().setTypeAndData(new BlockPosition(getX(), getY(), getZ()),
|
||||
Blocks.JUKEBOX.getBlockData()
|
||||
.set(BlockJukeBox.HAS_RECORD, false), 3);
|
||||
} else {
|
||||
setRawData((byte) 1);
|
||||
world.getHandle().setTypeAndData(new BlockPosition(getX(), getY(), getZ()),
|
||||
Blocks.JUKEBOX.getBlockData()
|
||||
.set(BlockJukeBox.HAS_RECORD, true), 3);
|
||||
|
Loading…
Reference in New Issue
Block a user