Skip to content

Commit

Permalink
fixed transformers to hold enough eu (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC authored May 11, 2024
1 parent 2d50a4e commit 157b666
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ public void onLoad() {

public void updateEnergyContainer(boolean isTransformUp) {
long tierVoltage = GTValues.V[getTier()];
int lowAmperage = baseAmp * 4;
if (isTransformUp) {
//storage = n amp high; input = tier / 4; amperage = 4n; output = tier; amperage = n
this.energyContainer.resetBasicInfo(tierVoltage * 8L * baseAmp, tierVoltage, baseAmp * 4L, tierVoltage * 4, baseAmp);
this.energyContainer.resetBasicInfo(tierVoltage * 8L * lowAmperage, tierVoltage, lowAmperage, tierVoltage * 4, baseAmp);
energyContainer.setSideInputCondition(s -> s != getFrontFacing() && isWorkingEnabled());
energyContainer.setSideOutputCondition(s -> s == getFrontFacing() && isWorkingEnabled());
} else {
//storage = n amp high; input = tier; amperage = n; output = tier / 4; amperage = 4n
this.energyContainer.resetBasicInfo(tierVoltage * 8L * baseAmp, tierVoltage * 4, baseAmp, tierVoltage, baseAmp * 4L);
this.energyContainer.resetBasicInfo(tierVoltage * 8L * lowAmperage, tierVoltage * 4, baseAmp, tierVoltage, lowAmperage);
energyContainer.setSideInputCondition(s -> s == getFrontFacing() && isWorkingEnabled());
energyContainer.setSideOutputCondition(s -> s != getFrontFacing() && isWorkingEnabled());
}
Expand Down

0 comments on commit 157b666

Please sign in to comment.