From 74fc202ea6d5aa86be1de4da42f55b44d97ac493 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 11 Jan 2015 15:12:30 +0100 Subject: [PATCH] make BuildCraft properly detect previously registered fluids, make oil move a lot slower - closes #2376 --- common/buildcraft/BuildCraftEnergy.java | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 690d9727..5f465cc0 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -181,16 +181,28 @@ public class BuildCraftEnergy extends BuildCraftMod { CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class); // Oil and fuel - buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(1500); - FluidRegistry.registerFluid(buildcraftFluidOil); + if (!FluidRegistry.isFluidRegistered("oil")) { + buildcraftFluidOil = new Fluid("oil").setDensity(800).setViscosity(15000); + FluidRegistry.registerFluid(buildcraftFluidOil); + } else { + BCLog.logger.warn("Not using BuildCraft oil - issues might occur!"); + } fluidOil = FluidRegistry.getFluid("oil"); - buildcraftFluidFuel = new Fluid("fuel"); - FluidRegistry.registerFluid(buildcraftFluidFuel); + if (!FluidRegistry.isFluidRegistered("fuel")) { + buildcraftFluidFuel = new Fluid("fuel"); + FluidRegistry.registerFluid(buildcraftFluidFuel); + } else { + BCLog.logger.warn("Not using BuildCraft fuel - issues might occur!"); + } fluidFuel = FluidRegistry.getFluid("fuel"); - buildcraftFluidRedPlasma = new Fluid("redplasma").setDensity(10000).setViscosity(10000).setLuminosity(30); - FluidRegistry.registerFluid(buildcraftFluidRedPlasma); + if (!FluidRegistry.isFluidRegistered("redplasma")) { + buildcraftFluidRedPlasma = new Fluid("redplasma").setDensity(10000).setViscosity(10000).setLuminosity(30); + FluidRegistry.registerFluid(buildcraftFluidRedPlasma); + } else { + BCLog.logger.warn("Not using BuildCraft red plasma - issues might occur!"); + } fluidRedPlasma = FluidRegistry.getFluid("redplasma"); if (fluidOil.getBlock() == null) {