Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Srdjan-V committed Apr 19, 2024
1 parent e3fdb9a commit 942c56f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import com.cleanroommc.groovyscript.api.GroovyLog;
import flaxbeard.immersivepetroleum.api.crafting.PumpjackHandler;
import io.github.srdjanv.tweakedpetroleum.api.crafting.TweakedPumpjackHandler;
import io.github.srdjanv.tweakedpetroleum.api.mixins.ITweakedPetReservoirType;
import io.github.srdjanv.tweakedpetroleum.common.compat.groovy.VirtualizedReservoirRegistry;
import io.github.srdjanv.tweakedpetroleum.util.ReservoirValidation;
import io.github.srdjanv.tweakedpetroleumgas.api.mixins.ITweakedGasReservoirType;
import mekanism.api.gas.GasStack;

import java.util.Arrays;
import java.util.function.BiFunction;

public class GasReservoir extends VirtualizedReservoirRegistry<
Expand Down Expand Up @@ -41,7 +39,7 @@ public GasReservoirBuilder gas(GasStack gas) {
@Override
public boolean validate() {
GroovyLog.Msg msg = GroovyLog.msg("Error adding custom gas reservoir").error();
ReservoirValidation.validateReservoir(msg::add, name, gas, minSize, maxSize, replenishRate, pumpSpeed, weight, powerTier, drainChance,
ReservoirValidation.validateReservoir(msg::add, name, gas, minSize, maxSize, replenishRate, pumpSpeed, weight, powerTier, drainChance.floatValue(),
biomeBlacklist == null ? null : biomeBlacklist.toArray(new String[]{}), biomeWhitelist == null ? null : biomeWhitelist.toArray(new String[]{}));

return !msg.postIfNotEmpty();
Expand All @@ -53,7 +51,7 @@ public GasReservoirWrapper register() {
ITweakedGasReservoirType res = (ITweakedGasReservoirType)
new PumpjackHandler.ReservoirType(name, gas.getGas().getName(), minSize, maxSize, replenishRate);

res.setDrainChance(drainChance);
res.setDrainChance(drainChance.floatValue());
res.setPumpSpeed(pumpSpeed);
res.setPowerTier(powerTier);
res.setReservoirContent(TweakedPumpjackHandler.ReservoirContent.GAS);
Expand Down

0 comments on commit 942c56f

Please sign in to comment.