use of crazypants.enderio.powertools.machine.capbank.network.EnergyReceptor in project EnderIO by SleepyTrousers.
the class TileCapBank method updateReceptors.
private void updateReceptors() {
if (network == null) {
return;
}
network.removeReceptors(receptors);
receptors.clear();
for (EnumFacing dir : EnumFacing.values()) {
IPowerInterface pi = getReceptorForFace(NullHelper.notnullJ(dir, "Enum.values()"));
if (pi != null) {
IoMode ioMode = getIoMode(NullHelper.notnullJ(dir, "Enum.values()"));
if (ioMode != IoMode.DISABLED && ioMode != IoMode.PULL) {
EnergyReceptor er = new EnergyReceptor(this, pi, NullHelper.notnullJ(dir, "Enum.values()"));
validateModeForReceptor(er);
receptors.add(er);
}
}
}
network.addReceptors(receptors);
receptorsDirty = false;
}
Aggregations