Cleanup, disable auto TE recipes with config and fixes

This commit is contained in:
Muramasa 2016-09-25 00:25:15 +01:00
parent fed8109b17
commit 3ee18ca555
10 changed files with 89 additions and 106 deletions

View file

@ -262,11 +262,7 @@ public class GT_Mod implements IGT_Mod {
} }
} }
//GT_Config.troll = (Calendar.getInstance().get(2) + 1 == 4) && (Calendar.getInstance().get(5) >= 1) && (Calendar.getInstance().get(5) <= 2); //GT_Config.troll = (Calendar.getInstance().get(2) + 1 == 4) && (Calendar.getInstance().get(5) >= 1) && (Calendar.getInstance().get(5) <= 2);
new GT_Loader_MaterialProcessing().run();
long startTime = System.nanoTime();
Materials.init(); Materials.init();
long stopTime = System.nanoTime();
System.out.println("##### Mats Init: " + (stopTime - startTime));
GT_Log.out.println("GT_Mod: Saving Main Config"); GT_Log.out.println("GT_Mod: Saving Main Config");
tMainConfig.save(); tMainConfig.save();

View file

@ -11,6 +11,7 @@ import gregtech.api.objects.GT_FluidStack;
import gregtech.api.objects.MaterialStack; import gregtech.api.objects.MaterialStack;
import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Utility;
import gregtech.loaders.materialprocessing.ProcessingConfig;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
@ -1333,6 +1334,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
} }
public static void init() { public static void init() {
new ProcessingConfig();
for (IMaterialHandler aRegistrator : mMaterialHandlers) { for (IMaterialHandler aRegistrator : mMaterialHandlers) {
aRegistrator.onMaterialsInit(); //This is where addon mods can add/manipulate materials aRegistrator.onMaterialsInit(); //This is where addon mods can add/manipulate materials
} }
@ -1340,7 +1342,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[MATERIALS_MAP.size()]); //Generate standard object array. This is a lot faster to loop over. MATERIALS_ARRAY = MATERIALS_MAP.values().toArray(new Materials[MATERIALS_MAP.size()]); //Generate standard object array. This is a lot faster to loop over.
OrePrefixes.initMaterialComponents(); OrePrefixes.initMaterialComponents();
for (Materials aMaterial : MATERIALS_ARRAY) { for (Materials aMaterial : MATERIALS_ARRAY) {
if (aMaterial.mMetaItemSubID >= 0 /*&& OrePrefixes.ore.isComponentEnabled(aMaterial)*/) { if (aMaterial.mMetaItemSubID >= 0) {
if (aMaterial.mMetaItemSubID < 1000) { if (aMaterial.mMetaItemSubID < 1000) {
if (GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] == null) { if (GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] == null) {
GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] = aMaterial; GregTech_API.sGeneratedMaterials[aMaterial.mMetaItemSubID] = aMaterial;

View file

@ -540,7 +540,7 @@ public enum OrePrefixes {
* Negative = Undefined Amount * Negative = Undefined Amount
*/ */
public final long mMaterialAmount; public final long mMaterialAmount;
public final Collection<Materials> mDynamicItems = new HashSet<Materials>(), mDisabledMaterials = new HashSet<Materials>(), mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>(); public final Collection<Materials> mDisabledItems = new HashSet<Materials>(), mNotGeneratedItems = new HashSet<Materials>(), mIgnoredMaterials = new HashSet<Materials>(), mGeneratedItems = new HashSet<Materials>();
private final ArrayList<IOreRecipeRegistrator> mOreProcessing = new ArrayList<IOreRecipeRegistrator>(); private final ArrayList<IOreRecipeRegistrator> mOreProcessing = new ArrayList<IOreRecipeRegistrator>();
public ItemStack mContainerItem = null; public ItemStack mContainerItem = null;
public ICondition<ISubTagContainer> mCondition = null; public ICondition<ISubTagContainer> mCondition = null;
@ -640,23 +640,23 @@ public enum OrePrefixes {
//TODO Make sure stuff like gem plates / standard plates / paper plates all generate with the current condition //TODO Make sure stuff like gem plates / standard plates / paper plates all generate with the current condition
for (Materials aMaterial : Materials.values()) { for (Materials aMaterial : Materials.values()) {
if (aMaterial.mMetaItemSubID >= 0) { if (aMaterial.mMetaItemSubID >= 0) {
if (aMaterial.mBlastFurnaceTemp <= 1750) ingotHot.mDisabledMaterials.add(aMaterial); //Moved HotIngot code from GT_MetaGenerated_Item_01 so all this is in once place if (aMaterial.mBlastFurnaceTemp <= 1750) ingotHot.mDisabledItems.add(aMaterial); //Moved HotIngot code from GT_MetaGenerated_Item_01 so all this is in once place
if (!enableUnusedSprings && (aMaterial != Materials.Titanium)) spring.mDisabledMaterials.add(aMaterial); if (!enableUnusedSprings && (aMaterial != Materials.Titanium)) spring.mDisabledItems.add(aMaterial);
if (!enableUnusedSmallSprings) springSmall.mDisabledMaterials.add(aMaterial); if (!enableUnusedSmallSprings) springSmall.mDisabledItems.add(aMaterial);
if (!enableUnusedRounds && (aMaterial != Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG)) round.mDisabledMaterials.add(aMaterial); if (!enableUnusedRounds && (aMaterial != Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG)) round.mDisabledItems.add(aMaterial);
if (!enableUnusedCrates) { if (!enableUnusedCrates) {
if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.Steel || aMaterial == Materials.Bronze || aMaterial == Materials.Manganese)) if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.Steel || aMaterial == Materials.Bronze || aMaterial == Materials.Manganese))
crateGtIngot.mDisabledMaterials.add(aMaterial); crateGtIngot.mDisabledItems.add(aMaterial);
if (!(aMaterial == Materials.Neodymium || aMaterial == Materials.Chrome)) if (!(aMaterial == Materials.Neodymium || aMaterial == Materials.Chrome))
crateGtDust.mDisabledMaterials.add(aMaterial); crateGtDust.mDisabledItems.add(aMaterial);
crateGtGem.mDisabledMaterials.add(aMaterial); crateGtGem.mDisabledItems.add(aMaterial);
crateGtPlate.mDisabledMaterials.add(aMaterial); crateGtPlate.mDisabledItems.add(aMaterial);
} }
if (!enableUnusedArrows) { if (!enableUnusedArrows) {
toolHeadArrow.mDisabledMaterials.add(aMaterial); toolHeadArrow.mDisabledItems.add(aMaterial);
arrowGtPlastic.mDisabledMaterials.add(aMaterial); arrowGtPlastic.mDisabledItems.add(aMaterial);
if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.SterlingSilver)) if (!(aMaterial == Materials.DamascusSteel || aMaterial == Materials.SterlingSilver))
arrowGtWood.mDisabledMaterials.add(aMaterial); arrowGtWood.mDisabledItems.add(aMaterial);
} }
//Plates //Plates
if (!enableUnusedPlates && /*(*/((aMaterial.mTypes & 0x40) == 0) /*|| ((aMaterial.mTypes & 0x04)) == 0)*/ && !(aMaterial == Materials.Silicon || aMaterial == Materials.Zinc || if (!enableUnusedPlates && /*(*/((aMaterial.mTypes & 0x40) == 0) /*|| ((aMaterial.mTypes & 0x04)) == 0)*/ && !(aMaterial == Materials.Silicon || aMaterial == Materials.Zinc ||
@ -665,60 +665,60 @@ public enum OrePrefixes {
aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz || aMaterial == Materials.Lazurite || aMaterial == Materials.Lapis || aMaterial == Materials.NiobiumTitanium || aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz || aMaterial == Materials.Lazurite || aMaterial == Materials.Lapis ||
aMaterial == Materials.Paper || aMaterial == Materials.Jasper || aMaterial == Materials.Dilithium || aMaterial == Materials.Forcicium || aMaterial == Materials.Forcillium || aMaterial == Materials.Paper || aMaterial == Materials.Jasper || aMaterial == Materials.Dilithium || aMaterial == Materials.Forcicium || aMaterial == Materials.Forcillium ||
aMaterial == Materials.EnderPearl || aMaterial == Materials.EnderEye || aMaterial == Materials.Glass || aMaterial == Materials.Copper)) aMaterial == Materials.EnderPearl || aMaterial == Materials.EnderEye || aMaterial == Materials.Glass || aMaterial == Materials.Copper))
plate.mDisabledMaterials.add(aMaterial); plate.mDisabledItems.add(aMaterial);
//Ingot/Plate Storage //Ingot/Plate Storage
if (!enableUnusedDoubleIngots) ingotDouble.mDisabledMaterials.add(aMaterial); if (!enableUnusedDoubleIngots) ingotDouble.mDisabledItems.add(aMaterial);
if (!enableUnusedTripleIngots) ingotTriple.mDisabledMaterials.add(aMaterial); if (!enableUnusedTripleIngots) ingotTriple.mDisabledItems.add(aMaterial);
if (!enableUnusedQuadIngots) ingotQuadruple.mDisabledMaterials.add(aMaterial); if (!enableUnusedQuadIngots) ingotQuadruple.mDisabledItems.add(aMaterial);
if (!enableUnusedQuinIngots) ingotQuintuple.mDisabledMaterials.add(aMaterial); if (!enableUnusedQuinIngots) ingotQuintuple.mDisabledItems.add(aMaterial);
if (!enableUnusedDoublePlates && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Paper || aMaterial == Materials.Aluminium || aMaterial == Materials.Steel || aMaterial == Materials.TungstenSteel)) if (!enableUnusedDoublePlates && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Paper || aMaterial == Materials.Aluminium || aMaterial == Materials.Steel || aMaterial == Materials.TungstenSteel))
plateDouble.mDisabledMaterials.add(aMaterial); plateDouble.mDisabledItems.add(aMaterial);
if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) plateTriple.mDisabledMaterials.add(aMaterial); if (!enableUnusedTriplePlates && !(aMaterial == Materials.Paper)) plateTriple.mDisabledItems.add(aMaterial);
if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) plateQuadruple.mDisabledMaterials.add(aMaterial); if (!enableUnusedQuadPlates && !(aMaterial == Materials.Paper)) plateQuadruple.mDisabledItems.add(aMaterial);
if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) plateQuintuple.mDisabledMaterials.add(aMaterial); if (!enableUnusedQuinPlates && !(aMaterial == Materials.Paper)) plateQuintuple.mDisabledItems.add(aMaterial);
if (!enableUnusedDensePlates && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper)) if (!enableUnusedDensePlates && !(aMaterial == Materials.Iron || aMaterial == Materials.Copper || aMaterial == Materials.Lead || aMaterial == Materials.Paper))
plateDense.mDisabledMaterials.add(aMaterial); plateDense.mDisabledItems.add(aMaterial);
//Rotors //Rotors
if (!enableUnusedRotors && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || if (!enableUnusedRotors && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Tin || aMaterial == Materials.Osmium ||
aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel ||
aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium)) aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium))
rotor.mDisabledMaterials.add(aMaterial); rotor.mDisabledItems.add(aMaterial);
//Rings //Rings
if (!enableUnusedRings && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin || if (!enableUnusedRings && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || aMaterial == Materials.Tin ||
aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron ||
aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel ||
aMaterial == Materials.Rubber || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG || aMaterial == Materials.Aluminium)) aMaterial == Materials.Rubber || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium || aMaterial == Materials.HSSG || aMaterial == Materials.Aluminium))
ring.mDisabledMaterials.add(aMaterial); ring.mDisabledItems.add(aMaterial);
//Foil //Foil
if (!enableUnusedFoil && !(aMaterial == Materials.Zinc || aMaterial == Materials.Aluminium || aMaterial == Materials.Silicon || aMaterial == Materials.Gold || if (!enableUnusedFoil && !(aMaterial == Materials.Zinc || aMaterial == Materials.Aluminium || aMaterial == Materials.Silicon || aMaterial == Materials.Gold ||
aMaterial == Materials.Electrum || aMaterial == Materials.Platinum || aMaterial == Materials.Osmiridium || aMaterial == Materials.Osmium || aMaterial == Materials.Electrum || aMaterial == Materials.Platinum || aMaterial == Materials.Osmiridium || aMaterial == Materials.Osmium ||
aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Steel || aMaterial == Materials.Copper)) aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Steel || aMaterial == Materials.Copper))
foil.mDisabledMaterials.add(aMaterial); foil.mDisabledItems.add(aMaterial);
//Fine Wire //Fine Wire
if (!enableUnusedFineWires && !(aMaterial == Materials.Steel || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Platinum || aMaterial == Materials.Osmium)) if (!enableUnusedFineWires && !(aMaterial == Materials.Steel || aMaterial == Materials.AnnealedCopper || aMaterial == Materials.Platinum || aMaterial == Materials.Osmium))
wireFine.mDisabledMaterials.add(aMaterial); wireFine.mDisabledItems.add(aMaterial);
//Gears //Gears
if (!enableUnusedGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Iron || aMaterial == Materials.Copper || if (!enableUnusedGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Iron || aMaterial == Materials.Copper ||
aMaterial == Materials.Tin || aMaterial == Materials.Gold || aMaterial == Materials.Stone || aMaterial == Materials.Bronze || aMaterial == Materials.Tin || aMaterial == Materials.Gold || aMaterial == Materials.Stone || aMaterial == Materials.Bronze ||
aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.TungstenSteel || aMaterial == Materials.CobaltBrass || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.TungstenSteel || aMaterial == Materials.CobaltBrass ||
aMaterial == Materials.Diamond || aMaterial == Materials.Wood || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium)) aMaterial == Materials.Diamond || aMaterial == Materials.Wood || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium))
gearGt.mDisabledMaterials.add(aMaterial); gearGt.mDisabledItems.add(aMaterial);
//Small Gears //Small Gears
if (!enableUnusedSmallGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || if (!enableUnusedSmallGears && !(aMaterial == Materials.Aluminium || aMaterial == Materials.Titanium || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel ||
aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium)) aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || aMaterial == Materials.Neutronium))
gearGtSmall.mDisabledMaterials.add(aMaterial); gearGtSmall.mDisabledItems.add(aMaterial);
//Bolts //Bolts
if (!enableUnusedBolts && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || if (!enableUnusedBolts && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron ||
aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium ||
aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel ||
aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG)) aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG))
bolt.mDisabledMaterials.add(aMaterial); bolt.mDisabledItems.add(aMaterial);
//Screws //Screws
if (!enableUnusedScrews && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || if (!enableUnusedScrews && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron ||
aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium ||
aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel || aMaterial == Materials.Bronze || aMaterial == Materials.WroughtIron || aMaterial == Materials.Steel || aMaterial == Materials.StainlessSteel ||
aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG)) aMaterial == Materials.PigIron || aMaterial == Materials.TungstenSteel || aMaterial == Materials.HSSE || aMaterial == Materials.HSSG))
screw.mDisabledMaterials.add(aMaterial); screw.mDisabledItems.add(aMaterial);
//Rods //Rods
if (!enableUnusedRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron || if (!enableUnusedRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.Chrome || aMaterial == Materials.Iron ||
aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium || aMaterial == Materials.Tin || aMaterial == Materials.Osmium || aMaterial == Materials.Iridium || aMaterial == Materials.Neutronium ||
@ -730,19 +730,19 @@ public enum OrePrefixes {
aMaterial == Materials.Electrum || aMaterial == Materials.NaquadahEnriched || aMaterial == Materials.CobaltBrass || aMaterial == Materials.IronMagnetic || aMaterial == Materials.Electrum || aMaterial == Materials.NaquadahEnriched || aMaterial == Materials.CobaltBrass || aMaterial == Materials.IronMagnetic ||
aMaterial == Materials.SteelMagnetic || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.Diamond || aMaterial == Materials.SteelMagnetic || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.VanadiumGallium || aMaterial == Materials.Diamond ||
aMaterial == Materials.Wood || aMaterial == Materials.Plastic)) aMaterial == Materials.Wood || aMaterial == Materials.Plastic))
stick.mDisabledMaterials.add(aMaterial); stick.mDisabledItems.add(aMaterial);
//Long Rods //Long Rods
if (!enableUnusedLongRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE || if (!enableUnusedLongRods && ((aMaterial.mTypes & 0x40) == 0) && !(aMaterial == Materials.Titanium || aMaterial == Materials.NeodymiumMagnetic || aMaterial == Materials.HSSG || aMaterial == Materials.HSSE ||
aMaterial == Materials.Neutronium || aMaterial == Materials.Americium || aMaterial == Materials.WroughtIron || aMaterial == Materials.Magnalium || aMaterial == Materials.Neutronium || aMaterial == Materials.Americium || aMaterial == Materials.WroughtIron || aMaterial == Materials.Magnalium ||
aMaterial == Materials.TungstenSteel)) aMaterial == Materials.TungstenSteel))
stickLong.mDisabledMaterials.add(aMaterial); stickLong.mDisabledItems.add(aMaterial);
if (!enableUnusedGems && ((aMaterial.mTypes & 0x04) == 0)) { if (!enableUnusedGems && ((aMaterial.mTypes & 0x04) == 0)) {
gem.mDisabledMaterials.add(aMaterial); gem.mDisabledItems.add(aMaterial);
gemChipped.mDisabledMaterials.add(aMaterial); gemChipped.mDisabledItems.add(aMaterial);
gemFlawless.mDisabledMaterials.add(aMaterial); gemFlawless.mDisabledItems.add(aMaterial);
gemFlawed.mDisabledMaterials.add(aMaterial); gemFlawed.mDisabledItems.add(aMaterial);
gemExquisite.mDisabledMaterials.add(aMaterial); gemExquisite.mDisabledItems.add(aMaterial);
//3685 //3685
} }
@ -754,11 +754,11 @@ public enum OrePrefixes {
aConfigPathSB.append("materialcomponents.").append(aMaterial.mConfigSection).append(".").append(aMaterial.mName); aConfigPathSB.append("materialcomponents.").append(aMaterial.mConfigSection).append(".").append(aMaterial.mName);
String aConfigPath = aConfigPathSB.toString(); String aConfigPath = aConfigPathSB.toString();
for (OrePrefixes aPrefix : Materials.mDefaultComponents) { for (OrePrefixes aPrefix : Materials.mDefaultComponents) {
boolean aEnableComponent = GregTech_API.sMaterialComponents.get(aConfigPath, aPrefix.toString(), !aPrefix.mDisabledMaterials.contains(aMaterial)); boolean aEnableComponent = GregTech_API.sMaterialComponents.get(aConfigPath, aPrefix.toString(), !aPrefix.mDisabledItems.contains(aMaterial));
if (!aEnableComponent) { //Disable component if false and is not already in disabled list if (!aEnableComponent) { //Disable component if false and is not already in disabled list
if (!aPrefix.mDisabledMaterials.contains(aMaterial)) aPrefix.mDisabledMaterials.remove(aMaterial); if (!aPrefix.mDisabledItems.contains(aMaterial)) aPrefix.mDisabledItems.remove(aMaterial);
} else if (aEnableComponent) { //Enable component if true and is not already in enabled list } else if (aEnableComponent) { //Enable component if true and is not already in enabled list
if (aPrefix.mDisabledMaterials.contains(aMaterial)) aPrefix.mDisabledMaterials.remove(aMaterial); if (aPrefix.mDisabledItems.contains(aMaterial)) aPrefix.mDisabledItems.remove(aMaterial);
} }
} }
aConfigPathSB.setLength(0); aConfigPathSB.setLength(0);
@ -835,7 +835,7 @@ public enum OrePrefixes {
} }
public boolean doGenerateItem(Materials aMaterial) { public boolean doGenerateItem(Materials aMaterial) {
return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial) /*|| mDynamicItems.contains(aMaterial)*/) && !mNotGeneratedItems.contains(aMaterial) && !mDisabledMaterials.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial)); return aMaterial != null && aMaterial != Materials._NULL && ((aMaterial.mTypes & mMaterialGenerationBits) != 0 || mGeneratedItems.contains(aMaterial) /*|| mDynamicItems.contains(aMaterial)*/) && !mNotGeneratedItems.contains(aMaterial) && !mDisabledItems.contains(aMaterial) && (mCondition == null || mCondition.isTrue(aMaterial));
} }
public boolean ignoreMaterials(Materials... aMaterials) { public boolean ignoreMaterials(Materials... aMaterials) {
@ -860,11 +860,10 @@ public enum OrePrefixes {
public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { public void processOre(Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack)) { if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack)) {
//if (Materials.mDefaultComponents.contains(this) && this.mDynamicItems.contains(aMaterial)) { //if (Materials.mDefaultComponents.contains(this) && !this.mDynamicItems.contains(aMaterial)) return;
if (Materials.mDefaultComponents.contains(this) && this.mDisabledMaterials.contains(aMaterial)) return; if (Materials.mDefaultComponents.contains(this) && this.mDisabledItems.contains(aMaterial)) return;
for (IOreRecipeRegistrator tRegistrator : mOreProcessing) { for (IOreRecipeRegistrator tRegistrator : mOreProcessing) {
if (D2) if (D2) GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.mName + "' at " + GT_Utility.getClassName(tRegistrator));
GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.mName + "' at " + GT_Utility.getClassName(tRegistrator));
tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack)); tRegistrator.registerOre(this, aMaterial, aOreDictName, aModName, GT_Utility.copyAmount(1, aStack));
} }
} }

