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/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java index b63a8ac9bae50494fd8e093ff163df961d779c2d..f05f24f2a5c4ba8dbb8572d113afc404259e73ed 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java @@ -2152,6 +2152,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); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index 4d7bb023092ee118d68ecce1918e220f541b33c1..1f5ab7d43315fa3a67297eabea3bda257ed24a44 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2349,6 +2349,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } + public final int getMaxAirTicks() { return bH(); } // Paper - OBFHELPER public int bH() { return 300; }