mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Fix patch header and comments from last commit :3
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: "Phoenix616 Date: Mon, 19 Oct 2020 17:20:53 +0100" <max@themoep.de>
|
From: Phoenix616 <max@themoep.de>
|
||||||
Date: Mon, 30 Nov 2020 06:53:44 -0600
|
Date: Mon, 19 Oct 2020 17:20:53 +0100
|
||||||
Subject: [PATCH] Origami - Fix ProtocolLib issues on Java 15
|
Subject: [PATCH] Origami - Fix ProtocolLib issues on Java 15
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 7a2a8acea9..fa71b36c0c 100644
|
index 7a2a8acea9..8a452173c0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -392,9 +392,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -392,9 +392,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
@@ -13,10 +13,10 @@ index 7a2a8acea9..fa71b36c0c 100644
|
|||||||
// 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) {
|
||||||
- choice1 = () -> {
|
- choice1 = () -> {
|
||||||
+ choice1 = new Runnable() { public void run() { // Purpur - flatten lambda
|
+ choice1 = new Runnable() { public void run() { // Origami - flatten lambda
|
||||||
if (enumprotocol != enumprotocol1) {
|
if (enumprotocol != enumprotocol1) {
|
||||||
- this.setProtocol(enumprotocol);
|
- this.setProtocol(enumprotocol);
|
||||||
+ NetworkManager.this.setProtocol(enumprotocol); // Purpur - flatten lambda
|
+ NetworkManager.this.setProtocol(enumprotocol); // Origami - flatten lambda
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -25,7 +25,7 @@ index 7a2a8acea9..fa71b36c0c 100644
|
|||||||
try {
|
try {
|
||||||
// Paper end
|
// Paper end
|
||||||
- ChannelFuture channelfuture1 = (flush) ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Tuinity - add flush parameter
|
- ChannelFuture channelfuture1 = (flush) ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Tuinity - add flush parameter
|
||||||
+ ChannelFuture channelfuture1 = (flush) ? NetworkManager.this.channel.writeAndFlush(packet) : NetworkManager.this.channel.write(packet); // Tuinity - add flush parameter // Purpur - flatten lambda
|
+ ChannelFuture channelfuture1 = (flush) ? NetworkManager.this.channel.writeAndFlush(packet) : NetworkManager.this.channel.write(packet); // Tuinity - add flush parameter // Origami - flatten lambda
|
||||||
|
|
||||||
|
|
||||||
if (genericfuturelistener != null) {
|
if (genericfuturelistener != null) {
|
||||||
@@ -34,14 +34,14 @@ index 7a2a8acea9..fa71b36c0c 100644
|
|||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
- };
|
- };
|
||||||
+ }}; // Purpur - flatten lambda
|
+ }}; // Origami - flatten lambda
|
||||||
} else {
|
} else {
|
||||||
// explicitly declare a variable to make the lambda use the type
|
// explicitly declare a variable to make the lambda use the type
|
||||||
- choice2 = () -> {
|
- choice2 = () -> {
|
||||||
+ choice2 = new AbstractEventExecutor.LazyRunnable() { public void run() { // Purpur - flatten lambda
|
+ choice2 = new AbstractEventExecutor.LazyRunnable() { public void run() { // Origami - flatten lambda
|
||||||
if (enumprotocol != enumprotocol1) {
|
if (enumprotocol != enumprotocol1) {
|
||||||
- this.setProtocol(enumprotocol);
|
- this.setProtocol(enumprotocol);
|
||||||
+ NetworkManager.this.setProtocol(enumprotocol); // Purpur - flatten lambda
|
+ NetworkManager.this.setProtocol(enumprotocol); // Origami - flatten lambda
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -50,7 +50,7 @@ index 7a2a8acea9..fa71b36c0c 100644
|
|||||||
try {
|
try {
|
||||||
// Paper end
|
// Paper end
|
||||||
- ChannelFuture channelfuture1 = (flush) ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Tuinity - add flush parameter
|
- ChannelFuture channelfuture1 = (flush) ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Tuinity - add flush parameter
|
||||||
+ ChannelFuture channelfuture1 = (flush) ? NetworkManager.this.channel.writeAndFlush(packet) : NetworkManager.this.channel.write(packet); // Tuinity - add flush parameter // Purpur - flatten lambda
|
+ ChannelFuture channelfuture1 = (flush) ? NetworkManager.this.channel.writeAndFlush(packet) : NetworkManager.this.channel.write(packet); // Tuinity - add flush parameter // Origami - flatten lambda
|
||||||
|
|
||||||
|
|
||||||
if (genericfuturelistener != null) {
|
if (genericfuturelistener != null) {
|
||||||
@@ -59,7 +59,7 @@ index 7a2a8acea9..fa71b36c0c 100644
|
|||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
- };
|
- };
|
||||||
+ }}; // Purpur - flatten lambda
|
+ }}; // Origami - flatten lambda
|
||||||
}
|
}
|
||||||
this.channel.eventLoop().execute(choice1 != null ? choice1 : choice2);
|
this.channel.eventLoop().execute(choice1 != null ? choice1 : choice2);
|
||||||
// Tuinity end - optimise packets that are not flushed
|
// Tuinity end - optimise packets that are not flushed
|
||||||
|
|||||||
Reference in New Issue
Block a user