From ad03c228224e345cabc8c5134753029acba5f072 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 3 Oct 2022 19:07:03 +0200 Subject: [PATCH] [ci skip] Minor patch cleanup --- ...roperty-to-print-stacktrace-on-bad-plugi.patch | 2 +- patches/server/Fix-nothing-mlg.patch | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/patches/api/Add-system-property-to-print-stacktrace-on-bad-plugi.patch b/patches/api/Add-system-property-to-print-stacktrace-on-bad-plugi.patch index 09e4e127a3..b724857c38 100644 --- a/patches/api/Add-system-property-to-print-stacktrace-on-bad-plugi.patch +++ b/patches/api/Add-system-property-to-print-stacktrace-on-bad-plugi.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // Paper start + if (Boolean.getBoolean("Paper.printStacktraceOnBadPluginClassAccess")) { -+ new Exception().printStackTrace(); ++ (plugin != null ? plugin.getLogger() : loader.server.getLogger()).log(Level.WARNING, "Stacktrace", new Exception()); + } + // Paper end } diff --git a/patches/server/Fix-nothing-mlg.patch b/patches/server/Fix-nothing-mlg.patch index b1a974dee8..38949a2874 100644 --- a/patches/server/Fix-nothing-mlg.patch +++ b/patches/server/Fix-nothing-mlg.patch @@ -3,9 +3,18 @@ From: FriwiDev Date: Mon, 3 Oct 2022 18:16:30 +0200 Subject: [PATCH] Fix nothing mlg -The issue here is that when jumping and sneaking right before the end of a long fall, the client will send incorrect move packets resulting in a teleport back. Due to this, the move packet (impact) of the player will not be considered for fall damage. The following move packet to the impact packet will have a positive y-value again due to the player jumping, resulting in a fall damage reset. +The issue here is that when jumping and sneaking right before +the end of a long fall, the client will send incorrect move +packets resulting in a teleport back. Due to this, the move +packet (impact) of the player will not be considered for fall +damage. The following move packet to the impact packet will +have a positive y-value again due to the player jumping, +resulting in a fall damage reset. -Solution: Apply fall damage also while moving wrongly, but supply the real values the player sent to the damage calculation. This will not have any real negative effect, as the doCheckFallDamage method is meant to be called repeatedly anyway. +Solution: Apply fall damage also while moving wrongly, but +supply the real values the player sent to the damage calculation. +This will not have any real negative effect, as the +doCheckFallDamage method is meant to be called repeatedly anyway. Mojira-ID: MC-255653 @@ -17,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. -+ this.player.doCheckFallDamage(this.player.getY() - d6, packet.isOnGround()); // Paper - fix nothing mlg (sneaking and jumping before impact) ++ this.player.doCheckFallDamage(this.player.getY() - prevY, packet.isOnGround()); // Paper - fix nothing mlg (sneaking and jumping before impact) } else { // CraftBukkit start - fire PlayerMoveEvent // Rest to old location first