From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: GreenMeanie 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/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 698619c25714d6bb296084298de4f2e39f8f9c63..28714c10c2bf30fc51c591060bec87c330fc62c1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2257,6 +2257,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } + public int getMaxAirTicks() { return bD(); } // Paper - OBFHELPER public int bD() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 9972ee33433914ef9abc5075f274e58d46a9192f..8de15e4856217fb4fc4fc44d9460437e0c8c65ee 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2025,6 +2025,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.setHealth(this.getMaxHealth()); + this.setAirTicks(this.getMaxAirTicks()); // Paper this.fireTicks = 0; this.fallDistance = 0; this.foodData = new FoodMetaData(this);