Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Fixed players dying of fall damage when changing dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Tri0de committed Oct 13, 2020
1 parent 2f9e114 commit 3ac8499
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ public void onSetPlayerLocation(double x, double y, double z, float yaw, float p
private void preProcessPlayer(final CPacketPlayer packetPlayer, final CallbackInfo info) {
// Don't run any of this code on the network thread!
if (this.player.getServerWorld().isCallingFromMinecraftThread()) {
// This fixes players dying of fall damage when changing dimensions
if (this.player.isInvulnerableDimensionChange()) {
return;
}
final PlayerMovementData addedPlayerMovementData = IHasPlayerMovementData.class.cast(packetPlayer).getPlayerMovementData();
final World world = player.world;

Expand Down

0 comments on commit 3ac8499

Please sign in to comment.