Skip to content

Commit 41131e0

Browse files
committed
add tank scaling function back
1 parent 9a54894 commit 41131e0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

docs/content/Modpacks/Changes/v8.0.0.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ The constructors for a large number of machines have changed in order to simply
6565
- `int exportSlots` Same as above, but for item export slots.
6666
- `int fluidImportSlots` As above, but for fluid import slots.
6767
- `int fluidExportSlots` As above, but for fluid export slots.
68-
- `int fluidImportTankSize` Capacity of the fluid import tank
69-
- `int fluidExportTankSize` Capacity of the fluid export tank.
70-
- The standard `WorkableTieredMachine(BlockEntityCreationInfo info, int tier, Int2IntFunction tankScalingFunction)` remains.
68+
- `Int2IntFunction tankScalingFunction` Fluid tank capacity scaling function.
7169
#### `WorkableMultiblockMachine`, `WorkableElectricMultiblockMachine` and `SteamWorkableMachine`
7270
- Removed `createRecipeLogic` method
7371
- Constructor now has an optional `Supplier<RecipeLogic>` argument, defaults to the standard `RecipeLogic` class

src/main/java/com/gregtechceu/gtceu/api/machine/WorkableTieredMachine.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public abstract class WorkableTieredMachine extends TieredEnergyMachine implemen
6565
protected boolean previouslyMuffled = true;
6666

6767
public WorkableTieredMachine(BlockEntityCreationInfo info, int tier, Function<WorkableTieredMachine, RecipeLogic> recipeLogicSupplier, int importSlots, int exportSlots,
68-
int fluidImportSlots, int fluidExportSlots, int fluidImportTankSize, int fluidExportTankSize) {
68+
int fluidImportSlots, int fluidExportSlots, Int2IntFunction tankScalingFunction) {
6969
super(info, tier);
7070
this.overclockTier = getMaxOverclockTier();
7171
this.recipeTypes = getDefinition().getRecipeTypes();
@@ -76,8 +76,8 @@ public WorkableTieredMachine(BlockEntityCreationInfo info, int tier, Function<Wo
7676
this.recipeLogic = recipeLogicSupplier.apply(this);
7777
this.importItems = new NotifiableItemStackHandler(this, importSlots, IO.IN);
7878
this.exportItems = new NotifiableItemStackHandler(this, exportSlots, IO.OUT);
79-
this.importFluids = new NotifiableFluidTank(this, fluidImportSlots, fluidImportTankSize, IO.IN);
80-
this.exportFluids = new NotifiableFluidTank(this, fluidExportSlots, fluidExportTankSize, IO.OUT);
79+
this.importFluids = new NotifiableFluidTank(this, fluidImportSlots, tankScalingFunction.applyAsInt(getTier()), IO.IN);
80+
this.exportFluids = new NotifiableFluidTank(this, fluidExportSlots, tankScalingFunction.applyAsInt(getTier()), IO.OUT);
8181
this.importComputation = new NotifiableComputationContainer(this, IO.IN, true);
8282
this.exportComputation = new NotifiableComputationContainer(this, IO.OUT, false);
8383
}

0 commit comments

Comments
 (0)