[ENHANCEMENT]: Add missing Gas API methods
Bedrockbreaker opened this issue ยท 1 comments
Is your enhancement request related to a problem? Please describe.
In at least mekanism 1.12+ (both original and CE), the gas api has an additional GasTankInfo class which provides relatively important information about the internal state of any gas tanks in a tile entity. Unfortunately, the 1.7.10 version doesn't have these api methods (or equivalents) available. Specifically, I'm referring to #getGas(), #getStored(), and #getMaxGas()
Describe the solution you'd like
It'd be nice to have these, to avoid extremely janky work arounds.
Describe alternatives you've considered
To half-work around getting the stored contents, you can virtually drain the tile entity, but this only works for tile entities which allow draining in the first place.
Getting the capacity of a gas tank would rely on the above (to obtain the current amount), and then attempting to fill the tank with the same gas (or iterate through every gas registered in the game if it's initially empty and only accepts specific gasses) to get the amount it would further accept. Again, this just wouldn't work in a lot of circumstances.
Minecraft Version is this regarding?
1.7.10
Screenshots
No response
Additional context
Naturally, changing the API in a mod which is supposed to allow drop-in replacement of the original is a bit iffy. Assuming the api methods are implemented as a completely separate interface, and the existing tile entities are update to match, it theoretically shouldn't cause issues imo. If you'd like, I'd be happy to fork and write a pull request myself, but the the scope of this change feels a little small for that.