use of crazypants.enderio.conduits.conduit.item.ItemConduit in project EnderIO by SleepyTrousers.
the class TileInventoryPanel method scanNetwork.
private void scanNetwork() {
EnumFacing facingDir = getFacing();
EnumFacing backside = facingDir.getOpposite();
ItemConduitNetwork icn = null;
BlockPos p = pos.offset(backside);
TileEntity te = world.getTileEntity(p);
if (te instanceof TileConduitBundle) {
TileConduitBundle teCB = (TileConduitBundle) te;
ItemConduit conduit = teCB.getConduit(ItemConduit.class);
if (conduit != null) {
icn = (ItemConduitNetwork) conduit.getNetwork();
}
}
if (icn != null) {
dbServer = icn.getDatabase();
dbServer.sendChangeLogs();
refuelPower(dbServer);
if (active != dbServer.isOperational()) {
active = dbServer.isOperational();
updateClients = true;
}
} else {
if (active) {
updateClients = true;
}
dbServer = null;
active = false;
}
}
Aggregations