mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <max@themoep.de>
|
||||
Date: Mon, 19 Oct 2020 17:20:53 +0100
|
||||
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
|
||||
index 6a0ec0105399066dede622b45c9471b32c162cf6..548c62a838848a9183e14f91b21a9dc309d8a3b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -394,9 +394,9 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
// 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.
|
||||
if (flush) {
|
||||
- choice1 = () -> {
|
||||
+ choice1 = new Runnable() { public void run() { // Origami - flatten lambda
|
||||
if (enumprotocol != enumprotocol1) {
|
||||
- this.setProtocol(enumprotocol);
|
||||
+ NetworkManager.this.setProtocol(enumprotocol); // Origami - flatten lambda
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -406,7 +406,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
try {
|
||||
// Paper end
|
||||
- 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 // Origami - flatten lambda
|
||||
|
||||
|
||||
if (genericfuturelistener != null) {
|
||||
@@ -426,12 +426,12 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
packet.onPacketDispatchFinish(player, null);
|
||||
}
|
||||
// Paper end
|
||||
- };
|
||||
+ }}; // Origami - flatten lambda
|
||||
} else {
|
||||
// explicitly declare a variable to make the lambda use the type
|
||||
- choice2 = () -> {
|
||||
+ choice2 = new AbstractEventExecutor.LazyRunnable() { public void run() { // Origami - flatten lambda
|
||||
if (enumprotocol != enumprotocol1) {
|
||||
- this.setProtocol(enumprotocol);
|
||||
+ NetworkManager.this.setProtocol(enumprotocol); // Origami - flatten lambda
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -441,7 +441,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
try {
|
||||
// Paper end
|
||||
- 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 // Origami - flatten lambda
|
||||
|
||||
|
||||
if (genericfuturelistener != null) {
|
||||
@@ -461,7 +461,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
packet.onPacketDispatchFinish(player, null);
|
||||
}
|
||||
// Paper end
|
||||
- };
|
||||
+ }}; // Origami - flatten lambda
|
||||
}
|
||||
this.channel.eventLoop().execute(choice1 != null ? choice1 : choice2);
|
||||
// Tuinity end - optimise packets that are not flushed
|
||||
Reference in New Issue
Block a user