@Override
public int getRedstoneValue(World world, int x, int y, int z, int sensorRange, String textBoxText){
TileEntity te = world.getTileEntity(x, y, z);
if(te instanceof TileEntityUniversalSensor) {
TileEntityUniversalSensor teUs = (TileEntityUniversalSensor)te;
for(int i = TileEntityUniversalSensor.UPGRADE_SLOT_1; i <= TileEntityUniversalSensor.UPGRADE_SLOT_4; i++) {
if(teUs.getStackInSlot(i) != null && teUs.getStackInSlot(i).getItem() == Itemss.GPSTool && teUs.getStackInSlot(i).hasTagCompound()) {
NBTTagCompound gpsTag = teUs.getStackInSlot(i).getTagCompound();
int toolX = gpsTag.getInteger("x");
int toolY = gpsTag.getInteger("y");
int toolZ = gpsTag.getInteger("z");
if(Math.abs(toolX - x) <= sensorRange && Math.abs(toolY - y) <= sensorRange && Math.abs(toolZ - z) <= sensorRange) {
return coordinateSensor.getRedstoneValue(world, x, y, z, sensorRange, textBoxText, toolX, toolY, toolZ);