mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
43702a9e10
By: md_5 <git@md-5.net>
17 lines
781 B
Diff
17 lines
781 B
Diff
--- a/net/minecraft/world/level/block/BlockJukeBox.java
|
|
+++ b/net/minecraft/world/level/block/BlockJukeBox.java
|
|
@@ -59,7 +59,13 @@
|
|
TileEntity tileentity = generatoraccess.getBlockEntity(blockposition);
|
|
|
|
if (tileentity instanceof TileEntityJukeBox) {
|
|
- ((TileEntityJukeBox) tileentity).setRecord(itemstack.copy());
|
|
+ // CraftBukkit start - There can only be one
|
|
+ itemstack = itemstack.copy();
|
|
+ if (!itemstack.isEmpty()) {
|
|
+ itemstack.setCount(1);
|
|
+ }
|
|
+ ((TileEntityJukeBox) tileentity).setRecord(itemstack);
|
|
+ // CraftBukkit end
|
|
generatoraccess.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockJukeBox.HAS_RECORD, true), 2);
|
|
}
|
|
}
|