diff --git a/patches/api/Add-missing-InventoryType.patch b/patches/api/Add-missing-InventoryType.patch new file mode 100644 index 0000000000..453eb03c2c --- /dev/null +++ b/patches/api/Add-missing-InventoryType.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Wed, 27 Dec 2023 16:46:13 -0800 +Subject: [PATCH] Add missing InventoryType + +Upstream did not add a DECORATED_POT inventory type + +diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java ++++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java +@@ -0,0 +0,0 @@ public enum InventoryType { + * Pseudo jukebox inventory with 1 slot of undefined type. + */ + JUKEBOX(1, "Jukebox", false), ++ // Paper start - add missing type ++ /** ++ * Pseudo decorated pot with 1 slot of undefined type. ++ */ ++ DECORATED_POT(1, "Decorated Pot", false), ++ // Paper end - add missing type + /** + * A crafter inventory, with 9 CRAFTING slots. + */ diff --git a/patches/server/Add-missing-InventoryType.patch b/patches/server/Add-missing-InventoryType.patch new file mode 100644 index 0000000000..7435af66df --- /dev/null +++ b/patches/server/Add-missing-InventoryType.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Wed, 27 Dec 2023 16:46:07 -0800 +Subject: [PATCH] Add missing InventoryType + +Upstream did not add a DECORATED_POT inventory type + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +@@ -0,0 +0,0 @@ public class CraftInventory implements Inventory { + return InventoryType.COMPOSTER; + } else if (this.inventory instanceof JukeboxBlockEntity) { + return InventoryType.JUKEBOX; ++ // Paper start ++ } else if (this.inventory instanceof net.minecraft.world.level.block.entity.DecoratedPotBlockEntity) { ++ return org.bukkit.event.inventory.InventoryType.DECORATED_POT; ++ // Paper end + } else { + return InventoryType.CHEST; + } diff --git a/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch index a22f91e26e..7f3571d222 100644 --- a/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - this.allowedPlayerTicks = 20; // CraftBukkit + } else { this.awaitingTeleportTime = this.tickCount; - double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); diff --git a/patches/server/Fix-GameProfileCache-concurrency.patch b/patches/server/Fix-GameProfileCache-concurrency.patch index 5378aae3f8..66e2ff69e6 100644 --- a/patches/server/Fix-GameProfileCache-concurrency.patch +++ b/patches/server/Fix-GameProfileCache-concurrency.patch @@ -65,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } else { + stateLocked = false; this.stateLock.unlock(); // Paper - allow better concurrency + try { this.lookupLock.lock(); // Paper - allow better concurrency - optional = GameProfileCache.lookupGameProfile(this.profileRepository, name); // Spigot - use correct case for offline players + optional = GameProfileCache.lookupGameProfile(this.profileRepository, name); // CraftBukkit - use correct case for offline players + } finally { this.lookupLock.unlock(); } // Paper - allow better concurrency if (optional.isPresent()) { this.add((GameProfile) optional.get()); diff --git a/patches/server/Fix-for-large-move-vectors-crashing-server.patch b/patches/server/Fix-for-large-move-vectors-crashing-server.patch index e362c6358d..a1679ecf74 100644 --- a/patches/server/Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/Fix-for-large-move-vectors-crashing-server.patch @@ -10,9 +10,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - - if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { - ServerLevel worldserver = this.player.serverLevel(); + float prevYaw = this.player.getYRot(); + float prevPitch = this.player.getXRot(); + // CraftBukkit end - double d0 = entity.getX(); - double d1 = entity.getY(); - double d2 = entity.getZ(); @@ -27,7 +27,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 double d8 = d5 - this.vehicleFirstGoodZ; double d9 = entity.getDeltaMovement().lengthSqr(); - double d10 = d6 * d6 + d7 * d7 + d8 * d8; -- + // Paper start - fix large move vectors killing the server + double currDeltaX = toX - fromX; + double currDeltaY = toY - fromY; diff --git a/patches/server/Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/Optimise-collision-checking-in-player-move-packet-ha.patch index b96109475b..a14869f8ef 100644 --- a/patches/server/Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/server/Optimise-collision-checking-in-player-move-packet-ha.patch @@ -36,7 +36,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + flag2 = true; // Paper - diff on change, this should be moved wrongly ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", new Object[]{entity.getName().getString(), this.player.getName().getString(), Math.sqrt(d10)}); } - Location curPos = this.getCraftPlayer().getLocation(); // Spigot entity.absMoveTo(d3, d4, d5, f, f1); this.player.absMoveTo(d3, d4, d5, this.player.getYRot(), this.player.getXRot()); // CraftBukkit diff --git a/work/Bukkit b/work/Bukkit index cc9aa21a28..0c7aedbcea 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit cc9aa21a289b9a7d361c4a8f99b56d5300f40d4c +Subproject commit 0c7aedbceabcf05dde0a483001acd3d957e06c03 diff --git a/work/CraftBukkit b/work/CraftBukkit index bcf56171a6..53ebb05e39 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit bcf56171a63d24b21bea341e8f5b3c5234f077c3 +Subproject commit 53ebb05e3951a1a05e4efb8a739d9bf31d21385e diff --git a/work/Spigot b/work/Spigot index ed9ba9a42d..e7ce55a3b9 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit ed9ba9a42d6c6aca02c474aed4207b7b4fd6f5d6 +Subproject commit e7ce55a3b93404a86c248a3d749e5219adda4ca0