Applied Energistics 2

Applied Energistics 2

137M Downloads

Matter condenser does not generate energy from fluid.

gjz010 opened this issue ยท 1 comments

commented

Describe the bug

Matter condenser does not generate energy from fluid. However, the fluid piped into the matter condenser is consumed.

How to reproduce the bug

Pipe water into matter condenser in singularity-creation mode.

Expected behavior

The water is consumed, and energy is produced; 8 points of energy are produced for every bucket of water.

Additional details

I suspect this is caused by the code here defining the energy gain and fluid retrieved:

private class FluidHandler extends SnapshotParticipant<Double> implements InsertionOnlyStorage<FluidVariant> {
private double pendingEnergy = 0;
@Override
public long insert(FluidVariant resource, long maxAmount, TransactionContext transaction) {
// We allow up to a bucket per insert
var amount = Math.min(AEFluidKey.AMOUNT_BUCKET, maxAmount);
updateSnapshots(transaction);
pendingEnergy += amount / (double) AEFluidKey.AMOUNT_BUCKET / AEKeyType.fluids().getAmountPerOperation();
return amount;
}

and here:

@Override
public int getAmountPerOperation() {
// On Forge this was 125mb (so 125/1000th of a bucket)
return AEFluidKey.AMOUNT_BUCKET * 125 / 1000;
}

where the constant AEFluidKey.AMOUNT_BUCKET (which is 81000L I think?) appears twice.

Which minecraft version are you using?

1.19

On which mod loaders does it happen?

Fabric

Crash log

https://mclo.gs/ktse9mj

commented

Fixed by #6907.