Fix generators and solar panel not working without an adjacent GT tile (#37)

This commit is contained in:
Vladislav Laetansky authored and GitHub committed 2022-07-31 10:33:09 +02:00
1 parent c07eb27064
commit 2ec317d9f7
3 files changed
+3 -21

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
// Add your dependencies here
dependencies {
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.40.39:dev'
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.40.81:dev'
compile 'com.github.GTNewHorizons:Baubles:1.0.1.14:dev'
compile 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
@@ -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;
}