mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-06 10:49:40 +01:00
1ab021ddca
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
Bukkit Changes:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
CraftBukkit Changes:
927200a9
#718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
31 lines
1.4 KiB
Diff
31 lines
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);
|