View file

@ -50,7 +50,7 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item {
if (tPrefix == null) continue; if (tPrefix == null) continue;
Materials tMaterial = GregTech_API.sGeneratedMaterials[i % 1000]; Materials tMaterial = GregTech_API.sGeneratedMaterials[i % 1000];
if (tMaterial == null) continue; if (tMaterial == null) continue;
if (doesMaterialAllowGeneration(tPrefix, tMaterial) || (tMaterial == Materials.Cobalt && tPrefix == OrePrefixes.spring)) { if (doesMaterialAllowGeneration(tPrefix, tMaterial)) {
ItemStack tStack = new ItemStack(this, 1, i); ItemStack tStack = new ItemStack(this, 1, i);
GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", getDefaultLocalization(tPrefix, tMaterial, i)); GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".name", getDefaultLocalization(tPrefix, tMaterial, i));
GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M)); GT_LanguageManager.addStringLocalization(getUnlocalizedName(tStack) + ".tooltip", tMaterial.getToolTip(tPrefix.mMaterialAmount / M));
@ -146,7 +146,7 @@ public abstract class GT_MetaGenerated_Item_X32 extends GT_MetaGenerated_Item {
OrePrefixes aPrefix = mGeneratedPrefixList[i / 1000]; OrePrefixes aPrefix = mGeneratedPrefixList[i / 1000];
Materials aMaterial = GregTech_API.sGeneratedMaterials[i % 1000]; Materials aMaterial = GregTech_API.sGeneratedMaterials[i % 1000];
if (aPrefix != null && aMaterial != null) { if (aPrefix != null && aMaterial != null) {
if ((doesMaterialAllowGeneration(aPrefix, aMaterial) || (aMaterial == Materials.Cobalt && aPrefix == OrePrefixes.spring)) && doesShowInCreative(aPrefix, aMaterial, GregTech_API.sDoShowAllItemsInCreative)) { if (doesMaterialAllowGeneration(aPrefix, aMaterial) && doesShowInCreative(aPrefix, aMaterial, GregTech_API.sDoShowAllItemsInCreative)) {
ItemStack tStack = new ItemStack(this, 1, i); ItemStack tStack = new ItemStack(this, 1, i);
isItemStackUsable(tStack); isItemStackUsable(tStack);
aList.add(tStack); aList.add(tStack);

View file

@ -119,6 +119,6 @@ public class ItemData {
@Override @Override
public String toString() { public String toString() {
if (mPrefix == null || mMaterial == null || mMaterial.mMaterial == null) return ""; if (mPrefix == null || mMaterial == null || mMaterial.mMaterial == null) return "";
return String.valueOf(new StringBuilder().append(mPrefix.name()).append(mMaterial.mMaterial.mName())); return String.valueOf(new StringBuilder().append(mPrefix.name()).append(mMaterial.mMaterial.mName));
} }
} }

View file

@ -457,7 +457,7 @@ public class GT_ModHandler {
public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) {
aFullContainer = GT_OreDictUnificator.get(true, aFullContainer); aFullContainer = GT_OreDictUnificator.get(true, aFullContainer);
if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false; if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposer, aFullContainer, true)) if (!GT_Mod.gregtechproxy.mTEMachineRecipes && !GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposer, aFullContainer, true))
return false; return false;
try { try {
ThermalExpansion.addTransposerFill(aMJ * 10, aEmptyContainer, aFullContainer, aLiquid, true); ThermalExpansion.addTransposerFill(aMJ * 10, aEmptyContainer, aFullContainer, aLiquid, true);
@ -471,7 +471,7 @@ public class GT_ModHandler {
public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) {
aFullContainer = GT_OreDictUnificator.get(true, aFullContainer); aFullContainer = GT_OreDictUnificator.get(true, aFullContainer);
if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false; if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, true)) if (!GT_Mod.gregtechproxy.mTEMachineRecipes && !GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, true))
return false; return false;
try { try {
ThermalExpansion.addTransposerFill(aMJ * 10, aEmptyContainer, aFullContainer, aLiquid, false); ThermalExpansion.addTransposerFill(aMJ * 10, aEmptyContainer, aFullContainer, aLiquid, false);
@ -485,7 +485,7 @@ public class GT_ModHandler {
public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) { public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) {
aEmptyContainer = GT_OreDictUnificator.get(true, aEmptyContainer); aEmptyContainer = GT_OreDictUnificator.get(true, aEmptyContainer);
if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return false; if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, true)) if (!GT_Mod.gregtechproxy.mTEMachineRecipes && !GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, true))
return false; return false;
try { try {
ThermalExpansion.addTransposerExtract(aMJ * 10, aFullContainer, aEmptyContainer, aLiquid, 100, false); ThermalExpansion.addTransposerExtract(aMJ * 10, aFullContainer, aEmptyContainer, aLiquid, 100, false);
@ -563,8 +563,9 @@ public class GT_ModHandler {
RA.addPulveriserRecipe(aInput, new ItemStack[]{aOutput1, aOutput2, aOutput3}, new int[]{10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3}, 400, 2); RA.addPulveriserRecipe(aInput, new ItemStack[]{aOutput1, aOutput2, aOutput3}, new int[]{10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3}, 400, 2);
if (!OrePrefixes.log.contains(aInput)) { if (!OrePrefixes.log.contains(aInput)) {
boolean aEnableTEMachineRecipes = GT_Mod.gregtechproxy.mTEMachineRecipes;
if (Materials.Wood.contains(aOutput1)) { if (Materials.Wood.contains(aOutput1)) {
if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) { if (aEnableTEMachineRecipes && GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) {
if (aOutput2 == null) if (aOutput2 == null)
ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1)); ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1));
else else
@ -583,7 +584,7 @@ public class GT_ModHandler {
} }
} catch (Throwable e) {/*Do nothing*/} } catch (Throwable e) {/*Do nothing*/}
} }
if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) { if (aEnableTEMachineRecipes && GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) {
if (aOutput2 == null) if (aOutput2 == null)
ThermalExpansion.addPulverizerRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1)); ThermalExpansion.addPulverizerRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1));
else else
@ -627,7 +628,7 @@ public class GT_ModHandler {
aOutput1 = GT_OreDictUnificator.get(true, aOutput1); aOutput1 = GT_OreDictUnificator.get(true, aOutput1);
aOutput2 = GT_OreDictUnificator.get(true, aOutput2); aOutput2 = GT_OreDictUnificator.get(true, aOutput2);
if (aInput1 == null || aOutput1 == null) return false; if (aInput1 == null || aOutput1 == null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.sawmill, aInput1, true)) return false; if (!GT_Mod.gregtechproxy.mTEMachineRecipes && !GregTech_API.sRecipeFile.get(ConfigCategories.Machines.sawmill, aInput1, true)) return false;
try { try {
ThermalExpansion.addSawmillRecipe(1600, aInput1, aOutput1, aOutput2, 100); ThermalExpansion.addSawmillRecipe(1600, aInput1, aOutput1, aOutput2, 100);
} catch (Throwable e) {/*Do nothing*/} } catch (Throwable e) {/*Do nothing*/}
@ -654,7 +655,7 @@ public class GT_ModHandler {
aOutput1 = GT_OreDictUnificator.get(true, aOutput1); aOutput1 = GT_OreDictUnificator.get(true, aOutput1);
aOutput2 = GT_OreDictUnificator.get(true, aOutput2); aOutput2 = GT_OreDictUnificator.get(true, aOutput2);
if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1, false) != null) return false; if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1, false) != null) return false;
if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.inductionsmelter, aInput2 == null ? aInput1 : aOutput1, true)) if (!GT_Mod.gregtechproxy.mTEMachineRecipes && !GregTech_API.sRecipeFile.get(ConfigCategories.Machines.inductionsmelter, aInput2 == null ? aInput1 : aOutput1, true))
return false; return false;
try { try {
ThermalExpansion.addSmelterRecipe(aEnergy * 10, GT_Utility.copy(aInput1), aInput2 == null ? new ItemStack(Blocks.sand, 1, 0) : aInput2, aOutput1, aOutput2, aChance); ThermalExpansion.addSmelterRecipe(aEnergy * 10, GT_Utility.copy(aInput1), aInput2 == null ? new ItemStack(Blocks.sand, 1, 0) : aInput2, aOutput1, aOutput2, aChance);

View file

@ -94,12 +94,8 @@ public class GT_OreDictUnificator {
} }
public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) { public static ItemStack get(OrePrefixes aPrefix, Object aMaterial, ItemStack aReplacement, long aAmount) {
//if (aPrefix.mDisabledMaterials.contains((Materials) aMaterial) && !Materials.mTempComponents.contains(aPrefix)) System.out.println("##### Prefix: " + aPrefix); //if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) aPrefix.mDynamicItems.add((Materials) aMaterial);
if (Materials.mDefaultComponents.contains(aPrefix) && aPrefix.mDisabledMaterials.contains(aMaterial)) return null; if (Materials.mDefaultComponents.contains(aPrefix) && aPrefix.mDisabledItems.contains(aMaterial)) return null;
/*if (Materials.mDefaultComponents.contains(aPrefix) && !aPrefix.mDynamicItems.contains((Materials)aMaterial)) {
aPrefix.mDynamicItems.add((Materials) aMaterial);
System.out.println("##### Added component to dynamic items");
}*/
return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true); return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true);
} }

