make BuildCraft properly detect previously registered fluids, make oil move a lot slower - closes #2376

This commit is contained in:
asiekierka 2015-01-11 15:12:30 +01:00
parent a88ce4ea03
commit 74fc202ea6

View file

@ -181,16 +181,28 @@ public class BuildCraftEnergy extends BuildCraftMod {
CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class);
// Oil and fuel // Oil and fuel
buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(1500); if (!FluidRegistry.isFluidRegistered("oil")) {
buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(15000);
FluidRegistry.registerFluid(buildcraftFluidOil); FluidRegistry.registerFluid(buildcraftFluidOil);
} else {
BCLog.logger.warn("Not using BuildCraft oil - issues might occur!");
}
fluidOil = FluidRegistry.getFluid("oil"); fluidOil = FluidRegistry.getFluid("oil");
if (!FluidRegistry.isFluidRegistered("fuel")) {
buildcraftFluidFuel = new Fluid("fuel"); buildcraftFluidFuel = new Fluid("fuel");
FluidRegistry.registerFluid(buildcraftFluidFuel); FluidRegistry.registerFluid(buildcraftFluidFuel);
} else {
BCLog.logger.warn("Not using BuildCraft fuel - issues might occur!");
}
fluidFuel = FluidRegistry.getFluid("fuel"); fluidFuel = FluidRegistry.getFluid("fuel");
if (!FluidRegistry.isFluidRegistered("redplasma")) {
buildcraftFluidRedPlasma = new Fluid("redplasma").setDensity(10000).setViscosity(10000).setLuminosity(30); buildcraftFluidRedPlasma = new Fluid("redplasma").setDensity(10000).setViscosity(10000).setLuminosity(30);
FluidRegistry.registerFluid(buildcraftFluidRedPlasma); FluidRegistry.registerFluid(buildcraftFluidRedPlasma);
} else {
BCLog.logger.warn("Not using BuildCraft red plasma - issues might occur!");
}
fluidRedPlasma = FluidRegistry.getFluid("redplasma"); fluidRedPlasma = FluidRegistry.getFluid("redplasma");
if (fluidOil.getBlock() == null) { if (fluidOil.getBlock() == null) {