mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Merge pull request #4523 from thommy101/issue-4513
[1.11] Update BuildCraft API to maven dependency
This commit is contained in:
commit
dbb86e344d
238 files changed
+17
-9315
No files matched your search
@@ -2,10 +2,12 @@ package mekanism.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import buildcraft.api.mj.MjAPI;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.common.config.MekanismConfig.general;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.common.ModAPIManager;
|
||||
import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
||||
import buildcraft.api.fuels.IFuel;
|
||||
@@ -28,7 +30,7 @@ public class FuelHandler
|
||||
|
||||
if(BCPresent() && gas.hasFluid() && BuildcraftFuelRegistry.fuel != null)
|
||||
{
|
||||
IFuel bcFuel = BuildcraftFuelRegistry.fuel.getFuel(gas.getFluid());
|
||||
IFuel bcFuel = BuildcraftFuelRegistry.fuel.getFuel(new FluidStack(gas.getFluid(), 1));
|
||||
|
||||
if(bcFuel != null)
|
||||
{
|
||||
@@ -56,7 +58,10 @@ public class FuelHandler
|
||||
public FuelGas(IFuel bcFuel)
|
||||
{
|
||||
burnTicks = bcFuel.getTotalBurningTime() / Fluid.BUCKET_VOLUME;
|
||||
energyPerTick = bcFuel.getPowerPerCycle() * general.FROM_RF;
|
||||
|
||||
// getPowerPerCycle returns value in 1 BuildCraft micro MJ
|
||||
// 1 BuildCraft MJ equals 20 RF
|
||||
energyPerTick = bcFuel.getPowerPerCycle() / (double) MjAPI.MJ * 20 * general.FROM_RF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.generators.common;
|
||||
|
||||
import buildcraft.api.mj.MjAPI;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -102,13 +103,13 @@ public class MekanismGenerators implements IModule
|
||||
{
|
||||
for(IFuel s : BuildcraftFuelRegistry.fuel.getFuels())
|
||||
{
|
||||
if(!(s.getFluid() == null || GasRegistry.containsGas(s.getFluid().getName())))
|
||||
if(s.getFluid() != null && !GasRegistry.containsGas(s.getFluid().getFluid().getName()))
|
||||
{
|
||||
GasRegistry.register(new Gas(s.getFluid()));
|
||||
GasRegistry.register(new Gas(s.getFluid().getFluid()));
|
||||
}
|
||||
}
|
||||
|
||||
BuildcraftFuelRegistry.fuel.addFuel(MekanismFluids.Ethene.getFluid(), (int)(240 * general.TO_RF), 40 * Fluid.BUCKET_VOLUME);
|
||||
BuildcraftFuelRegistry.fuel.addFuel(MekanismFluids.Ethene.getFluid(), (long)(240 * general.TO_RF / 20 * MjAPI.MJ), 40 * Fluid.BUCKET_VOLUME);
|
||||
}
|
||||
|
||||
//Update the config-dependent recipes after the recipes have actually been added in the first place
|
||||
|
||||
Reference in new issue
Block a user