From bcd8344c3732f08e331cf048f1f748c5b55f2812 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Fri, 29 Dec 2017 20:47:47 +1000 Subject: + Added more new ore veins. % Tweaked some ore veins. % Tweaked size of debug tool's area clear to double. $ Fixed an issue that broke tooltips. $ Quite a lot of back-end work for ore generation in the dark dimension. $ Fixed improper generation of the GT++ WorldGen configuration file. $ Fixed ore vein densities. $ Fixed ore veins not generating as expected. --- .../core/util/materials/MaterialUtils.java | 36 +++++++++------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java index cc9a679193..7db80c70fb 100644 --- a/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java +++ b/src/Java/gtPlusPlus/core/util/materials/MaterialUtils.java @@ -47,15 +47,20 @@ public class MaterialUtils { final int durability = material.mDurability; boolean mGenerateCell = false; MaterialState materialState; - final String chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mChemicalFormula)); + String chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mChemicalFormula)); final Element element = material.mElement; int radioactivity = 0; if (material.isRadioactive()){ radioactivity = 1; } - + + //Weird Blacklist of Bad Chemical Strings + if (material.mElement == Element.Pb || material.mElement == Element.Na || material.mElement == Element.Ar){ + chemicalFormula = StringUtils.subscript(Utils.sanitizeString(material.mElement.name())); + } + //Determine default state - Logger.MATERIALS("[Debug] Setting State of GT generated material."); + Logger.MATERIALS("[Debug] Setting State of GT generated material. "+material.mDefaultLocalName); if (material.getMolten(1) != null || material.getSolid(1) != null){ materialState = MaterialState.SOLID; Logger.MATERIALS("[Debug] Molten or Solid was not null."); @@ -96,6 +101,9 @@ public class MaterialUtils { //ModItems.itemBaseCentidust = UtilsItems.generateCentidust(material); return new Material(name, materialState, durability, rgba, melting, boiling, protons, neutrons, blastFurnace, chemicalFormula, radioactivity, mGenerateCell); } + else { + Logger.DEBUG_MATERIALS("Failed to generate GT++ material instance for "+material.name() +" | Valid RGB? "+(hasValidRGBA(rgba))); + } return null; } @@ -116,26 +124,10 @@ public class MaterialUtils { return temp; } - public static boolean hasValidRGBA(final short[] rgba){ - boolean test1 = false; - boolean test2 = false; - boolean test3 = false; - for (int r=0;r 4){ return false; - } + } return true; } -- cgit