View file

@ -38,23 +38,23 @@ public class GT_Worldgen_GT_Ore_Layer
public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean aMoon, boolean aMars, boolean aAsteroid, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) { public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean aMoon, boolean aMars, boolean aAsteroid, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
super(aName, sList, aDefault); super(aName, sList, aDefault);
this.mOverworld = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Overworld", aOverworld); this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
this.mNether = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Nether", aNether); this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
this.mEnd = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "TheEnd", aEnd); this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd);
this.mEndAsteroid = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "EndAsteroid", aEnd); this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd);
this.mMoon = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Moon", aMoon); this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
this.mMars = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Mars", aMars); this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
this.mAsteroid = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Asteroid", aAsteroid); this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
this.mMinY = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MinHeight", aMinY)); this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY));
this.mMaxY = ((short) Math.max(this.mMinY + 5, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MaxHeight", aMaxY))); this.mMaxY = ((short) Math.max(this.mMinY + 5, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY)));
this.mWeight = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RandomWeight", aWeight)); this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
this.mDensity = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Density", aDensity)); this.mDensity = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Size", aSize))); this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID)); this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary.mMetaItemSubID));
this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID)); this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID)); this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID)); this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RestrictToBiomeName", "None"); this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
//if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist"); //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist");
//if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist"); //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist");

