mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
SPIGOT-4543: Jukebox playing calls should not use legacy data
This commit is contained in:
parent
6ff5a64c25
commit
89ab488721
@ -63,15 +63,15 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
|
|||||||
|
|
||||||
this.getSnapshot().setRecord(new ItemStack(CraftMagicNumbers.getItem(record), 1));
|
this.getSnapshot().setRecord(new ItemStack(CraftMagicNumbers.getItem(record), 1));
|
||||||
if (record == Material.AIR) {
|
if (record == Material.AIR) {
|
||||||
setRawData((byte) 0);
|
getHandle().set(BlockJukeBox.HAS_RECORD, false);
|
||||||
} else {
|
} else {
|
||||||
setRawData((byte) 1);
|
getHandle().set(BlockJukeBox.HAS_RECORD, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPlaying() {
|
public boolean isPlaying() {
|
||||||
return getRawData() == 1;
|
return getHandle().get(BlockJukeBox.HAS_RECORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user