From 3c6f46936e40f51c178b80a45a7a5c71fbce8d3f Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Thu, 30 May 2019 18:46:47 +0300 Subject: [PATCH 1/3] Set connection thottle to -1 when Velocity IP forwarding is enabled --- ...9-Add-Velocity-IP-Forwarding-Support.patch | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Spigot-Server-Patches/0379-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0379-Add-Velocity-IP-Forwarding-Support.patch index aee75b6bcb..058660bfb4 100644 --- a/Spigot-Server-Patches/0379-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0379-Add-Velocity-IP-Forwarding-Support.patch @@ -1,4 +1,4 @@ -From 7391eed7fedeca7fd017eb73112b6c04c6cdf240 Mon Sep 17 00:00:00 2001 +From 4e3d2985cd44fe975955a20a3c1b6c54a733a8d4 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 8 Oct 2018 14:36:14 -0400 Subject: [PATCH] Add Velocity IP Forwarding Support @@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13 login plugin message packet. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index e4972e30ce..cac79686d8 100644 +index e4972e30c..cac79686d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -8,6 +8,7 @@ import java.io.IOException; @@ -55,7 +55,7 @@ index e4972e30ce..cac79686d8 100644 } diff --git a/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java new file mode 100644 -index 0000000000..fdd8708f97 +index 000000000..fdd8708f9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java @@ -0,0 +1,67 @@ @@ -127,7 +127,7 @@ index 0000000000..fdd8708f97 + } +} diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index c5801122dd..ca76f2a380 100644 +index c5801122d..ca76f2a38 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener, ITickable { @@ -203,7 +203,7 @@ index c5801122dd..ca76f2a380 100644 } diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 4c1110479c..c536979140 100644 +index 4c1110479..c53697914 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -46,7 +46,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -216,7 +216,7 @@ index 4c1110479c..c536979140 100644 public java.util.UUID spoofedUUID; public com.mojang.authlib.properties.Property[] spoofedProfile; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index b95836d443..621aad1503 100644 +index b95836d44..621aad150 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -140,6 +140,7 @@ public class PacketDataSerializer extends ByteBuf { @@ -244,7 +244,7 @@ index b95836d443..621aad1503 100644 int j = this.g(); diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java -index bdac03da43..430445cc6d 100644 +index bdac03da4..430445cc6 100644 --- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java @@ -4,8 +4,8 @@ import java.io.IOException; @@ -259,7 +259,7 @@ index bdac03da43..430445cc6d 100644 public PacketLoginInCustomPayload() {} diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java -index 345843a7f2..23c96f44b3 100644 +index 345843a7f..23c96f44b 100644 --- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java +++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java @@ -10,6 +10,14 @@ public class PacketLoginOutCustomPayload implements Packet Date: Sun, 2 Jun 2019 21:49:14 -0500 Subject: [PATCH 2/3] Backport MC-114618 - EntityAreaEffectCloud negative size fix --- ...tityAreaEffectCloud-from-going-negat.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Spigot-Server-Patches/0441-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch diff --git a/Spigot-Server-Patches/0441-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0441-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch new file mode 100644 index 0000000000..f21b30969b --- /dev/null +++ b/Spigot-Server-Patches/0441-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch @@ -0,0 +1,43 @@ +From 2574fc84c5d9bfa168cb11c47bdc30a7d73f3696 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Sun, 2 Jun 2019 21:12:42 -0500 +Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative + + +diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java +index b2814c0e..13d749af 100644 +--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java ++++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java +@@ -158,6 +158,12 @@ public class EntityAreaEffectCloud extends Entity { + super.tick(); + boolean flag = this.l(); + float f = this.getRadius(); ++ // Paper start - fix MC-114618 ++ if (f < 0.5F) { ++ this.die(); ++ return; ++ } ++ // Paper end + + if (this.world.isClientSide) { + ParticleParam particleparam = this.getParticle(); +@@ -227,10 +233,12 @@ public class EntityAreaEffectCloud extends Entity { + + if (this.radiusPerTick != 0.0F) { + f += this.radiusPerTick; +- if (f < 0.5F) { +- this.die(); +- return; +- } ++ // Paper start - moved up - fix MC-114618 ++ //if (f < 0.5F) { ++ // this.die(); ++ // return; ++ //} ++ // Paper end + + this.setRadius(f); + } +-- +2.21.0 + From a0a6ab18b7519c1534e9e4e5c8c349c77fe57b50 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 10 Jun 2019 09:52:34 +0100 Subject: [PATCH 3/3] Catch exceptions from dispenser entity spawns --- ...eptions-from-dispenser-entity-spawns.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch new file mode 100644 index 0000000000..a5b54f317a --- /dev/null +++ b/Spigot-Server-Patches/0441-Catch-exceptions-from-dispenser-entity-spawns.patch @@ -0,0 +1,27 @@ +From 4aaab5e21ab07136668aa409b8e2a2691c4f1c2b Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Mon, 10 Jun 2019 09:36:40 +0100 +Subject: [PATCH] Catch exceptions from dispenser entity spawns + + +diff --git a/src/main/java/net/minecraft/server/DispenserRegistry.java b/src/main/java/net/minecraft/server/DispenserRegistry.java +index f9d5489b7b..d564564420 100644 +--- a/src/main/java/net/minecraft/server/DispenserRegistry.java ++++ b/src/main/java/net/minecraft/server/DispenserRegistry.java +@@ -143,7 +143,13 @@ public class DispenserRegistry { + } + + if (entitytypes != null) { ++ try { // Paper + entitytypes.a(isourceblock.getWorld(), itemstack, (EntityHuman) null, isourceblock.getBlockPosition().shift(enumdirection), enumdirection != EnumDirection.UP, false); ++ // Paper start ++ } catch (Exception ex){ ++ MinecraftServer.LOGGER.warn("An exception occurred dispensing entity at {}[{}]", world.getWorld().getName(), isourceblock.getBlockPosition(), ex); ++ } ++ // Paper end + } + + // itemstack.subtract(1); // Handled during event processing +-- +2.21.0 +