Fetch block shapes without using updateState.

This commit is contained in:
asofold 2016-03-05 20:17:44 +01:00
parent 4221f5bf18
commit b40875060c
2 changed files with 1 additions and 7 deletions

View File

@ -61,9 +61,7 @@ public class BlockCacheCBDev extends BlockCache implements IBlockAccess{
return null;
}
final BlockPosition pos = new BlockPosition(x, y, z);
final IBlockData data = block.updateState(getType(pos), this, pos); // TODO: updateState still needed?
final AxisAlignedBB bb = block.a(data, this, pos);
final AxisAlignedBB bb = block.a(getType(pos), this, pos);
if (bb == null) {
return new double[] {0.0, 0.0, 0.0, 1.0, 1.0, 1.0}; // Special case.
//return null;

View File

@ -42,10 +42,6 @@ public class MCAccessCBDev implements MCAccess {
public MCAccessCBDev() {
// try {
getCommandMap();
if (ReflectionUtil.getMethod(Block.class, "updateState", IBlockData.class, IBlockAccess.class, BlockPosition.class).getReturnType() != IBlockData.class) {
// TODO: Check if still needed.
throw new RuntimeException();
}
if (ReflectionUtil.getMethod(Block.class, "a", IBlockData.class, IBlockAccess.class, BlockPosition.class).getReturnType() != AxisAlignedBB.class) {
throw new RuntimeException();
}