Advanced-Rocketry / AdvancedRocketry

Space mod for minecraft
http://arwiki.dmodoomsirius.me/
MIT License
215 stars 273 forks source link

[BUG] Airtight Seal enchant O2 calculation is wrong #2383

Open Deiwos opened 5 months ago

Deiwos commented 5 months ago

Forge version: 14.23.5.2860 AR version: 1.12.2-2.0.0-17 LibVulpes version: 1.12.2-0.4.2-25

The code for determining the Airtight Seal O2 value is:

@Override
public int getMaxAir(@Nonnull ItemStack stack) {
    return ARConfiguration.getCurrentConfig().spaceSuitOxygenTime*1200; //30 minutes;
}

and

arConfig.spaceSuitOxygenTime = config.get(OXYGEN, "spaceSuitO2Buffer", 30, "Maximum time in minutes that the spacesuit's internal buffer can store O2 for").getInt();

However, the 1200 value is based off the idea that o2 drains at 1mb/tick which it most certainly does not. It's more like 1mb/0.5s, which means you need to set spaceSuitO2Buffer to 3 to get 30 minutes of oxygen. 30x1200 is 36000, which is 5 hours of oxygen.