Update to Minecraft 1.19.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-07-28 04:00:00 +10:00
parent 7c33b52741
commit f8db65033c
41 changed files with 654 additions and 579 deletions

View File

@@ -1,17 +1,17 @@
--- a/net/minecraft/world/level/block/BlockJukeBox.java
+++ b/net/minecraft/world/level/block/BlockJukeBox.java
@@ -62,7 +62,13 @@
TileEntity tileentity = generatoraccess.getBlockEntity(blockposition);
@@ -67,7 +67,13 @@
if (tileentity instanceof TileEntityJukeBox) {
- ((TileEntityJukeBox) tileentity).setRecord(itemstack.copy());
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) tileentity).setRecord(itemstack);
+ 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));
}

View File

@@ -1,11 +0,0 @@
--- a/net/minecraft/world/level/block/entity/TileEntityEnderChest.java
+++ b/net/minecraft/world/level/block/entity/TileEntityEnderChest.java
@@ -11,7 +11,7 @@
public class TileEntityEnderChest extends TileEntity implements LidBlockEntity {
private final ChestLidController chestLidController = new ChestLidController();
- private final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() {
+ public final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() {
@Override
protected void onOpen(World world, BlockPosition blockposition, IBlockData iblockdata) {
world.playSound((EntityHuman) null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, SoundEffects.ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);