Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT]: Add missing Gas API methods #163

Closed
Bedrockbreaker opened this issue Feb 22, 2024 · 1 comment · Fixed by #166
Closed

[ENHANCEMENT]: Add missing Gas API methods #163

Bedrockbreaker opened this issue Feb 22, 2024 · 1 comment · Fixed by #166

Comments

@Bedrockbreaker
Copy link

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.

@maggi373
Copy link
Member

hi, i'm quite busy so make an pr and i'll approve it. it probably isn't going to break anything anyway

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants