mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 08:06:41 +01:00
18 lines
1,014 B
Diff
18 lines
1,014 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 2fd93f715bd69fb0217939c87f7872720a9adb7c..b4240bdd2d2baf91f52458602e0063f746dcfb6d 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -2699,6 +2699,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(this);
|