Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
3dc82c200 deprecate IllegalPacketEvent (#4867)
  • Loading branch information
BillyGalbreath committed Dec 8, 2020
1 parent 69790ff commit 1b40f87
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Paper
Submodule Paper updated 34 files
+6 −2 Spigot-API-Patches/0043-IllegalPacketEvent.patch
+3 −12 Spigot-Server-Patches/0169-Add-PlayerJumpEvent.patch
+2 −2 Spigot-Server-Patches/0170-handle-PacketPlayInKeepAlive-async.patch
+4 −4 Spigot-Server-Patches/0172-revert-serverside-behavior-of-keepalives.patch
+3 −3 Spigot-Server-Patches/0179-AsyncTabCompleteEvent.patch
+2 −2 Spigot-Server-Patches/0208-Fix-exploit-that-allowed-colored-signs-to-be-created.patch
+3 −3 Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch
+2 −2 Spigot-Server-Patches/0235-Refresh-player-inventory-when-cancelling-PlayerInter.patch
+4 −4 Spigot-Server-Patches/0257-Break-up-and-make-tab-spam-limits-configurable.patch
+2 −2 Spigot-Server-Patches/0297-Call-player-spectator-target-events-and-improve-impl.patch
+4 −4 Spigot-Server-Patches/0302-Add-option-to-prevent-players-from-moving-into-unloa.patch
+2 −2 Spigot-Server-Patches/0310-Don-t-allow-digging-into-unloaded-chunks.patch
+2 −2 Spigot-Server-Patches/0311-Book-Size-Limits.patch
+2 −2 Spigot-Server-Patches/0325-Fix-sign-edit-memory-leak.patch
+3 −3 Spigot-Server-Patches/0326-Limit-Client-Sign-length-more.patch
+2 −2 Spigot-Server-Patches/0337-Update-entity-Metadata-for-all-tracked-players.patch
+2 −2 Spigot-Server-Patches/0346-Fix-CB-call-to-changed-postToMainThread-method.patch
+3 −3 Spigot-Server-Patches/0368-Asynchronous-chunk-IO-and-loading.patch
+2 −2 Spigot-Server-Patches/0369-Use-getChunkIfLoadedImmediately-in-places.patch
+2 −2 Spigot-Server-Patches/0384-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch
+2 −2 Spigot-Server-Patches/0412-Prevent-teleporting-dead-entities.patch
+4 −4 Spigot-Server-Patches/0452-Load-Chunks-for-Login-Asynchronously.patch
+3 −3 Spigot-Server-Patches/0459-Implement-Brigadier-Mojang-API.patch
+2 −2 Spigot-Server-Patches/0461-Validate-PickItem-Packet-and-kick-for-invalid.patch
+2 −2 Spigot-Server-Patches/0485-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch
+2 −2 Spigot-Server-Patches/0500-Prevent-position-desync-in-playerconnection-causing-.patch
+2 −2 Spigot-Server-Patches/0504-Add-and-implement-PlayerRecipeBookClickEvent.patch
+3 −3 Spigot-Server-Patches/0507-Add-permission-for-command-blocks.patch
+2 −2 Spigot-Server-Patches/0510-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
+2 −2 Spigot-Server-Patches/0532-Move-range-check-for-block-placing-up.patch
+6 −6 Spigot-Server-Patches/0547-Brand-support.patch
+3 −3 Spigot-Server-Patches/0569-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
+4 −4 Spigot-Server-Patches/0582-Fix-for-large-move-vectors-crashing-server.patch
+2 −2 Spigot-Server-Patches/0598-Add-API-for-quit-reason.patch
2 changes: 1 addition & 1 deletion current-paper
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.4--194240a416a31a579f4007bf9c85794e9f3bdb26
1.16.4--de075fa8d03437e6e01d115ec6dea1ac7cbbced2
12 changes: 6 additions & 6 deletions patches/server/0001-Tuinity-Server-Changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand All @@ -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
Expand All @@ -11174,15 +11174,15 @@ 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));
+ boolean didCollide = toX != this.player.locX() || toY != this.player.locY() || toZ != this.player.locZ(); // Tuinity - needed here as the difference in Y can be reset - also note: this is only a guess at whether collisions took place, floating point errors can make this true when it shouldn't be...
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);
Expand Down
10 changes: 5 additions & 5 deletions patches/server/0009-AFK-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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();

Expand All @@ -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;
Expand All @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0018-Player-invulnerabilities.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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()];
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0021-Alternative-Keepalive-Handling.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ 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
+ private java.util.List<Long> keepAlives = new java.util.ArrayList<>(); // Purpur
// 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();

Expand All @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0091-Allow-color-codes-in-books.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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());
}

Expand All @@ -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 {
}
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0092-Entity-lifespan.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0114-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1b40f87

Please sign in to comment.