View file

@ -3,7 +3,6 @@ package gregtech.loaders.materialprocessing;
import gregtech.api.GregTech_API; import gregtech.api.GregTech_API;
import gregtech.api.enums.Dyes; import gregtech.api.enums.Dyes;
import gregtech.api.enums.Materials; import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TextureSet; import gregtech.api.enums.TextureSet;
public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandler { public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandler {
@ -22,19 +21,20 @@ public class ProcessingConfig implements gregtech.api.interfaces.IMaterialHandle
@Override @Override
public void onComponentRegistration(Materials aMaterial) { public void onComponentRegistration(Materials aMaterial) {
/** This is just left here as an example of how to add components.
switch (aMaterial.mName) { switch (aMaterial.mName) {
case "Cobalt": case "Cobalt":
OrePrefixes.spring.mDisabledMaterials.remove(aMaterial); OrePrefixes.spring.mDisabledItems.remove(aMaterial);
OrePrefixes.ingotDouble.mDisabledMaterials.remove(aMaterial); OrePrefixes.ingotDouble.mDisabledItems.remove(aMaterial);
OrePrefixes.ingotTriple.mDisabledMaterials.remove(aMaterial); OrePrefixes.ingotTriple.mDisabledItems.remove(aMaterial);
OrePrefixes.ingotQuadruple.mDisabledMaterials.remove(aMaterial); OrePrefixes.ingotQuadruple.mDisabledItems.remove(aMaterial);
OrePrefixes.ingotQuintuple.mDisabledMaterials.remove(aMaterial); OrePrefixes.ingotQuintuple.mDisabledItems.remove(aMaterial);
OrePrefixes.plateDouble.mDisabledMaterials.remove(aMaterial); OrePrefixes.plateDouble.mDisabledItems.remove(aMaterial);
OrePrefixes.plateTriple.mDisabledMaterials.remove(aMaterial); OrePrefixes.plateTriple.mDisabledItems.remove(aMaterial);
OrePrefixes.plateQuadruple.mDisabledMaterials.remove(aMaterial); OrePrefixes.plateQuadruple.mDisabledItems.remove(aMaterial);
OrePrefixes.plateQuintuple.mDisabledMaterials.remove(aMaterial); OrePrefixes.plateQuintuple.mDisabledItems.remove(aMaterial);
OrePrefixes.plateDense.mDisabledMaterials.remove(aMaterial); OrePrefixes.plateDense.mDisabledItems.remove(aMaterial);
break; break;
} }**/
} }
} }

View file

@ -1,11 +0,0 @@
package gregtech.loaders.preload;
import gregtech.api.util.GT_Log;
import gregtech.loaders.materialprocessing.ProcessingConfig;
public class GT_Loader_MaterialProcessing implements Runnable {
public void run() {
GT_Log.out.println("GT_Mod: Register Material processing.");
new ProcessingConfig();
}
}