Search in sources :

Example 1 with EnumAtmosphericGas

use of micdoodle8.mods.galacticraft.api.world.EnumAtmosphericGas in project Galacticraft by micdoodle8.

the class TileEntityGasLiquefier method getAirProducts.

public int getAirProducts() {
    WorldProvider WP = this.worldObj.provider;
    if (WP instanceof WorldProviderSpace) {
        int result = 0;
        ArrayList<EnumAtmosphericGas> atmos = ((WorldProviderSpace) WP).getCelestialBody().atmosphere.composition;
        if (atmos.size() > 0) {
            result = this.getIdFromName(atmos.get(0).name().toLowerCase()) + 1;
        }
        if (atmos.size() > 1) {
            result += 16 * (this.getIdFromName(atmos.get(1).name().toLowerCase()) + 1);
        }
        if (atmos.size() > 2) {
            result += 256 * (this.getIdFromName(atmos.get(2).name().toLowerCase()) + 1);
        }
        return result;
    }
    return 35;
}
Also used : EnumAtmosphericGas(micdoodle8.mods.galacticraft.api.world.EnumAtmosphericGas) WorldProvider(net.minecraft.world.WorldProvider) WorldProviderSpace(micdoodle8.mods.galacticraft.api.prefab.world.gen.WorldProviderSpace)

Aggregations

WorldProviderSpace (micdoodle8.mods.galacticraft.api.prefab.world.gen.WorldProviderSpace)1 EnumAtmosphericGas (micdoodle8.mods.galacticraft.api.world.EnumAtmosphericGas)1 WorldProvider (net.minecraft.world.WorldProvider)1