diff options
author | Gerrygames <[email protected]> | 2019-11-24 07:36:20 +0100 |
---|---|---|
committer | Zach <[email protected]> | 2019-11-24 00:36:20 -0600 |
commit | 23e53aab97466adb42c46d16ad3b5ff26254d1bd (patch) | |
tree | 8fdeed6d9447e8b22a4469871345cc41811735df | |
parent | 45089d59f0ce6d908acd7d972c97846b2c4479eb (diff) | |
download | Paper-23e53aab97466adb42c46d16ad3b5ff26254d1bd.tar.gz Paper-23e53aab97466adb42c46d16ad3b5ff26254d1bd.zip |
Backport MC-160177 fix from 1.15 (#2702)
-rw-r--r-- | Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch b/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch new file mode 100644 index 0000000000..7a2342f9c5 --- /dev/null +++ b/Spigot-Server-Patches/0423-Backport-MC-160177-fix-from-1.15.patch @@ -0,0 +1,34 @@ +From 5b2cfa47f19b2dfb4aeb6af81cc7309de224ff27 Mon Sep 17 00:00:00 2001 +From: Gerrygames <[email protected]> +Date: Thu, 21 Nov 2019 14:56:51 +0100 +Subject: [PATCH] Backport MC-160177 fix from 1.15 + + +diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java +index bc03a82b..c77e812b 100644 +--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java ++++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java +@@ -86,14 +86,17 @@ public class PlayerInteractManager { + this.l = -1; + this.e = false; + } else { +- this.a(iblockdata, this.g); ++ this.a(iblockdata, this.g, this.lastDigTick); // Paper - pass lastDigTick as an argument + } + } + + } + +- private float a(IBlockData iblockdata, BlockPosition blockposition) { +- int i = this.currentTick - this.k; ++ // Paper start - Add startTick parameter and use it ++ private float a(IBlockData iblockdata, BlockPosition blockposition) { return this.a(iblockdata, blockposition, this.k); } ++ private float a(IBlockData iblockdata, BlockPosition blockposition, int startTick) { ++ int i = this.currentTick - startTick; ++ // Paper end + float f = iblockdata.getDamage(this.player, this.player.world, blockposition) * (float) (i + 1); + int j = (int) (f * 10.0F); + +-- +2.24.0 + |