mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 2f0e0a6d Backport feature search improvement from 1.17 (Fixes #2312) (#4771) b6d9d634 Add API for quit reason
This commit is contained in:
@@ -8372,10 +8372,10 @@ index fe0334b50..87cd6fb0c 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 59d47a9f7..f8921eb83 100644
|
||||
index 976c44c8e..27c368bf1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -524,6 +524,174 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -525,6 +525,174 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9664,7 +9664,7 @@ index 1558c5f82..b92ca4a6d 100644
|
||||
Vec3D vec3d = new Vec3D(((double) pathpoint.a + this.a.locX()) / 2.0D, ((double) pathpoint.b + this.a.locY()) / 2.0D, ((double) pathpoint.c + this.a.locZ()) / 2.0D);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 7a84ea411..eb6b81d88 100644
|
||||
index 3ec8ba17d..7a2a8acea 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -27,6 +27,8 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -9716,7 +9716,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
|
||||
this.h = enumprotocoldirection;
|
||||
}
|
||||
@@ -142,8 +177,63 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -145,8 +180,63 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
if (MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot
|
||||
}
|
||||
|
||||
@@ -9780,7 +9780,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
try {
|
||||
a(packet, this.packetListener);
|
||||
} catch (CancelledPacketHandleException cancelledpackethandleexception) {
|
||||
@@ -217,7 +307,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -220,7 +310,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
MCUtil.isMainThread() && packet.isReady() && this.packetQueue.isEmpty() &&
|
||||
(packet.getExtraPackets() == null || packet.getExtraPackets().isEmpty())
|
||||
))) {
|
||||
@@ -9789,7 +9789,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
return;
|
||||
}
|
||||
// write the packets to the queue, then flush - antixray hooks there already
|
||||
@@ -243,6 +333,14 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -246,6 +336,14 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
||||
private void dispatchPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericFutureListener) { this.b(packet, genericFutureListener); } // Paper - OBFHELPER
|
||||
private void b(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||
@@ -9804,7 +9804,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
EnumProtocol enumprotocol = EnumProtocol.a(packet);
|
||||
EnumProtocol enumprotocol1 = (EnumProtocol) this.channel.attr(NetworkManager.c).get();
|
||||
|
||||
@@ -265,7 +363,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -268,7 +366,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
try {
|
||||
// Paper end
|
||||
|
||||
@@ -9813,7 +9813,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
|
||||
if (genericfuturelistener != null) {
|
||||
channelfuture.addListener(genericfuturelistener);
|
||||
@@ -285,39 +383,83 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -288,39 +386,83 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
// Paper end
|
||||
} else {
|
||||
@@ -9927,7 +9927,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
}
|
||||
|
||||
}
|
||||
@@ -340,6 +482,8 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -343,6 +485,8 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
private boolean processQueue() {
|
||||
if (this.packetQueue.isEmpty()) return true;
|
||||
@@ -9936,7 +9936,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
// If we are on main, we are safe here in that nothing else should be processing queue off main anymore
|
||||
// But if we are not on main due to login/status, the parent is synchronized on packetQueue
|
||||
java.util.Iterator<QueuedPacket> iterator = this.packetQueue.iterator();
|
||||
@@ -347,16 +491,22 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -350,16 +494,22 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
NetworkManager.QueuedPacket queued = iterator.next(); // poll -> peek
|
||||
|
||||
// Fix NPE (Spigot bug caused by handleDisconnection())
|
||||
@@ -9961,7 +9961,7 @@ index 7a84ea411..eb6b81d88 100644
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -433,10 +583,16 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -436,10 +586,16 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
return this.channel instanceof LocalChannel || this.channel instanceof LocalServerChannel;
|
||||
}
|
||||
|
||||
@@ -11135,10 +11135,10 @@ index 6c399bcea..d3bf356ea 100644
|
||||
}
|
||||
// Paper end - optimised tracker
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 563ae7355..b89caa8ad 100644
|
||||
index a736d676e..12ce5b106 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -415,7 +415,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -416,7 +416,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@@ -11149,7 +11149,7 @@ index 563ae7355..b89caa8ad 100644
|
||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||
return;
|
||||
}
|
||||
@@ -1054,7 +1056,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1055,7 +1057,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (this.teleportPos != null) {
|
||||
@@ -11158,7 +11158,7 @@ index 563ae7355..b89caa8ad 100644
|
||||
this.A = this.e;
|
||||
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
|
||||
}
|
||||
@@ -1124,7 +1126,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1125,7 +1127,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed = player.abilities.walkSpeed * 10f;
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@@ -11167,7 +11167,7 @@ index 563ae7355..b89caa8ad 100644
|
||||
this.internalTeleport(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch, Collections.emptySet());
|
||||
return;
|
||||
}
|
||||
@@ -1180,6 +1182,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1181,6 +1183,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
|
||||
@@ -11175,7 +11175,7 @@ index 563ae7355..b89caa8ad 100644
|
||||
this.player.setOnGround(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move
|
||||
// Paper start - prevent position desync
|
||||
if (this.teleportPos != null) {
|
||||
@@ -1204,7 +1207,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1205,7 +1208,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
this.player.setLocation(d4, d5, d6, f, f1);
|
||||
@@ -13465,7 +13465,7 @@ index 5d9d58411..f0fdfd689 100644
|
||||
private double c;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d64d94b8c..f7103ec2a 100644
|
||||
index f260da1fd..6cb47160d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -94,6 +94,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
Reference in New Issue
Block a user