mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 22:45:31 +01:00
add 1 more networking patch and add comments to dropped patches
This commit is contained in:
parent
1a0280ccc0
commit
870dafe358
264 changed files with 11 additions and 16 deletions
|
@ -15,6 +15,8 @@ Original patch by: MeFisto94 <MeFisto94@users.noreply.github.com>
|
||||||
Co-authored-by: =?UTF-8?q?Dani=C3=ABl=20Goossens?= <daniel@goossens.ch>
|
Co-authored-by: =?UTF-8?q?Dani=C3=ABl=20Goossens?= <daniel@goossens.ch>
|
||||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||||
|
|
||||||
|
Fixed in 1.20 with new light engine
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 95c50a36dc1e03ae8ab8ca89a96d1ea56da8d94c..fbe209a66c77c47935ad026dd3e45e682af91fd8 100644
|
index 95c50a36dc1e03ae8ab8ca89a96d1ea56da8d94c..fbe209a66c77c47935ad026dd3e45e682af91fd8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
|
|
|
@ -4,7 +4,7 @@ Date: Fri, 16 Sep 2022 17:44:34 +0200
|
||||||
Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly
|
Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly
|
||||||
created worlds
|
created worlds
|
||||||
|
|
||||||
Do we need this
|
This was fixed in 1.20-pre1
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||||
index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644
|
index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644
|
||||||
|
|
|
@ -7,6 +7,8 @@ The client does not send the packet needed to received this information until a
|
||||||
despite a player having disabled listing, they are able to be seen for a brief moment. This causes the player to be listed as an Anonymous
|
despite a player having disabled listing, they are able to be seen for a brief moment. This causes the player to be listed as an Anonymous
|
||||||
Player until the actual configuration value is received from the client.
|
Player until the actual configuration value is received from the client.
|
||||||
|
|
||||||
|
Fixed by mojang in 1.20
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index c4a070d445a0d834152eb53864eb08f4f90947ca..f4526885a57b804a754ab34675649a5466db300d 100644
|
index c4a070d445a0d834152eb53864eb08f4f90947ca..f4526885a57b804a754ab34675649a5466db300d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
|
|
@ -20,19 +20,10 @@ up on this optimisation before he came along.
|
||||||
Locally this patch drops the entity tracker tick by a full 1.5x.
|
Locally this patch drops the entity tracker tick by a full 1.5x.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||||
index ed27a0eb28b39f045064432107a86efc3b5927cd..9b46c1068b7b52f735423fc255ae6e949dd5cb0b 100644
|
index 1690626b8a62e078ce23e725c0384983af9c9e23..bff8267b72f5e4a0530055ee58add657fa553dcd 100644
|
||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -48,6 +48,8 @@ import org.slf4j.Logger;
|
@@ -428,9 +428,19 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
import org.slf4j.Marker;
|
|
||||||
import org.slf4j.MarkerFactory;
|
|
||||||
|
|
||||||
+
|
|
||||||
+import io.netty.util.concurrent.AbstractEventExecutor; // Paper
|
|
||||||
public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
|
||||||
|
|
||||||
private static final float AVERAGE_PACKETS_SMOOTHING = 0.75F;
|
|
||||||
@@ -428,9 +430,19 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
|
||||||
if (this.channel.eventLoop().inEventLoop()) {
|
if (this.channel.eventLoop().inEventLoop()) {
|
||||||
this.doSendPacket(packet, callbacks, enumprotocol, enumprotocol1, flush); // Paper
|
this.doSendPacket(packet, callbacks, enumprotocol, enumprotocol1, flush); // Paper
|
||||||
} else {
|
} else {
|
||||||
|
@ -40,7 +31,7 @@ index ed27a0eb28b39f045064432107a86efc3b5927cd..9b46c1068b7b52f735423fc255ae6e94
|
||||||
+ // note: since the type is not dynamic here, we need to actually copy the old executor code
|
+ // note: since the type is not dynamic here, we need to actually copy the old executor code
|
||||||
+ // into two branches. On conflict, just re-copy - no changes were made inside the executor code.
|
+ // into two branches. On conflict, just re-copy - no changes were made inside the executor code.
|
||||||
+ if (!flush) {
|
+ if (!flush) {
|
||||||
+ AbstractEventExecutor.LazyRunnable run = () -> {
|
+ io.netty.util.concurrent.AbstractEventExecutor.LazyRunnable run = () -> {
|
||||||
+ this.doSendPacket(packet, callbacks, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter
|
+ this.doSendPacket(packet, callbacks, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter
|
||||||
+ };
|
+ };
|
||||||
+ this.channel.eventLoop().execute(run);
|
+ this.channel.eventLoop().execute(run);
|
|
@ -268,10 +268,10 @@ index 792883afe53d2b7989c25a81c2f9a639d5e21d20..c04379ca8a4db0f4de46ad2b3b338431
|
||||||
return this.threshold;
|
return this.threshold;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||||
index 1690626b8a62e078ce23e725c0384983af9c9e23..4682fd171b323c7c1294c5ce8e5dd350e9cfd93b 100644
|
index bff8267b72f5e4a0530055ee58add657fa553dcd..c45c1d519aba414557bf1a4c9260f928bd8d9b14 100644
|
||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -698,11 +698,28 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -708,11 +708,28 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
return networkmanager;
|
return networkmanager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ index 1690626b8a62e078ce23e725c0384983af9c9e23..4682fd171b323c7c1294c5ce8e5dd350
|
||||||
|
|
||||||
public boolean isEncrypted() {
|
public boolean isEncrypted() {
|
||||||
return this.encrypted;
|
return this.encrypted;
|
||||||
@@ -734,16 +751,17 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -744,16 +761,17 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
|
||||||
public void setupCompression(int compressionThreshold, boolean rejectsBadPackets) {
|
public void setupCompression(int compressionThreshold, boolean rejectsBadPackets) {
|
||||||
if (compressionThreshold >= 0) {
|
if (compressionThreshold >= 0) {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue