use of binnie.extrabees.circuit.StimulatorCircuit in project Binnie by ForestryMC.
the class AlvearyLogicStimulator method updateServer.
@Override
public void updateServer(TileEntityExtraBeesAlvearyPart tile) {
this.modifiers = this.getCircuits();
this.powerUsage = 0;
for (final StimulatorCircuit beeMod : this.modifiers) {
this.powerUsage += beeMod.getPowerUsage();
}
this.powered = energyStorage.extractEnergy(powerUsage, true) >= powerUsage;
}
use of binnie.extrabees.circuit.StimulatorCircuit in project Binnie by ForestryMC.
the class AlvearyLogicStimulator method getCircuits.
public StimulatorCircuit[] getCircuits() {
final ICircuitBoard board = this.getHiveFrame();
if (board == null) {
return new StimulatorCircuit[0];
}
final ICircuit[] circuits = board.getCircuits();
final List<StimulatorCircuit> mod = new ArrayList<>();
for (final ICircuit circuit : circuits) {
if (circuit instanceof StimulatorCircuit) {
mod.add((StimulatorCircuit) circuit);
}
}
return mod.toArray(new StimulatorCircuit[0]);
}
Aggregations