summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-04-03 11:06:12 +0200
committerErik Broes <erikbroes@grum.nl>2011-04-03 11:06:12 +0200
commit083e3ebd6ea77e223ca5d4dc14b27031fe778109 (patch)
tree0d2d215d8d7e0ac8e956a16ebeb82fc4963bf519 /src/main/java/net
parent121bcd5adc5b653ccc59be6ecac2b72ed29397ee (diff)
downloadcraftbukkit-083e3ebd6ea77e223ca5d4dc14b27031fe778109.tar
craftbukkit-083e3ebd6ea77e223ca5d4dc14b27031fe778109.tar.gz
craftbukkit-083e3ebd6ea77e223ca5d4dc14b27031fe778109.tar.lz
craftbukkit-083e3ebd6ea77e223ca5d4dc14b27031fe778109.tar.xz
craftbukkit-083e3ebd6ea77e223ca5d4dc14b27031fe778109.zip
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.
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/ItemInWorldManager.java5
1 files 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 090867c8..8c4a1ae6 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);