Wrong Fluid Pipe Transfer Rate
mikerooni opened this issue ยท 2 comments
GregTech CEu Version
latest
Recipe Viewer Installed
None
Environment
any
Cross-Mod Interaction
No
Expected Behavior
Correct transfer rate for fluid pipes
Actual Behavior
Fluid pipes only have a fraction of their supposed transfer rate.
Usually, this is 1/4th of what should be transferred per second.
Steps to Reproduce
Use a fluid pipe together with e.g. GT's output hatch on a large boiler, a pump cover, etc.
Additional Information
My guess so far:
Fluid pipes have an internal buffer but we're only inserting a couple times per second. The buffer capacity is the same as the fluid pipe's transfer rate per tick.
So the pipe assumes fluids are being transferred every tick, while the actual transfer is batched, but gets limited to the target tank's capacity instead of the transfer rate.
https://github.com/GregTechCEu/GregTech-Modern/blob/1.19.2/forge/src/main/java/com/gregtechceu/gtceu/common/blockentity/forge/FluidPipeBlockEntityImpl.java#L117
TODO:
- Remove capacity limit on the pipe's tank (or make the pipe not be handled as a tank at all)
- limit the transfer in the pipe tank's
fill()
method instead, and regularly reset the remaining throughput at a fixed offset tick interval
Limits don't seem to work correctly on fabric at all.
I assume this has to do with fabric's bucket size, so this needs to be a separate fix.