Optimized blockCache, now only stores blocks asked for

This commit is contained in:
Erik Broes
2011-01-30 20:19:56 +01:00
parent da00e2e3a9
commit 6c60b54fdf
3 changed files with 35 additions and 27 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));
}
}