2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockJukeBox.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockJukeBox.java
|
2021-11-21 23:00:00 +01:00
|
|
|
@@ -59,7 +59,13 @@
|
|
|
|
TileEntity tileentity = generatoraccess.getBlockEntity(blockposition);
|
2018-12-22 00:50:57 +01:00
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityJukeBox) {
|
2021-11-21 23:00:00 +01:00
|
|
|
- ((TileEntityJukeBox) tileentity).setRecord(itemstack.copy());
|
2018-12-22 00:50:57 +01:00
|
|
|
+ // CraftBukkit start - There can only be one
|
2021-11-21 23:00:00 +01:00
|
|
|
+ itemstack = itemstack.copy();
|
2018-12-22 00:50:57 +01:00
|
|
|
+ if (!itemstack.isEmpty()) {
|
|
|
|
+ itemstack.setCount(1);
|
|
|
|
+ }
|
|
|
|
+ ((TileEntityJukeBox) tileentity).setRecord(itemstack);
|
|
|
|
+ // CraftBukkit end
|
2021-11-21 23:00:00 +01:00
|
|
|
generatoraccess.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockJukeBox.HAS_RECORD, true), 2);
|
2018-12-22 00:50:57 +01:00
|
|
|
}
|
|
|
|
}
|