Skip to content

Commit

Permalink
return default energy container in ARL
Browse files Browse the repository at this point in the history
remove redundant methods
  • Loading branch information
ghzdude committed Jan 20, 2025
1 parent abf09de commit fcff27d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ protected long getEnergyCapacity() {
return getEnergyContainer().getEnergyCapacity();
}

protected abstract IEnergyContainer getEnergyContainer();
protected IEnergyContainer getEnergyContainer() {
return IEnergyContainer.DEFAULT;
}

/**
* Draw energy from the energy container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public long getMaxVoltage() {
@Override
protected IEnergyContainer getEnergyContainer() {
GTLog.logger.error("Large Boiler called getEnergyContainer(), this should not be possible!");
return IEnergyContainer.DEFAULT;
return super.getEnergyContainer();
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gregtech.api.capability.impl;

import gregtech.api.GTValues;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.metatileentity.multiblock.RecipeMapPrimitiveMultiblockController;
import gregtech.api.recipes.RecipeMap;
import gregtech.api.recipes.logic.OCParams;
Expand Down Expand Up @@ -34,11 +33,6 @@ protected long getEnergyCapacity() {
return Integer.MAX_VALUE;
}

@Override
protected IEnergyContainer getEnergyContainer() {
return IEnergyContainer.DEFAULT;
}

@Override
protected boolean drawEnergy(long recipeEUt, boolean simulate) {
return true; // spoof energy being drawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import gregtech.api.GTValues;
import gregtech.api.capability.GregtechDataCodes;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.capability.IVentable;
import gregtech.api.damagesources.DamageSources;
import gregtech.api.metatileentity.MetaTileEntity;
Expand Down Expand Up @@ -216,11 +215,6 @@ protected long getEnergyCapacity() {
return (long) Math.floor(steamFluidTank.getCapacity() * conversionRate);
}

@Override
protected IEnergyContainer getEnergyContainer() {
return IEnergyContainer.DEFAULT;
}

@Override
protected boolean drawEnergy(long recipeEUt, boolean simulate) {
int resultDraw = GTUtility.safeCastLongToInt((long) Math.ceil(recipeEUt / conversionRate));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package gregtech.api.capability.impl;

import gregtech.api.GTValues;
import gregtech.api.capability.IEnergyContainer;
import gregtech.api.capability.IMultipleTankHandler;
import gregtech.api.metatileentity.multiblock.RecipeMapSteamMultiblockController;
import gregtech.api.recipes.Recipe;
Expand Down Expand Up @@ -48,11 +47,6 @@ public IFluidTank getSteamFluidTankCombined() {
return steamFluidTankCombined;
}

@Override
protected IEnergyContainer getEnergyContainer() {
return IEnergyContainer.DEFAULT;
}

@Override
protected IItemHandlerModifiable getInputInventory() {
RecipeMapSteamMultiblockController controller = (RecipeMapSteamMultiblockController) metaTileEntity;
Expand Down

0 comments on commit fcff27d

Please sign in to comment.