From e8b7718afea61ab7e0f14a5f3be2a70863d4b3ba 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 --- .../Add-Velocity-IP-Forwarding-Support.patch | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch index 7a0985fec..5d6ddc7f4 100644 --- a/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/Add-Velocity-IP-Forwarding-Support.patch @@ -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 @@ -0,0 +0,0 @@ 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 +0,0 @@ @@ -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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 @@ -0,0 +0,0 @@ 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 | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch diff --git a/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch new file mode 100644 index 000000000..a05fc58a7 --- /dev/null +++ b/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 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 +@@ -0,0 +0,0 @@ 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(); +@@ -0,0 +0,0 @@ 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); + } +-- \ No newline at end of file From 48f6e45addd249d55555d9b43b8a998fb12a4087 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 | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Spigot-Server-Patches/Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/Catch-exceptions-from-dispenser-entity-spawns.patch new file mode 100644 index 000000000..0d1cc3ef5 --- /dev/null +++ b/Spigot-Server-Patches/Catch-exceptions-from-dispenser-entity-spawns.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 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 +@@ -0,0 +0,0 @@ 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 +-- \ No newline at end of file