mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
18 lines
779 B
Diff
18 lines
779 B
Diff
|
--- a/net/minecraft/server/BlockJukeBox.java
|
||
|
+++ b/net/minecraft/server/BlockJukeBox.java
|
||
|
@@ -24,7 +24,13 @@
|
||
|
TileEntity tileentity = generatoraccess.getTileEntity(blockposition);
|
||
|
|
||
|
if (tileentity instanceof TileEntityJukeBox) {
|
||
|
- ((TileEntityJukeBox) tileentity).setRecord(itemstack.cloneItemStack());
|
||
|
+ // CraftBukkit start - There can only be one
|
||
|
+ itemstack = itemstack.cloneItemStack();
|
||
|
+ if (!itemstack.isEmpty()) {
|
||
|
+ itemstack.setCount(1);
|
||
|
+ }
|
||
|
+ ((TileEntityJukeBox) tileentity).setRecord(itemstack);
|
||
|
+ // CraftBukkit end
|
||
|
generatoraccess.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockJukeBox.HAS_RECORD, true), 2);
|
||
|
}
|
||
|
}
|