Scuba tank/gas mask compatibility issue with better diving mod
anne770212 opened this issue · 4 comments
Issue description:
With better diving mod which changed underwater oxygen handling the scuba tank doesn’t fill the air. I asked the author about it and he said compatibility should be added from mekanism’s side.
Here’s the oxygen handling method the author of better diving sent me:
ICapabilityDivingAttributes capability = player.getCapability(CapabilityDivingAttributesProvider.DIVING_ATTRIBUTES, null);
capability.getMaxAir();
capability.getCurrentAir();
capability.setCurrentAir(0);
and
BetterDivingConfig.MODULES.oxygenHandling // only for server
Steps to reproduce:
- Install both Mekanism and better diving.
2 .Equip scuba tank and gas mask then go in the water. - The tank consumes air, but air bubbles won't be refilled.
Version:
Forge: latest 2847
Mekanism: latest 9.8.2.387 with all modules(tools/generators)
No crash report, the game doesn't crash but simply don't work as intended.
With both of these now on 1.16+ can we look into this again ? e.g. Ability to refill Better Diving tanks in the Electrolytic Separator ?
Feel free to open a request on our feature request repo about the originally requested capability support. In regards to having them get filled in the electrolytic separator I would say that should be done on their end via exposing a capability on their tanks to allow gas and oxygen in them.
So I still stand by filling the tanks would make more sense on their end than ours, but I did a little testing and made a small tweak which seems at least in 1.16 to fix filling the player's breath bar when under water without having to do any capability checks.