mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Update lots of APIs, most notably BC and an actual 1.7 version of CC
This commit is contained in:
1 parent
e2e3e1017f
commit
4d1c1285b2
108 files changed
+1676
-2403
No files matched your search
@@ -3,11 +3,13 @@ package mekanism.common;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mekanism.api.gas.Gas;
|
||||
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import buildcraft.api.fuels.IronEngineFuel;
|
||||
import buildcraft.api.fuels.IronEngineFuel.Fuel;
|
||||
import cpw.mods.fml.common.ModAPIManager;
|
||||
|
||||
import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
||||
import buildcraft.api.fuels.IFuel;
|
||||
|
||||
public class FuelHandler
|
||||
{
|
||||
public static HashMap<String, FuelGas> fuels = new HashMap<String, FuelGas>();
|
||||
@@ -26,7 +28,7 @@ public class FuelHandler
|
||||
|
||||
if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|fuels") && gas.hasFluid())
|
||||
{
|
||||
Fuel bcFuel = IronEngineFuel.getFuelForFluid(gas.getFluid());
|
||||
IFuel bcFuel = BuildcraftFuelRegistry.fuel.getFuel(gas.getFluid());
|
||||
|
||||
if(bcFuel != null)
|
||||
{
|
||||
@@ -51,10 +53,10 @@ public class FuelHandler
|
||||
energyPerTick = energyDensity / duration;
|
||||
}
|
||||
|
||||
public FuelGas(Fuel bcFuel)
|
||||
public FuelGas(IFuel bcFuel)
|
||||
{
|
||||
burnTicks = bcFuel.totalBurningTime / FluidContainerRegistry.BUCKET_VOLUME;
|
||||
energyPerTick = bcFuel.powerPerCycle * Mekanism.FROM_BC;
|
||||
burnTicks = bcFuel.getTotalBurningTime() / FluidContainerRegistry.BUCKET_VOLUME;
|
||||
energyPerTick = bcFuel.getPowerPerCycle() * Mekanism.FROM_TE;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user