mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-20 12:09:41 +00:00
Fix generators and solar panel not working without an adjacent GT tile (#37)
This commit is contained in:
1 parent
c07eb27064
commit
53616d5ba6
3 files changed
+3
-21
No files matched your search
@@ -336,21 +336,12 @@ public class TileEntityBaseGenerator
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (checkForGtTile() && isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
if (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) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte getColorization() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
@@ -384,21 +384,12 @@ public class TileEntitySolarBase extends TileEntityEMT implements IInventory, IW
|
||||
if (!side)
|
||||
return;
|
||||
|
||||
if (checkForGtTile() && isUniversalEnergyStored(getOutputVoltage() * getOutputAmperage())) {
|
||||
if (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) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public byte getColorization() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user