Added getLazyBlock() to Extent for performance.

This commit is contained in:
sk89q
2014-03-31 18:22:44 -07:00
parent dcf35e5312
commit fa24eb60fa
11 changed files with 224 additions and 109 deletions

View File

@ -295,17 +295,36 @@ public class EditSession implements Extent {
return changeSet.size();
}
@Override
public BaseBlock getLazyBlock(Vector position) {
return world.getLazyBlock(position);
}
@Override
public BaseBlock getBlock(Vector position) {
return world.getBlock(position);
}
@Override
/**
* Get a block type at the given position.
*
* @param position the position
* @return the block type
* @deprecated Use {@link #getLazyBlock(Vector)} or {@link #getBlock(Vector)}
*/
@Deprecated
public int getBlockType(Vector position) {
return world.getBlockType(position);
}
@Override
/**
* Get a block data at the given position.
*
* @param position the position
* @return the block data
* @deprecated Use {@link #getLazyBlock(Vector)} or {@link #getBlock(Vector)}
*/
@Deprecated
public int getBlockData(Vector position) {
return world.getBlockData(position);
}