Let's talk about potentially changing the transfer capabilities of NeoForge - IFluidHandler, IItemHandler and IEnergyStorage. Here are a few things we could do. Other ideas are welcome too!
Unify item and fluid transfer abstractions
Perhaps the most obvious thing is to align IItemHandler and IFluidHandler so that modders who learn one immediately know how to use the other. It would also make the life of some mods that have similar handling for fluids and items easier.
Use something else than stacks as the unit of work for the API
One of the problems with the current APIs is that they use ItemStack/FluidStack as the fundamental unit of work (not even consistently... some methods take or return ints instead). Unfortunately, stacks are mutable and thus working with the transfer handlers involves frequent copies of the stacks that are passed to other functions, just in case.
We could for example use an ItemVariant/FluidVariant that is essentially an immutable count-less stack to represent the resource, and a separate integer parameter.
Did someone say transactions?
The current system is based on simulations. "Could you do <single action>? Yes/No". Transactions are a generalization of that, allowing multiple related actions to be "simulated" and "cancelled"/"executed" all at once. The main benefit of transactions it that they make more powerful transfer behavior possible. For example an AE2-like mod could use a transaction to take all the inputs atomically for a crafting task. (Right now this will fail with e.g. compressing storage drawers).
The flip side of transactions it that all implementers of the handlers need to implement support for them, and while we can provide base implementations and documentation, at the end of the day this is more complicated to get right than the simulation boolean. It would also be very hard to port to it for all the existing mods (whereas the previous suggested changes are not as fundamental).








