if (other instanceof VoxelBlockPosition) {
final VoxelBlockPosition o = (VoxelBlockPosition) other;
return Math.max(Math.abs(x-o.x), Math.max(Math.abs(y-o.y), Math.abs(z-o.z)));
}
if (other instanceof LayerBlockPosition) {
final LayerBlockPosition o = (LayerBlockPosition) other;
return Math.max(Math.abs(x-o.x), Math.abs(z-o.z));
}
return 0;
}