mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-06-26 06:14:42 +02:00
Fetch block shapes without using updateState.
This commit is contained in:
parent
4221f5bf18
commit
b40875060c
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user