mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Backport MC-160177 fix from 1.15 (#2702)
This commit is contained in:
parent
c253bfac09
commit
0c1f975a3e
1 changed files with 32 additions and 0 deletions
32
Spigot-Server-Patches/Backport-MC-160177-fix-from-1.15.patch
Normal file
32
Spigot-Server-Patches/Backport-MC-160177-fix-from-1.15.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Gerrygames <gecam59@gmail.com>
|
||||
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
|
||||
@@ -0,0 +0,0 @@ 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);
|
||||
|
||||
--
|
Loading…
Reference in a new issue