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 675ff9b2ce573439462f5554f470ffcb0a971107..6f0050bacfda342719ba93e40743983e07868e51 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2250,6 +2250,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } + public final int getMaxAirTicks() { return bG(); } // Paper - OBFHELPER public int bG() { return 300; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index ea06a264564c5cf4fef7de79e5795af13094effd..777b2f7e77d2b59d5a439252daf9d317ab82a838 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1997,6 +1997,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);