PaperMC/patches/server/0257-Reset-players-airTicks-on-respawn.patch
Spottedleaf da9d110d5b Remove chunk save reattempt patch
This patch does not appear to be doing anything useful, and may
hide errors.

Currently, the save logic does not run through this path either
so it did not do anything.

Additionally, properly implement support for handling
RegionFileSizeException in Moonrise.
2024-11-28 18:27:59 -08:00

18 lines
1,010 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: GreenMeanie <GreenMeanieMC@gmail.com>
Date: Sat, 20 Oct 2018 22:34:02 -0400
Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 419476f7ee7c55552655ef0098da0ddbc2434361..90587b5acee5c2d854604b53ef83c5f7d8c87a08 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -3052,6 +3052,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.setHealth(this.getMaxHealth());
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
+ this.setAirSupply(this.getMaxAirSupply()); // Paper - Reset players airTicks on respawn
this.setRemainingFireTicks(0);
this.fallDistance = 0;
this.foodData = new FoodData();