mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:25:03 +01:00
Fix Jukebox API not synchronizing playing data with state
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d6e57b855b
commit
ecd55ecaab
1 changed files with 2 additions and 4 deletions
|
@ -1,9 +1,7 @@
|
||||||
package org.bukkit.craftbukkit.block;
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
import net.minecraft.server.BlockJukeBox;
|
import net.minecraft.server.BlockJukeBox;
|
||||||
import net.minecraft.server.BlockPosition;
|
|
||||||
import net.minecraft.server.Blocks;
|
import net.minecraft.server.Blocks;
|
||||||
import net.minecraft.server.Item;
|
|
||||||
import net.minecraft.server.ItemStack;
|
import net.minecraft.server.ItemStack;
|
||||||
import net.minecraft.server.TileEntity;
|
import net.minecraft.server.TileEntity;
|
||||||
import net.minecraft.server.TileEntityJukeBox;
|
import net.minecraft.server.TileEntityJukeBox;
|
||||||
|
@ -68,9 +66,9 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
|
||||||
ItemStack nms = CraftItemStack.asNMSCopy(record);
|
ItemStack nms = CraftItemStack.asNMSCopy(record);
|
||||||
this.getSnapshot().setRecord(nms);
|
this.getSnapshot().setRecord(nms);
|
||||||
if (nms.isEmpty()) {
|
if (nms.isEmpty()) {
|
||||||
getHandle().set(BlockJukeBox.HAS_RECORD, false);
|
this.data = this.data.set(BlockJukeBox.HAS_RECORD, false);
|
||||||
} else {
|
} else {
|
||||||
getHandle().set(BlockJukeBox.HAS_RECORD, true);
|
this.data = this.data.set(BlockJukeBox.HAS_RECORD, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue