Skip to content

Commit

Permalink
Fix free energy from diesel generators filled with water (#5870)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-pandoran committed Apr 20, 2024
1 parent 4fb82bb commit 52717ab
Showing 1 changed file with 8 additions and 7 deletions.
Expand Up @@ -78,14 +78,15 @@ public void tickServer(IMultiblockContext<State> context)
.map(CapabilityReference::getNullable)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if(!presentOutputs.isEmpty()&&EnergyHelper.distributeFlux(presentOutputs, output, false) < output)
state.consumeTick--;
if(state.consumeTick <= 0) //Consume 10*tick-amount every 10ticks to allow for 1/10th mB amounts
GeneratorFuel recipe = state.recipeGetter.apply(
context.getLevel().getRawLevel(), state.tank.getFluid().getFluid()
);
if(recipe != null &&
!presentOutputs.isEmpty() &&
EnergyHelper.distributeFlux(presentOutputs, output, false) < output)
{
GeneratorFuel recipe = state.recipeGetter.apply(
context.getLevel().getRawLevel(), state.tank.getFluid().getFluid()
);
if(recipe!=null)
state.consumeTick--;
if(state.consumeTick <= 0) //Consume 10*tick-amount every 10ticks to allow for 1/10th mB amounts
{
int burnTime = recipe.getBurnTime();
int fluidConsumed = (10*FluidType.BUCKET_VOLUME)/burnTime;
Expand Down

0 comments on commit 52717ab

Please sign in to comment.