geforkt von Mirrors/Paper
19 Zeilen
980 B
Diff
19 Zeilen
980 B
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/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
index 6624fd85fc8b5efc22b71f7aa665bd8f62aad7ed..4b163b9f6f6abc89ed62291e8df80d987bdc46e3 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -2560,6 +2560,7 @@ public class ServerPlayer extends Player {
|
|
|
|
this.setHealth(this.getMaxHealth());
|
|
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
|
|
+ this.setAirSupply(this.getMaxAirSupply()); // Paper - Reset players airTicks on respawn
|
|
this.setRemainingFireTicks(0);
|
|
this.fallDistance = 0;
|
|
this.foodData = new FoodData(this);
|