mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10085)
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 Bukkit Changes: 0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory CraftBukkit Changes: 53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory 33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable 7df18510f SPIGOT-7555: Don't cast ItemFlags to byte 19aec59ea Use provided case for non-existent OfflinePlayers Spigot Changes: e7ce55a3 Remove obsolete PlayerMoveEvent improvements 3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
This commit is contained in:
parent
4d050226c3
commit
cca94c1a21
9 changed files with 54 additions and 10 deletions
24
patches/api/Add-missing-InventoryType.patch
Normal file
24
patches/api/Add-missing-InventoryType.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
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.
|
||||
*/
|
22
patches/server/Add-missing-InventoryType.patch
Normal file
22
patches/server/Add-missing-InventoryType.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
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;
|
||||
}
|
|
@ -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()));
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cc9aa21a289b9a7d361c4a8f99b56d5300f40d4c
|
||||
Subproject commit 0c7aedbceabcf05dde0a483001acd3d957e06c03
|
|
@ -1 +1 @@
|
|||
Subproject commit bcf56171a63d24b21bea341e8f5b3c5234f077c3
|
||||
Subproject commit 53ebb05e3951a1a05e4efb8a739d9bf31d21385e
|
|
@ -1 +1 @@
|
|||
Subproject commit ed9ba9a42d6c6aca02c474aed4207b7b4fd6f5d6
|
||||
Subproject commit e7ce55a3b93404a86c248a3d749e5219adda4ca0
|
Loading…
Reference in a new issue