aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0257-Reset-players-airTicks-on-respawn.patch
blob: f5b4175d657fa8cc5a7b9c1a6064dfe2fa394489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 e73377782c388c9f750f0548f3c427bc52246fbc..d54213bab1099bb96c8175f0c03a1b034cc41ce2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -3032,6 +3032,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();