mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 09:34:44 +01:00
f8db65033c
By: md_5 <git@md-5.net>
17 lines
896 B
Diff
17 lines
896 B
Diff
--- a/net/minecraft/world/level/block/BlockJukeBox.java
|
|
+++ b/net/minecraft/world/level/block/BlockJukeBox.java
|
|
@@ -67,7 +67,13 @@
|
|
if (tileentity instanceof TileEntityJukeBox) {
|
|
TileEntityJukeBox tileentityjukebox = (TileEntityJukeBox) tileentity;
|
|
|
|
- tileentityjukebox.setRecord(itemstack.copy());
|
|
+ // CraftBukkit start - There can only be one
|
|
+ itemstack = itemstack.copy();
|
|
+ if (!itemstack.isEmpty()) {
|
|
+ itemstack.setCount(1);
|
|
+ }
|
|
+ tileentityjukebox.setRecord(itemstack);
|
|
+ // CraftBukkit end
|
|
tileentityjukebox.playRecord();
|
|
generatoraccess.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockJukeBox.HAS_RECORD, true), 2);
|
|
generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(entity, iblockdata));
|