Optimized blockCache, now only stores blocks asked for

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot
2011-01-30 20:19:56 +01:00
parent 922b141e94
commit 71abdb0010
2 changed files with 18 additions and 12 deletions

View File

@@ -346,9 +346,13 @@ public class CraftBlock implements Block {
return world.getHandle().p(x, y, z);
}
public void update() {
type = world.getHandle().getTypeId(x, y, z);
data = (byte)world.getHandle().getData(x, y, z);
public void update(int type, byte data) {
this.type = type;
this.data = data;
light = (byte)world.getHandle().j(x, y, z);
}
public void update() {
this.update( world.getHandle().getTypeId(x, y, z), (byte)world.getHandle().getData(x, y, z));
}
}