2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-10-22 19:25:48 +00:00
|
|
|
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
|
|
|
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
|
|
|
Subject: [PATCH] Reset players airTicks on respawn
|
|
|
|
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
2021-04-22 01:31:45 +00:00
|
|
|
index 46d1e766e234bf49d31583e9e59aeb33c719b1ec..fbc0c81bb7e87f7820325a9a7bb39123db272845 100644
|
2021-03-16 07:19:45 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
2021-04-22 01:31:45 +00:00
|
|
|
@@ -2153,6 +2153,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2018-10-22 19:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
this.setHealth(this.getMaxHealth());
|
|
|
|
+ this.setAirTicks(this.getMaxAirTicks()); // Paper
|
|
|
|
this.fireTicks = 0;
|
|
|
|
this.fallDistance = 0;
|
|
|
|
this.foodData = new FoodMetaData(this);
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
2021-04-22 01:31:45 +00:00
|
|
|
index b6b4eb9ac883cfdfab5f114767fb5cfb29445730..0b61d03506bd56cf7e373daacbf4fb2e29bb0a58 100644
|
2021-03-16 07:19:45 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2021-03-16 13:04:28 +00:00
|
|
|
@@ -2350,6 +2350,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
2021-03-16 07:19:45 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public final int getMaxAirTicks() { return bH(); } // Paper - OBFHELPER
|
|
|
|
public int bH() {
|
|
|
|
return 300;
|
|
|
|
}
|