Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
Fix Jukebox API not synchronizing playing data with state
Dieser Commit ist enthalten in:
Ursprung
fe89a8c1bb
Commit
bc943daf94
@ -1,9 +1,7 @@
|
||||
package org.bukkit.craftbukkit.block;
|
||||
|
||||
import net.minecraft.server.BlockJukeBox;
|
||||
import net.minecraft.server.BlockPosition;
|
||||
import net.minecraft.server.Blocks;
|
||||
import net.minecraft.server.Item;
|
||||
import net.minecraft.server.ItemStack;
|
||||
import net.minecraft.server.TileEntity;
|
||||
import net.minecraft.server.TileEntityJukeBox;
|
||||
@ -68,9 +66,9 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
|
||||
ItemStack nms = CraftItemStack.asNMSCopy(record);
|
||||
this.getSnapshot().setRecord(nms);
|
||||
if (nms.isEmpty()) {
|
||||
getHandle().set(BlockJukeBox.HAS_RECORD, false);
|
||||
this.data = this.data.set(BlockJukeBox.HAS_RECORD, false);
|
||||
} else {
|
||||
getHandle().set(BlockJukeBox.HAS_RECORD, true);
|
||||
this.data = this.data.set(BlockJukeBox.HAS_RECORD, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren