pos.moveForwards(1.0);
TileEntity tile = container.getTile(o);
if (tile instanceof TileGenericPipe) {
TileGenericPipe pipe = (TileGenericPipe) tile;
if (BlockGenericPipe.isValid(pipe.pipe)) {
neighbours.add(pipe);
if (pipe.pipe.hasGate() && pipe.pipe.gate.isEmittingRedstone())
powered = true;
}
}
}
if (!powered)
powered = container.worldObj.isBlockIndirectlyGettingPowered(container.xCoord, container.yCoord, container.zCoord);
if (lastPowered != powered) {
for (TileGenericPipe pipe : neighbours) {
pipe.scheduleNeighborChange();
pipe.updateEntity();
}
}
}