Updated Upstream (Bukkit/CraftBukkit) (#9922)

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:
fde5602a PR-927: Add PlayerRecipeBookSettingsChangeEvent
949ff217 PR-930: Add methods to get/set evoker fang attack delay
f6f7c79d SPIGOT-7514, PR-929: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
d40e22da PR-712: Add API to get full result of crafting items

CraftBukkit Changes:
c8feb0629 PR-1291: Improve precondition message in Entity#playEffect
482c56a00 PR-1285: Add PlayerRecipeBookSettingsChangeEvent
cdf798800 PR-1290: Add methods to get/set evoker fang attack delay
2c1b5f78f SPIGOT-7514, PR-1289: Add "Enchantment Roll" API to enchant items according to Minecraft mechanics
6aa644ae9 PR-992: Add API to get full result of crafting items
ffb1319bc PR-1287: Fix scoreboards not updating in Player#setStatistic
This commit is contained in:
Jake Potrebic 2023-11-11 12:25:45 -08:00 committed by GitHub
parent 63e77b531d
commit d8847bc1f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
187 changed files with 694 additions and 645 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2ea955e6c1 100644
index 8b0bcaa4239a0966cf7b7676525c1ab69c25f534..2553942e143e5acd0dc6158434d160000a98ea8c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1291,8 +1291,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1292,8 +1292,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1;
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
@ -19,7 +19,7 @@ index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2e
if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
@@ -1358,8 +1358,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1359,8 +1359,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Paper start - Prevent moving into unloaded chunks
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
@ -34,7 +34,7 @@ index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2e
}
// Paper end
@@ -1368,9 +1374,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1369,9 +1375,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end
@ -51,7 +51,7 @@ index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2e
}
}
@@ -1435,8 +1448,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1436,8 +1449,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag2 = false;
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
@ -67,7 +67,7 @@ index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2e
}
// Paper start - optimise out extra getCubes
@@ -1449,6 +1469,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1450,6 +1470,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (didCollide || !axisalignedbb.equals(newBox)) {
// note: only call after setLocation, or else getBoundingBox is wrong
teleportBack = this.hasNewCollision(worldserver, this.player, axisalignedbb, newBox);
@ -83,7 +83,7 @@ index bb74c271acc02d4f750daeb05bc05b1d6f61ffeb..a51ba56ff7072a0fcaf7115486a61c2e
} // else: no collision at all detected, why do we care?
}
if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes
@@ -1537,6 +1566,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1538,6 +1567,18 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}