mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 3dc82c200 deprecate IllegalPacketEvent (#4867)
This commit is contained in:
2
Paper
2
Paper
Submodule Paper updated: 9a129fa99a...3dc82c2008
@@ -1 +1 @@
|
||||
1.16.4--194240a416a31a579f4007bf9c85794e9f3bdb26
|
||||
1.16.4--de075fa8d03437e6e01d115ec6dea1ac7cbbced2
|
||||
|
||||
@@ -11142,10 +11142,10 @@ index 6c399bcea0..d3bf356ea7 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 a736d676ef..12ce5b106d 100644
|
||||
index 0aac84e980..1c8b477f83 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -416,7 +416,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -414,7 +414,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
|
||||
@@ -11156,7 +11156,7 @@ index a736d676ef..12ce5b106d 100644
|
||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||
return;
|
||||
}
|
||||
@@ -1055,7 +1057,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1053,7 +1055,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (this.teleportPos != null) {
|
||||
@@ -11165,7 +11165,7 @@ index a736d676ef..12ce5b106d 100644
|
||||
this.A = this.e;
|
||||
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
|
||||
}
|
||||
@@ -1125,7 +1127,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1123,7 +1125,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
speed = player.abilities.walkSpeed * 10f;
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@@ -11174,7 +11174,7 @@ index a736d676ef..12ce5b106d 100644
|
||||
this.internalTeleport(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch, Collections.emptySet());
|
||||
return;
|
||||
}
|
||||
@@ -1181,6 +1183,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1179,6 +1181,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
|
||||
@@ -11182,7 +11182,7 @@ index a736d676ef..12ce5b106d 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) {
|
||||
@@ -1205,7 +1208,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1203,7 +1206,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
this.player.setLocation(d4, d5, d6, f, f1);
|
||||
|
||||
@@ -149,10 +149,10 @@ index b5e1a860a2..5f85a1d513 100644
|
||||
// Paper start
|
||||
public static final Predicate<Entity> affectsSpawning = (entity) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 12ce5b106d..13da04e5b3 100644
|
||||
index 1c8b477f83..347675d6db 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -247,6 +247,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -245,6 +245,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (this.player.F() > 0L && this.minecraftServer.getIdleTimeout() > 0 && SystemUtils.getMonotonicMillis() - this.player.F() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
|
||||
@@ -165,7 +165,7 @@ index 12ce5b106d..13da04e5b3 100644
|
||||
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(new ChatMessage("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@@ -503,6 +509,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -501,6 +507,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.lastYaw = to.getYaw();
|
||||
this.lastPitch = to.getPitch();
|
||||
|
||||
@@ -174,7 +174,7 @@ index 12ce5b106d..13da04e5b3 100644
|
||||
// Skip the first time we do this
|
||||
if (true) { // Spigot - don't skip any move events
|
||||
Location oldTo = to.clone();
|
||||
@@ -1204,7 +1212,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1202,7 +1210,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
if (!this.player.H() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative() && this.player.playerInteractManager.getGameMode() != EnumGamemode.SPECTATOR) { // Spigot
|
||||
flag1 = true;
|
||||
@@ -183,7 +183,7 @@ index 12ce5b106d..13da04e5b3 100644
|
||||
}
|
||||
|
||||
this.player.setLocation(d4, d5, d6, f, f1);
|
||||
@@ -1243,6 +1251,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1241,6 +1249,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.lastYaw = to.getYaw();
|
||||
this.lastPitch = to.getPitch();
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ index 694159cca7..ddef5d06f4 100644
|
||||
public Scoreboard getScoreboard() {
|
||||
return getBukkitEntity().getScoreboard().getHandle();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 13da04e5b3..11473f06be 100644
|
||||
index 347675d6db..b0f154080f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1653,6 +1653,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1651,6 +1651,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
|
||||
// Paper start
|
||||
PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()];
|
||||
|
||||
@@ -17,10 +17,10 @@ index 8e93f1540b..470f92c4fb 100644
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 11473f06be..32bfd0e222 100644
|
||||
index b0f154080f..4debbe924d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -83,6 +83,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -81,6 +81,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
private long lastKeepAlive = SystemUtils.getMonotonicMillis(); private void setLastPing(long lastPing) { this.lastKeepAlive = lastPing;}; private long getLastPing() { return this.lastKeepAlive;}; // Paper - OBFHELPER
|
||||
private boolean awaitingKeepAlive; private void setPendingPing(boolean isPending) { this.awaitingKeepAlive = isPending;}; private boolean isPendingPing() { return this.awaitingKeepAlive;}; // Paper - OBFHELPER
|
||||
private long h; private void setKeepAliveID(long keepAliveID) { this.h = keepAliveID;}; private long getKeepAliveID() {return this.h; }; // Paper - OBFHELPER
|
||||
@@ -28,7 +28,7 @@ index 11473f06be..32bfd0e222 100644
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
@@ -216,6 +217,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -214,6 +215,21 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
long currentTime = SystemUtils.getMonotonicMillis();
|
||||
long elapsedTime = currentTime - this.getLastPing();
|
||||
|
||||
@@ -50,7 +50,7 @@ index 11473f06be..32bfd0e222 100644
|
||||
if (this.isPendingPing()) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info
|
||||
@@ -2819,6 +2835,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2817,6 +2833,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow color codes in books
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index cf7540f235..91941763dd 100644
|
||||
index 7676659f44..bd206f1810 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1005,7 +1005,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1003,7 +1003,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
if (itemstack.getItem() == Items.WRITABLE_BOOK) {
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
|
||||
@@ -18,7 +18,7 @@ index cf7540f235..91941763dd 100644
|
||||
ItemStack old = itemstack.cloneItemStack(); // CraftBukkit
|
||||
itemstack.a("pages", (NBTBase) nbttaglist);
|
||||
CraftEventFactory.handleEditBookEvent(player, i, old, itemstack); // CraftBukkit
|
||||
@@ -1023,13 +1024,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1021,13 +1022,14 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
itemstack1.setTag(nbttagcompound.clone());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index cf7540f235..91941763dd 100644
|
||||
ChatComponentText chatcomponenttext = new ChatComponentText(s1);
|
||||
String s2 = IChatBaseComponent.ChatSerializer.a((IChatBaseComponent) chatcomponenttext);
|
||||
|
||||
@@ -1041,6 +1043,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1039,6 +1041,16 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@ index 202ccf2a7f..2fcd7f461a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 91941763dd..2c526846d7 100644
|
||||
index bd206f1810..a57588acf0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2216,6 +2216,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2214,6 +2214,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof EntityInsentient;
|
||||
Item origItem = this.player.inventory.getItemInHand() == null ? null : this.player.inventory.getItemInHand().getItem();
|
||||
PlayerInteractEntityEvent event;
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Duplicate paper's vanilla scoreboard colors patch to sync
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 2c526846d7..042c772862 100644
|
||||
index a57588acf0..261dbea122 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1975,7 +1975,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1973,7 +1973,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ index 2c526846d7..042c772862 100644
|
||||
PlayerConnection.this.minecraftServer.console.sendMessage(message);
|
||||
if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) {
|
||||
for (Object player : PlayerConnection.this.minecraftServer.getPlayerList().players) {
|
||||
@@ -2008,7 +2016,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2006,7 +2014,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
// Paper Start - (Meh) Support for vanilla world scoreboard name coloring
|
||||
String displayName = event.getPlayer().getDisplayName();
|
||||
if (this.player.getWorld().paperConfig.useVanillaScoreboardColoring) {
|
||||
|
||||
@@ -4972,10 +4972,10 @@ index 0000000000..44929182df
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 042c772862..bba5200534 100644
|
||||
index 261dbea122..f4f4127b01 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2233,6 +2233,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2231,6 +2231,8 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user