mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 20:12:23 +00:00
fixed gens outputting their amps up to 6 times (#20)
* fixed gens outputting their amps up to 6 times * change according to review
This commit is contained in:
1 parent
e4df980eac
commit
57b7e8e841
2 files changed
+21
-8
No files matched your search
@@ -379,14 +379,22 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
}
|
||||
|
||||
public void inputintoGTnet() {
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (checkForGtTile() && isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits((byte) 0, getOutputVoltage(), tEU);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkForGtTile() {
|
||||
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
|
||||
if (getIGregTechTileEntityAtSide(i) != null) {
|
||||
if (isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
long tEU = IEnergyConnected.Util.emitEnergyToNetwork(getOutputVoltage(), getOutputAmperage(), this);
|
||||
drainEnergyUnits(i, getOutputVoltage(), tEU);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte getColorization() {
|
||||
|
||||
Reference in new issue
Block a user