mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
[ci skip] Minor patch cleanup
This commit is contained in:
parent
616db7118d
commit
011caa4d8e
@ -6,7 +6,7 @@ Subject: [PATCH] Add system property to print stacktrace on bad plugin class
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..06daf7e7b9f177256a7a15b91e72ff53f89ccb68 100644
|
||||
index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..cb3c25ef46b279ffdde87f47f729eb8aa7549c1c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -162,6 +162,11 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
@ -15,7 +15,7 @@ index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..06daf7e7b9f177256a7a15b91e72ff53
|
||||
}
|
||||
+ // 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
|
||||
}
|
||||
|
@ -3,21 +3,30 @@ From: FriwiDev <friwidev@gmail.com>
|
||||
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
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9eb921fec32afa360f3a402e978411fcf3ec618c..ab3233ad8ddd5e28fdfabe981093504c36d69d76 100644
|
||||
index 9eb921fec32afa360f3a402e978411fcf3ec618c..63c9040ed2349eec500ba6e9090440347c514a3b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1564,6 +1564,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user