public void startScan(boolean start) { if (!worldObj.isRemote) { if (!start) { scanning.setValue(false); notifyBlockUpdate(); return; } int r = radius.getValue(); // Only on server int y1 = yCoord - r; if (y1 < 0) { y1 = 0; } c1.setCoordinate(new Coordinate(xCoord - r, y1, zCoord - r)); int y2 = yCoord + r; if (y2 >= worldObj.getHeight()) { y2 = worldObj.getHeight() - 1; } c2.setCoordinate(new Coordinate(xCoord + r, y2, zCoord + r)); scanning.setValue(true); cur.setCoordinate(c1.getCoordinate()); inventories.clear(); notifyBlockUpdate(); } }