diff options
| author | Alkalus <draknyte1@hotmail.com> | 2017-10-07 13:04:05 +1000 |
|---|---|---|
| committer | Alkalus <draknyte1@hotmail.com> | 2017-10-07 13:04:05 +1000 |
| commit | d98e0b22cb0d7dbb7145cf0f751f6e4e44ed08d1 (patch) | |
| tree | e1719570ed4cbf62c202c5b6548a9f365ea7332e /src/Java/gtPlusPlus/core/util/fluid | |
| parent | ab880b63b5aa60b8e3d4f65b38c1d2ec880d1ed2 (diff) | |
| download | GT5-Unofficial-d98e0b22cb0d7dbb7145cf0f751f6e4e44ed08d1.tar.gz GT5-Unofficial-d98e0b22cb0d7dbb7145cf0f751f6e4e44ed08d1.tar.bz2 GT5-Unofficial-d98e0b22cb0d7dbb7145cf0f751f6e4e44ed08d1.zip | |
$ Fixed custom IC2 cells. (HF, SO2, etc)
% Changed how cells can be generated for further flexibility.
- Removed logging from the LFTR.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/fluid')
| -rw-r--r-- | src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java index 02835a92ef..009651db68 100644 --- a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java +++ b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java @@ -4,6 +4,7 @@ import gregtech.api.enums.*; import gregtech.api.util.GT_LanguageManager; import gtPlusPlus.core.fluids.GenericFluid; import gtPlusPlus.core.item.base.BaseItemComponent; +import gtPlusPlus.core.item.base.cell.BaseItemCell; import gtPlusPlus.core.item.base.cell.BaseItemPlasmaCell; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialStack; @@ -227,7 +228,7 @@ public class FluidUtils { public static Fluid addGTFluidNonMolten(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount) { return addGTFluid("fluid."+aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount); } - + public static Fluid addGTFluidNoPrefix(final String aName, final String aLocalized, final short[] aRGBa, final int aState, final long aTemperatureK, final ItemStack aFullContainer, final ItemStack aEmptyContainer, final int aFluidAmount) { return addGTFluid(aName, "fluid.autogenerated", aLocalized, aRGBa, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount); } @@ -485,19 +486,12 @@ public class FluidUtils { Utils.LOG_INFO("FLUID GENERATION FAILED FOR "+localizedName); return null; } - + public final static Fluid generateFluidNoPrefix(final String unlocalizedName, final String localizedName, final int MeltingPoint, final short[] RGBA){ - if ((FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null)/* && ((dustStack != null) || (dustStack2 != null))*/){ + Fluid gtFluid; + if (FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1) == null){ Utils.LOG_WARNING("Generating our own fluid."); - - //Generate a Cell if we need to - if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ - @SuppressWarnings("unused") - final - Item temp = new BaseItemComponent(unlocalizedName, localizedName, RGBA); - } - - final Fluid gtFluid = FluidUtils.addGTFluidNoPrefix( + gtFluid = FluidUtils.addGTFluidNoPrefix( unlocalizedName, localizedName, RGBA, @@ -506,11 +500,16 @@ public class FluidUtils { ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1), ItemList.Cell_Empty.get(1L, new Object[0]), 1000); - - return gtFluid; } - Utils.LOG_INFO("FLUID GENERATION FAILED FOR "+localizedName); - return null; } - + else { + gtFluid = FluidUtils.getFluidStack(unlocalizedName.toLowerCase(), 1).getFluid(); + } + //Generate a Cell if we need to + if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cell"+unlocalizedName, 1) == null){ + new BaseItemCell(unlocalizedName, localizedName, RGBA, gtFluid); + } + return gtFluid; + } + } |
