Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
e1fc95c50 Fix crash with 1.20 smithing table
04dfb921d Fix crash with juke boxes
1264a6fb5 Fix crash with composters
This commit is contained in:
Nassim Jahnke
2023-03-15 10:33:43 +01:00
parent 6e1f2c32b7
commit e71930939e
5 changed files with 4 additions and 69 deletions

View File

@@ -4,58 +4,6 @@ Date: Tue, 14 Mar 2023 18:55:56 -0700
Subject: [PATCH] Fix Jukeboxes
diff --git a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
@@ -0,0 +0,0 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai
@Override
public int getMaxStackSize() {
- return 1;
+ return this.maxStack; // Paper
}
@Override
@@ -0,0 +0,0 @@ public class JukeboxBlockEntity extends BlockEntity implements Clearable, Contai
this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
this.setChanged();
}
+
+ // Paper start
+ public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
+ private int maxStack = 1;
+ @Override
+ public java.util.List<net.minecraft.world.item.ItemStack> getContents() {
+ return this.items;
+ }
+
+ @Override
+ public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.add(who);
+ }
+
+ @Override
+ public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity who) {
+ this.transaction.remove(who);
+ }
+
+ @Override
+ public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+ return this.transaction;
+ }
+
+ @Override
+ public void setMaxStackSize(int size) {
+ this.maxStack = size;
+ }
+
+ @Override
+ public org.bukkit.Location getLocation() {
+ return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
+ }
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java