geforkt von Mirrors/Paper
20fc1b5c2a
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes:049120068
SPIGOT-6101: Store persist state of entities0de8365dd
SPIGOT-6103: Summoning an Eye of Ender throw an Error Spigot Changes: b5a13e6d Rebuild patches
31 Zeilen
1.4 KiB
Diff
31 Zeilen
1.4 KiB
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/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index f6ad53b71c6d545a5989364516b8f2b17cfe7a63..47c0fd89a82d91dc6083f9600ac6889e2b27234b 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2253,6 +2253,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 d1f716067e6c71f523c7561b9ef92f4296d1a726..01d679cfa6ad8f5dc5bb4539197a59cb00c65337 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);
|