From 083e3ebd6ea77e223ca5d4dc14b27031fe778109 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sun, 3 Apr 2011 11:06:12 +0200 Subject: [PATCH] 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. --- src/main/java/net/minecraft/server/ItemInWorldManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index 090867c83b..8c4a1ae6be 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -31,7 +31,7 @@ public class ItemInWorldManager { } public void a() { - ++this.h; + this.h = (int) (System.currentTimeMillis() / 50); // CraftBukkit if (this.i) { int i = this.h - this.m; int j = this.b.getTypeId(this.j, this.k, this.l); @@ -52,7 +52,7 @@ public class ItemInWorldManager { // CraftBukkit added 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); // CraftBukkit start @@ -106,6 +106,7 @@ public class ItemInWorldManager { public void b(int i, int j, int k) { if (i == this.e && j == this.f && k == this.g) { + this.h = (int) (System.currentTimeMillis() / 50); // CraftBukkit int l = this.h - this.d; int i1 = this.b.getTypeId(i, j, k);