temp fixed null crash
This commit is contained in:
parent
be435e432a
commit
ad4a265849
1 changed files with 13 additions and 6 deletions
|
@ -145,10 +145,13 @@ public class FluidMech extends ModPrefab
|
||||||
CONFIGURATION.load();
|
CONFIGURATION.load();
|
||||||
if (FluidMech.CONFIGURATION.get("general", "EnableWasteFluid", true).getBoolean(true))
|
if (FluidMech.CONFIGURATION.get("general", "EnableWasteFluid", true).getBoolean(true))
|
||||||
{
|
{
|
||||||
fmWaste = new Fluid("mixedWaste").setUnlocalizedName("fluid.waste.name").setDensity(1300).setViscosity(1800);
|
fmWaste = new Fluid(WASTE_FLUID_NAME).setUnlocalizedName("fluid.waste.name").setDensity(1300).setViscosity(1800);
|
||||||
FluidRegistry.registerFluid(waste);
|
FluidRegistry.registerFluid(fmWaste);
|
||||||
waste = FluidRegistry.getFluid("mixedWaste");
|
waste = FluidRegistry.getFluid(WASTE_FLUID_NAME);
|
||||||
|
if(waste == null)
|
||||||
|
{
|
||||||
|
waste = fmWaste;
|
||||||
|
}
|
||||||
if (waste.getBlockID() == -1)
|
if (waste.getBlockID() == -1)
|
||||||
{
|
{
|
||||||
FMRecipeLoader.blockWasteLiquid = new BlockFluid(waste, getNextID());
|
FMRecipeLoader.blockWasteLiquid = new BlockFluid(waste, getNextID());
|
||||||
|
@ -163,10 +166,14 @@ public class FluidMech extends ModPrefab
|
||||||
}
|
}
|
||||||
if (FluidMech.CONFIGURATION.get("general", "EnableOilFluid", true).getBoolean(true) && FluidRegistry.getFluid("oil") == null)
|
if (FluidMech.CONFIGURATION.get("general", "EnableOilFluid", true).getBoolean(true) && FluidRegistry.getFluid("oil") == null)
|
||||||
{
|
{
|
||||||
fmOil = new Fluid("oil").setUnlocalizedName("fluid.oil.name").setDensity(1500).setViscosity(4700);
|
fmOil = new Fluid(OIL_FLUID_NAME).setUnlocalizedName("fluid.oil.name").setDensity(1500).setViscosity(4700);
|
||||||
FluidRegistry.registerFluid(fmOil);
|
FluidRegistry.registerFluid(fmOil);
|
||||||
oil = FluidRegistry.getFluid("oil");
|
oil = FluidRegistry.getFluid(OIL_FLUID_NAME);
|
||||||
|
|
||||||
|
if(oil == null)
|
||||||
|
{
|
||||||
|
oil = fmOil;
|
||||||
|
}
|
||||||
if (oil.getBlockID() == -1)
|
if (oil.getBlockID() == -1)
|
||||||
{
|
{
|
||||||
FMRecipeLoader.blockOilLiquid = new BlockFluid(oil, getNextID());
|
FMRecipeLoader.blockOilLiquid = new BlockFluid(oil, getNextID());
|
||||||
|
|
Loading…
Reference in a new issue