make detector work again

This commit is contained in:
Raoul Van den Berge
2016-01-02 18:41:32 +01:00
parent 5bffb80190
commit 56b9adb0a2
5 changed files with 35 additions and 19 deletions

View File

@@ -36,6 +36,14 @@ public class TileDetector extends TileMachine implements IInventory, ISidedInven
this.redstoneControlled = false;
}
@Override
public void onDisconnected()
{
super.onDisconnected();
powered = false;
}
@Override
public int getEnergyUsage()
{
@@ -101,7 +109,6 @@ public class TileDetector extends TileMachine implements IInventory, ISidedInven
if (powered != lastPowered)
{
worldObj.markBlockForUpdate(pos);
worldObj.notifyNeighborsOfStateChange(pos, StorageCraftBlocks.DETECTOR);
}
}
@@ -199,7 +206,6 @@ public class TileDetector extends TileMachine implements IInventory, ISidedInven
if (powered != lastPowered)
{
worldObj.markBlockForUpdate(pos);
worldObj.notifyNeighborsOfStateChange(pos, StorageCraftBlocks.DETECTOR);
}
}