2018-12-22 00:50:57 +01:00
|
|
|
--- a/net/minecraft/server/BlockJukeBox.java
|
|
|
|
+++ b/net/minecraft/server/BlockJukeBox.java
|
2020-06-25 02:00:00 +02:00
|
|
|
@@ -42,7 +42,13 @@
|
2018-12-22 00:50:57 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|