mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Base digging/blockbreaks on actual time rather than the servers tickrate.
Servers under high load suffer from tick-time degradation as severe as 1 tick taking 0.25s (rather than 0.05s). This will failing blockbreaks.
This commit is contained in:
parent
121bcd5adc
commit
083e3ebd6e
@ -31,7 +31,7 @@ public class ItemInWorldManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a() {
|
public void a() {
|
||||||
++this.h;
|
this.h = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||||
if (this.i) {
|
if (this.i) {
|
||||||
int i = this.h - this.m;
|
int i = this.h - this.m;
|
||||||
int j = this.b.getTypeId(this.j, this.k, this.l);
|
int j = this.b.getTypeId(this.j, this.k, this.l);
|
||||||
@ -52,7 +52,7 @@ public class ItemInWorldManager {
|
|||||||
|
|
||||||
// CraftBukkit added face
|
// CraftBukkit added face
|
||||||
public void a(int i, int j, int k, int face) {
|
public void a(int i, int j, int k, int face) {
|
||||||
this.d = this.j;
|
this.d = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||||
int l = this.b.getTypeId(i, j, k);
|
int l = this.b.getTypeId(i, j, k);
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -106,6 +106,7 @@ public class ItemInWorldManager {
|
|||||||
|
|
||||||
public void b(int i, int j, int k) {
|
public void b(int i, int j, int k) {
|
||||||
if (i == this.e && j == this.f && k == this.g) {
|
if (i == this.e && j == this.f && k == this.g) {
|
||||||
|
this.h = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||||
int l = this.h - this.d;
|
int l = this.h - this.d;
|
||||||
int i1 = this.b.getTypeId(i, j, k);
|
int i1 = this.b.getTypeId(i, j, k);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user