Fixed Materials limitation
Added ability to add Materials via a config
Added ability to change all properties of a Material via a config
This commit is contained in:
Muramasa 2016-08-17 06:09:55 +01:00
parent e6ecf4f298
commit 6917673264
22 changed files with 3193 additions and 1540 deletions

View file

@ -127,6 +127,7 @@ public class GT_Mod
GregTech_API.sUnification = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Unification.cfg")));
GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Other.cfg")));
GregTech_API.sOPStuff = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "OverpoweredStuff.cfg")));
GregTech_API.sMaterialsFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Materials.cfg")));
GregTech_API.sClientDataFile = new GT_Config(new Configuration(new File(aEvent.getModConfigurationDirectory().getParentFile(), "GregTech.cfg")));
@ -246,7 +247,7 @@ public class GT_Mod
if(gregtechproxy.mChangeHarvestLevels){
gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3);
gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7));
for(Materials tMaterial : Materials.values()){
for(Materials tMaterial : Materials.VALUES){
if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID<gregtechproxy.mHarvestLevel.length&&tMaterial.mMetaItemSubID>=0){
gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality);
}
@ -270,8 +271,7 @@ public class GT_Mod
}
}
//GT_Config.troll = (Calendar.getInstance().get(2) + 1 == 4) && (Calendar.getInstance().get(5) >= 1) && (Calendar.getInstance().get(5) <= 2);
Materials.init(GregTech_API.sMaterialProperties);
Materials.initCustomMats("custom");
GT_Log.out.println("GT_Mod: Saving Main Config");
tMainConfig.save();

View file

@ -169,7 +169,7 @@ public class GregTech_API {
/**
* The Configuration Objects
*/
public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null;
public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null, sMaterialsFile = null;
public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100;
/**
* Initialized by the Block creation.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -700,7 +700,7 @@ public enum OrePrefixes {
if (aMaterial != null && (aMaterial != Materials._NULL || mIsSelfReferencing || !mIsMaterialBased) && GT_Utility.isStackValid(aStack))
for (IOreRecipeRegistrator tRegistrator : mOreProcessing) {
if (D2)
GT_Log.ore.println("Processing '" + aOreDictName + "' with the Prefix '" + name() + "' and the Material '" + aMaterial.name() + "' 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));
}
}
@ -723,19 +723,19 @@ public enum OrePrefixes {
case crateGtPlate:
return mLocalizedMaterialPre + OrePrefixes.plate.getDefaultLocalNameForItem(aMaterial);
}
switch (aMaterial) {
case Glass:
switch (aMaterial.mName) {
case "Glass":
if (name().startsWith("gem")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystal";
if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pane";
break;
case InfusedAir:
case InfusedDull:
case InfusedEarth:
case InfusedEntropy:
case InfusedFire:
case InfusedOrder:
case InfusedVis:
case InfusedWater:
case "InfusedAir":
case "InfusedDull":
case "InfusedEarth":
case "InfusedEntropy":
case "InfusedFire":
case "InfusedOrder":
case "InfusedVis":
case "InfusedWater":
if (name().startsWith("gem")) return mLocalizedMaterialPre + "Shard of " + aMaterial.mDefaultLocalName;
if (name().startsWith("crystal"))
return mLocalizedMaterialPre + "Shard of " + aMaterial.mDefaultLocalName;
@ -750,48 +750,48 @@ public enum OrePrefixes {
if (this == OrePrefixes.crushed)
return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Crystals";
break;
case Wheat:
case "Wheat":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Flour";
break;
case Ice:
case "Ice":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Crushed Ice";
break;
case Wood:
case WoodSealed:
case "Wood":
case "WoodSealed":
if (name().startsWith("bolt")) return "Short " + aMaterial.mDefaultLocalName + " Stick";
if (name().startsWith("stick")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Stick";
if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pulp";
if (name().startsWith("nugget")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Chip";
if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Plank";
break;
case Plastic:
case Rubber:
case "Plastic":
case "Rubber":
if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Pulp";
if (name().startsWith("plate")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Sheet";
if (name().startsWith("ingot")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Bar";
if (name().startsWith("nugget")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Chip";
if (name().startsWith("foil")) return "Thin " + aMaterial.mDefaultLocalName + " Sheet";
break;
case FierySteel:
case "FierySteel":
if (mIsContainer) return mLocalizedMaterialPre + "Fiery Blood" + mLocalizedMaterialPost;
break;
case Steeleaf:
case "Steeleaf":
if (name().startsWith("ingot")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
break;
case Bone:
case "Bone":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Bone Meal";
break;
case Blaze:
case Milk:
case Cocoa:
case Chocolate:
case Coffee:
case Chili:
case Cheese:
case Snow:
case "Blaze":
case "Milk":
case "Cocoa":
case "Chocolate":
case "Coffee":
case "Chili":
case "Cheese":
case "Snow":
if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName + " Powder";
break;
case Paper:
case "Paper":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Chad";
if (this == OrePrefixes.plate) return "Sheet of Paper";
if (this == OrePrefixes.plateDouble) return "Paperboard";
@ -800,34 +800,34 @@ public enum OrePrefixes {
if (this == OrePrefixes.plateQuintuple) return "Thick Cardboard";
if (this == OrePrefixes.plateDense) return "Strong Cardboard";
break;
case MeatRaw:
case "MeatRaw":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Mince Meat";
break;
case MeatCooked:
case "MeatCooked":
if (name().startsWith("dust")) return mLocalizedMaterialPre + "Cooked Mince Meat";
break;
case Ash:
case DarkAsh:
case Gunpowder:
case Sugar:
case Salt:
case RockSalt:
case VolcanicAsh:
case RareEarth:
case "Ash":
case "DarkAsh":
case "Gunpowder":
case "Sugar":
case "Salt":
case "RockSalt":
case "VolcanicAsh":
case "RareEarth":
if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
break;
case Vermiculite:
case Bentonite:
case Kaolinite:
case Talc:
case BasalticMineralSand:
case GraniticMineralSand:
case GlauconiteSand:
case CassiteriteSand:
case GarnetSand:
case QuartzSand:
case Pitchblende:
case FullersEarth:
case "Vermiculite":
case "Bentonite":
case "Kaolinite":
case "Talc":
case "BasalticMineralSand":
case "GraniticMineralSand":
case "GlauconiteSand":
case "CassiteriteSand":
case "GarnetSand":
case "QuartzSand":
case "Pitchblende":
case "FullersEarth":
if (name().startsWith("dust")) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
if (this == OrePrefixes.crushedCentrifuged) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;
if (this == OrePrefixes.crushedPurified) return mLocalizedMaterialPre + aMaterial.mDefaultLocalName;

View file

@ -184,10 +184,10 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements
if (tToolStats != null) {
NBTTagCompound tMainNBT = new NBTTagCompound(), tToolNBT = new NBTTagCompound();
if (aPrimaryMaterial != null) {
tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.toString());
tToolNBT.setString("PrimaryMaterial", aPrimaryMaterial.mName);
tToolNBT.setLong("MaxDamage", 100L * (long) (aPrimaryMaterial.mDurability * tToolStats.getMaxDurabilityMultiplier()));
}
if (aSecondaryMaterial != null) tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.toString());
if (aSecondaryMaterial != null) tToolNBT.setString("SecondaryMaterial", aSecondaryMaterial.mName);
if (aElectricArray != null) {
tToolNBT.setBoolean("Electric", true);

View file

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

View file

@ -1,7 +1,6 @@
package gregtech.api.util;
import cpw.mods.fml.common.Loader;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Materials;
@ -63,7 +62,6 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
* @param aGrowthSpeed how fast the Crop grows. if < 0 then its set to Tier*300
* @param aHarvestSize the size the Crop needs to be harvested. forced to be between 2 and max size
* @param aBlock the block below needed for crop to grow. If null no block needed
* @param aMeta meta of the block below(-1 if no meta)
*/
public GT_BaseCrop(int aID, String aCropName, String aDiscoveredBy, ItemStack aBaseSeed, int aTier, int aMaxSize, int aGrowthSpeed, int aAfterHarvestSize, int aHarvestSize, int aStatChemical, int aStatFood, int aStatDefensive, int aStatColor, int aStatWeed, String[] aAttributes, Materials aBlock, ItemStack aDrop, ItemStack[] aSpecialDrops) {
mName = aCropName;
@ -238,7 +236,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
public List<String> getCropInformation() {
if (mBlock != null) {
ArrayList<String> result = new ArrayList<String>(1);
result.add(String.format("Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.name(), mBlock.name()));
result.add(String.format("Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.mName, mBlock.mName));
return result;
}
return null;

View file

@ -623,12 +623,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
Character.valueOf('R'), OrePrefixes.ring.get(Materials.Steel)});
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.toolHeadDrill, aMaterial, 1L), tBits, new Object[]{"XSX", "XSX",
"ShS", Character.valueOf('X'), OrePrefixes.plate.get(aMaterial), Character.valueOf('S'), OrePrefixes.plate.get(Materials.Steel)});
switch (aMaterial) {
case Wood:
switch (aMaterial.mName) {
case "Wood":
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " s",
Character.valueOf('P'), OrePrefixes.plank.get(aMaterial)});
break;
case Stone:
case "Stone":
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits, new Object[]{"P ", " f",
Character.valueOf('P'), OrePrefixes.stoneSmooth});
break;
@ -636,12 +636,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L), tBits,
new Object[]{"P ", aMaterial.contains(SubTag.WOOD) ? " s" : " h", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial)});
}
switch (aMaterial) {
case Wood:
switch (aMaterial.mName) {
case "Wood":
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PsP", "SPS",
Character.valueOf('P'), OrePrefixes.plank.get(aMaterial), Character.valueOf('S'), OrePrefixes.stick.get(aMaterial)});
break;
case Stone:
case "Stone":
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L), tBits, new Object[]{"SPS", "PfP", "SPS",
Character.valueOf('P'), OrePrefixes.stoneSmooth, Character.valueOf('S'), new ItemStack(Blocks.stone_button, 1, 32767)});
break;
@ -703,7 +703,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gemFlawless.get(aMaterial)});
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, 2L), tBits,
new Object[]{"h", "X", Character.valueOf('X'), OrePrefixes.gemExquisite.get(aMaterial)});
if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.name(), true))) {
if ((aMaterial.contains(SubTag.MORTAR_GRINDABLE)) && (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, aMaterial.mName, true))) {
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), tBits,
new Object[]{"X", "m", Character.valueOf('X'), OrePrefixes.gemChipped.get(aMaterial)});
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L), tBits,
@ -1138,31 +1138,31 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
break;
case gem:
switch (aMaterial) {
case Lapis:
case Sodalite:
switch (aMaterial.mName) {
case "Lapis":
case "Sodalite":
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
break;
case Lazurite:
case "Lazurite":
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
break;
case InfusedAir:
case InfusedWater:
case InfusedFire:
case InfusedEarth:
case InfusedOrder:
case InfusedEntropy:
GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
case "InfusedAir":
case "InfusedWater":
case "InfusedFire":
case "InfusedEarth":
case "InfusedOrder":
case "InfusedEntropy":
GT_OreDictUnificator.registerOre(aMaterial.mName.replaceFirst("Infused", "shard"), aEvent.Ore);
break;
case Chocolate:
case "Chocolate":
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
break;
case CertusQuartz:
case NetherQuartz:
case "CertusQuartz":
case "NetherQuartz":
GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
case Fluix:
case Quartz:
case Quartzite:
case "Fluix":
case "Quartz":
case "Quartzite":
GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
default:
@ -1758,12 +1758,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
return addFluid("molten." + aMaterial.name().toLowerCase(), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
return addFluid("molten." + aMaterial.mName.toLowerCase(), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, null, null, 0);
}
public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
return addFluid("plasma." + aMaterial.name().toLowerCase(), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
return addFluid("plasma." + aMaterial.mName.toLowerCase(), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]),
1000);
}

View file

@ -90,28 +90,28 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
}
public String getLocalizedName(Materials aMaterial) {
switch (aMaterial) {
case InfusedAir:
case InfusedDull:
case InfusedEarth:
case InfusedEntropy:
case InfusedFire:
case InfusedOrder:
case InfusedVis:
case InfusedWater:
switch (aMaterial.mName) {
case "InfusedAir":
case "InfusedDull":
case "InfusedEarth":
case "InfusedEntropy":
case "InfusedFire":
case "InfusedOrder":
case "InfusedVis":
case "InfusedWater":
return aMaterial.mDefaultLocalName + " Infused Stone";
case Vermiculite:
case Bentonite:
case Kaolinite:
case Talc:
case BasalticMineralSand:
case GraniticMineralSand:
case GlauconiteSand:
case CassiteriteSand:
case GarnetSand:
case QuartzSand:
case Pitchblende:
case FullersEarth:
case "Vermiculite":
case "Bentonite":
case "Kaolinite":
case "Talc":
case "BasalticMineralSand":
case "GraniticMineralSand":
case "GlauconiteSand":
case "CassiteriteSand":
case "GarnetSand":
case "QuartzSand":
case "Pitchblende":
case "FullersEarth":
return aMaterial.mDefaultLocalName;
default:
return aMaterial.mDefaultLocalName + OrePrefixes.ore.mLocalizedMaterialPost;

View file

@ -844,7 +844,7 @@ public class GT_MetaGenerated_Item_01
}
public boolean doesShowInCreative(OrePrefixes aPrefix, Materials aMaterial, boolean aDoShowAllItems) {
return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.name().startsWith("Infused"))) && (aPrefix != OrePrefixes.nugget) && (aPrefix != OrePrefixes.dustTiny) && (aPrefix != OrePrefixes.dustSmall) && (aPrefix != OrePrefixes.dustImpure) && (aPrefix != OrePrefixes.dustPure) && (aPrefix != OrePrefixes.crushed) && (aPrefix != OrePrefixes.crushedPurified) && (aPrefix != OrePrefixes.crushedCentrifuged) && (aPrefix != OrePrefixes.ingotHot) && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial)));
return (aDoShowAllItems) || (((aPrefix != OrePrefixes.gem) || (!aMaterial.mName.startsWith("Infused"))) && (aPrefix != OrePrefixes.nugget) && (aPrefix != OrePrefixes.dustTiny) && (aPrefix != OrePrefixes.dustSmall) && (aPrefix != OrePrefixes.dustImpure) && (aPrefix != OrePrefixes.dustPure) && (aPrefix != OrePrefixes.crushed) && (aPrefix != OrePrefixes.crushedPurified) && (aPrefix != OrePrefixes.crushedCentrifuged) && (aPrefix != OrePrefixes.ingotHot) && !(aPrefix == OrePrefixes.cellPlasma && !isPlasmaCellUsed(aPrefix, aMaterial)));
}
public ItemStack getContainerItem(ItemStack aStack) {

View file

@ -1,9 +1,5 @@
package gregtech.loaders.misc;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@ -33,6 +29,10 @@ import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import net.minecraftforge.fluids.FluidStack;
import thaumcraft.api.ThaumcraftApiHelper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class GT_Achievements {
public static List<Materials> oreList = new ArrayList<Materials>();
@ -47,8 +47,8 @@ public class GT_Achievements {
this.achievementList = new HashMap();
this.issuedAchievements = new HashMap();
for (int i = 0; i < oreList.size(); i++) {
if (GT_Values.D1 && this.achievementList.get(oreList.get(i).name()) == null) {
GT_Log.out.println("achievement." + oreList.get(i).name() + "=Find " + oreList.get(i).name() + " Ore");
if (GT_Values.D1 && this.achievementList.get(oreList.get(i).mName) == null) {
GT_Log.out.println("achievement." + oreList.get(i).mName + "=Find " + oreList.get(i).mName + " Ore");
StringBuilder dimensions = new StringBuilder();
boolean isFirst = true;
@ -66,7 +66,7 @@ public class GT_Achievements {
dimensions.append("End");
isFirst = false;
}
GT_Log.out.println("achievement." + oreList.get(i).name() + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString());
GT_Log.out.println("achievement." + oreList.get(i).mName + ".desc=Height: " + (oreStats.get(i)[0]) + "-" + (oreStats.get(i)[1]) + ", Chance: " + (oreStats.get(i)[2]) + ", " + dimensions.toString());
}
registerOreAchievement(oreList.get(i));
}
@ -249,9 +249,9 @@ public class GT_Achievements {
}
public Achievement registerOreAchievement(Materials aMaterial) {
if (this.achievementList.get(aMaterial.name()) == null) {
if (this.achievementList.get(aMaterial.mName) == null) {
oreReg++;
return registerAchievement(aMaterial.name(), -(6 + oreReg % 5), ((oreReg) / 5) - 8, new ItemStack(GregTech_API.sBlockOres1, 1,
return registerAchievement(aMaterial.mName, -(6 + oreReg % 5), ((oreReg) / 5) - 8, new ItemStack(GregTech_API.sBlockOres1, 1,
aMaterial.mMetaItemSubID), AchievementList.openInventory, false);
}
return null;
@ -498,7 +498,7 @@ public class GT_Achievements {
} else if (data.mPrefix == OrePrefixes.ore || data.mPrefix == OrePrefixes.oreBlackgranite || data.mPrefix == OrePrefixes.oreEndstone
|| data.mPrefix == OrePrefixes.oreNetherrack || data.mPrefix == OrePrefixes.oreRedgranite) {
for (int i = 0; i < data.getAllMaterialStacks().size(); i++) {
issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.name());
issueAchievement(player, data.getAllMaterialStacks().get(i).mMaterial.mName);
if (data.getAllMaterialStacks().get(i).mMaterial == Materials.AnyIron) {
issueAchievement(player, "iron");
}

View file

@ -1,13 +1,13 @@
package gregtech.loaders.misc;
import java.io.File;
import java.util.HashMap;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import java.io.File;
import java.util.HashMap;
public class OreProcessingConfiguration
implements Runnable
{
@ -31,7 +31,7 @@ public class OreProcessingConfiguration
{
if (tMaterial != null && tMaterial != Materials._NULL)
{
String tMaterialName = tMaterial.name();
String tMaterialName = tMaterial.mName;
boolean tDefaultValue = (tMaterial.mTypes & 8) != 0;
Property tProperty =
this.mConfiguration.get("processores", tMaterialName + "_" + tDefaultValue, tDefaultValue);
@ -42,7 +42,8 @@ public class OreProcessingConfiguration
@Override
public void run()
{
for (String tMaterialName : this.mEnabledMaterials.keySet())
//TODO Reimplement
/*for (String tMaterialName : this.mEnabledMaterials.keySet())
{
if (this.mEnabledMaterials.get(tMaterialName))
{
@ -50,9 +51,10 @@ public class OreProcessingConfiguration
}
else if ((Materials.valueOf(tMaterialName).mTypes & 8) != 0)
{
Materials.valueOf(tMaterialName).mTypes ^= 8;
}
Materials.VALUES.valueOf(tMaterialName).mTypes ^= 8;
}
Materials.VALUES.
}*/
}
}

View file

@ -56,16 +56,16 @@ public class ProcessingBlock implements gregtech.api.interfaces.IOreRecipeRegist
GT_ModHandler.addShapelessCraftingRecipe(tStack1, new Object[]{OrePrefixes.block.get(aMaterial)});
}
}
switch (aMaterial) {
case Mercury:
switch (aMaterial.mName) {
case "Mercury":
System.err.println("'blockQuickSilver'?, In which Ice Desert can you actually place this as a solid Block?");
break;
case Iron:
case WroughtIron:
case "Iron":
case "WroughtIron":
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Rod.get(0L, new Object[0]), ItemList.IC2_ShaftIron.get(1L, new Object[0]), 640, 120);
GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4);
break;
case Steel:
case "Steel":
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Rod.get(0L, new Object[0]), ItemList.IC2_ShaftSteel.get(1L, new Object[0]), 1280, 120);
GT_Values.RA.addAssemblerRecipe(ItemList.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4);
}

View file

@ -13,21 +13,21 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
switch (aMaterial) {
case Good:
case Advanced:
case Data:
case Elite:
case Master:
case Ultimate:
switch (aMaterial.mName) {
case "Good":
case "Advanced":
case "Data":
case "Elite":
case "Master":
case "Ultimate":
if (!gregtech.api.util.GT_OreDictUnificator.isBlacklisted(aStack))
GT_ModHandler.removeRecipeByOutput(aStack);
break;
case Primitive:
case "Primitive":
GT_ModHandler.removeRecipeByOutput(aStack);
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Primitive.get(1L, new Object[0]), new Object[]{GT_ModHandler.getIC2Item("casingadviron", 1L), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.RedAlloy), OrePrefixes.wireGt01.get(Materials.Tin)});
break;
case Basic:
case "Basic":
GT_ModHandler.removeRecipeByOutput(aStack);
GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WWW", "CPC", "WWW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OreDictNames.craftingWireCopper, Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel)});
GT_ModHandler.addCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{"WCW", "WPW", "WCW", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Primitive), Character.valueOf('W'), OreDictNames.craftingWireCopper, Character.valueOf('P'), OrePrefixes.plate.get(Materials.Steel)});

View file

@ -108,80 +108,80 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr
GT_Values.RA.addAutoclaveRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getDistilledWater(200L), GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 9000, 1500, 24);
}
switch (aMaterial) {
case _NULL:
switch (aMaterial.mName) {
case "_NULL":
break;
case Glass:
case "Glass":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(net.minecraft.init.Blocks.glass));
break;
case NetherQuartz:
case Quartz:
case CertusQuartz:
case "NetherQuartz":
case "Quartz":
case "CertusQuartz":
if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "QuartzDustSmeltingIntoAESilicon", true))
GT_ModHandler.removeFurnaceSmelting(aStack);
break;
case MeatRaw:
case "MeatRaw":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L));
break;
case Mercury:
case "Mercury":
System.err.println("Quicksilver Dust?, To melt that, you don't even need a Furnace...");
break;
case Tetrahedrite:
case Chalcopyrite:
case Malachite:
case "Tetrahedrite":
case "Chalcopyrite":
case "Malachite":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 6L));
break;
case Pentlandite:
case "Pentlandite":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 6L));
break;
case Garnierite:
case "Garnierite":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 1L));
break;
case Cassiterite:
case CassiteriteSand:
case "Cassiterite":
case "CassiteriteSand":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L));
break;
case Magnetite:
case VanadiumMagnetite:
case BasalticMineralSand:
case GraniticMineralSand:
case "Magnetite":
case "VanadiumMagnetite":
case "BasalticMineralSand":
case "GraniticMineralSand":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Iron, 3L));
break;
case YellowLimonite:
case BrownLimonite:
case BandedIron:
case "YellowLimonite":
case "BrownLimonite":
case "BandedIron":
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Iron, 1L));
break;
case Coal:
case "Coal":
GT_ModHandler.addLiquidTransposerFillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), 125);
break;
case HydratedCoal:
case "HydratedCoal":
GT_ModHandler.addLiquidTransposerEmptyRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.Water.getFluid(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), 125);
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L));
break;
case Diamond:
case "Diamond":
GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 32, ItemList.IC2_Industrial_Diamond.get(3L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 16L));
break;
case Opal:
case Olivine:
case Emerald:
case Ruby:
case Sapphire:
case GreenSapphire:
case Topaz:
case BlueTopaz:
case Tanzanite:
case "Opal":
case "Olivine":
case "Emerald":
case "Ruby":
case "Sapphire":
case "GreenSapphire":
case "Topaz":
case "BlueTopaz":
case "Tanzanite":
GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 24, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 12L));
break;
case FoolsRuby:
case GarnetRed:
case GarnetYellow:
case Jasper:
case Amber:
case Monazite:
case Forcicium:
case Forcillium:
case Force:
case "FoolsRuby":
case "GarnetRed":
case "GarnetYellow":
case "Jasper":
case "Amber":
case "Monazite":
case "Forcicium":
case "Forcillium":
case "Force":
GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 16, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 8L));
}
}

View file

@ -40,15 +40,15 @@ public class ProcessingGem implements gregtech.api.interfaces.IOreRecipeRegistra
}
gregtech.api.util.GT_RecipeRegistrator.registerUsagesForMaterials(GT_Utility.copyAmount(1L, new Object[]{aStack}), OrePrefixes.plate.get(aMaterial).toString(), !aMaterial.contains(SubTag.NO_SMASHING));
switch (aMaterial) {
case _NULL:
switch (aMaterial.mName) {
case "_NULL":
break;
case Coal:
case Charcoal:
case "Coal":
case "Charcoal":
if (gregtech.api.GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false))
GT_ModHandler.removeRecipe(new ItemStack[]{GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, new ItemStack(net.minecraft.init.Items.stick, 1, 0)});
break;
case CertusQuartz:
case "CertusQuartz":
GT_Values.RA.addElectrolyzerRecipe(aStack, 0, GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 1), null, null, null, null, null, 2000, 30);
}
}

View file

@ -28,47 +28,47 @@ public class ProcessingPlate1 implements gregtech.api.interfaces.IOreRecipeRegis
if (aMaterial.mStandardMoltenFluid != null) {
GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), 32, 8);
}
switch (aMaterial) {
case Iron:
switch (aMaterial.mName) {
case "Iron":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.iron_block, 1, 0), null);
break;
case Gold:
case "Gold":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.gold_block, 1, 0), null);
break;
case Diamond:
case "Diamond":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.diamond_block, 1, 0), null);
break;
case Emerald:
case "Emerald":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.emerald_block, 1, 0), null);
break;
case Lapis:
case "Lapis":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.lapis_block, 1, 0), null);
break;
case Coal:
case "Coal":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.coal_block, 1, 0), null);
break;
case Redstone:
case "Redstone":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.redstone_block, 1, 0), null);
break;
case Glowstone:
case "Glowstone":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.glowstone, 1, 0), null);
break;
case NetherQuartz:
case "NetherQuartz":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.quartz_block, 1, 0), null);
break;
case Obsidian:
case "Obsidian":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.obsidian, 1, 0), null);
break;
case Stone:
case "Stone":
GregTech_API.registerCover(aStack, new GT_CopiedBlockTexture(Blocks.stone, 1, 0), null);
break;
case GraniteBlack:
case "GraniteBlack":
GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.GRANITE_BLACK_SMOOTH), null);
break;
case GraniteRed:
case "GraniteRed":
GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.GRANITE_RED_SMOOTH), null);
break;
case Concrete:
case "Concrete":
GregTech_API.registerCover(aStack, new GT_RenderedTexture(gregtech.api.enums.Textures.BlockIcons.CONCRETE_LIGHT_SMOOTH), null);
break;
default:

View file

@ -62,19 +62,19 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterial.getMass() * 2L * tAmount, tAmount), 2 * tVoltageMultiplier);
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), ItemList.Shape_Mold_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial.mSmeltInto, tAmount), (int) Math.max(aMaterial.getMass() * 10L * tAmount, tAmount), 2 * tVoltageMultiplier);
switch (aMaterial.mSmeltInto) {
case Glass:
switch (aMaterial.mSmeltInto.mName) {
case "Glass":
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Bottle.get(0L, new Object[0]), new ItemStack(Items.glass_bottle, 1), tAmount * 32, 16);
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Mold_Bottle.get(0L, new Object[0]), new ItemStack(Items.glass_bottle, 1), tAmount * 64, 4);
break;
case Steel:
case "Steel":
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingadviron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingadviron", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier);
break;
case Iron:
case WroughtIron:
case "Iron":
case "WroughtIron":
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), GT_ModHandler.getIC2Item("fuelRod", tAmount), tAmount * 128, 32);
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingiron", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
@ -83,33 +83,33 @@ public class ProcessingShaping implements gregtech.api.interfaces.IOreRecipeRegi
if (tAmount * 31 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(31L, new Object[]{aStack}), ItemList.Shape_Mold_Anvil.get(0L, new Object[0]), new ItemStack(Blocks.anvil, 1, 0), tAmount * 512, 4 * tVoltageMultiplier);
break;
case Tin:
case "Tin":
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Extruder_Cell.get(0L, new Object[0]), ItemList.Cell_Empty.get(tAmount, new Object[0]), tAmount * 128, 32);
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier);
break;
case Lead:
case "Lead":
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier);
break;
case Copper:
case AnnealedCopper:
case "Copper":
case "AnnealedCopper":
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier);
break;
case Bronze:
case "Bronze":
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), ItemList.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", tAmount * 3), tAmount * 128, 1 * tVoltageMultiplier);
break;
case Gold:
case "Gold":
if (tAmount * 2 <= 64)
GT_Values.RA.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinggold", tAmount * 2), tAmount * 32, 3 * tVoltageMultiplier);
if (tAmount * 2 <= 64)

View file

@ -21,23 +21,23 @@ public class ProcessingStone
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
Block aBlock = GT_Utility.getBlockFromStack(aStack);
switch (aMaterial) {
case _NULL:
switch (aMaterial.mName) {
case "_NULL":
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), new ItemStack(Blocks.redstone_torch, 2), Materials.Redstone.getMolten(144L), new ItemStack(Items.repeater, 1), 100, 4);
break;
case Sand:
case "Sand":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.sand, 1, 0), null, 10, false);
break;
case Endstone:
case "Endstone":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 1L), 5, false);
break;
case Netherrack:
case "Netherrack":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5, false);
break;
case NetherBrick:
case "NetherBrick":
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new ItemStack(Blocks.nether_brick_fence, 1), 100, 4);
break;
case Obsidian:
case "Obsidian":
if (aBlock != Blocks.air) aBlock.setResistance(20.0F);
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 2L), GT_Utility.copyAmount(5L, new Object[]{aStack}), Materials.Glass.getMolten(72L), GT_ModHandler.getModItem("Forestry", "thermionicTubes", 4L, 6), 64, 32);
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherStar, 1L), GT_Utility.copyAmount(3L, new Object[]{aStack}), Materials.Glass.getMolten(720L), new ItemStack(Blocks.beacon, 1, 0), 32, 16);
@ -46,51 +46,51 @@ public class ProcessingStone
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("Railcraft", "cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true);
GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 32);
break;
case Concrete:
case "Concrete":
GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 100, 32);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L));
break;
case Rhyolite:
case "Rhyolite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartz, 1L), 20, false);
break;
case Komatiite:
case "Komatiite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Biotite, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 5, false);
break;
case Dacite:
case Andesite:
case "Dacite":
case "Andesite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 1L), 20, false);
break;
case Gabbro:
case "Gabbro":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PotassiumFeldspar, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Pyrite, 1L), 20, false);
break;
case Eclogite:
case "Eclogite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Rutile, 1L), 10, false);
break;
case Soapstone:
case "Soapstone":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Talc, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Chromite, 1L), 10, false);
break;
case Greenschist:
case Blueschist:
case "Greenschist":
case "Blueschist":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Glauconite, 2L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Basalt, 1L), 100, false);
break;
case Gneiss:
case Migmatite:
case "Gneiss":
case "Migmatite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.GraniteBlack, 1L), 50, false);
break;
case Redrock:
case Marble:
case Basalt:
case Quartzite:
case "Redrock":
case "Marble":
case "Basalt":
case "Quartzite":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, false);
break;
case Flint:
case "Flint":
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false);
break;
case GraniteBlack:
case "GraniteBlack":
GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 32);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), 1, false);
break;
case GraniteRed:
case "GraniteRed":
GT_Values.RA.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), null, 200, 32);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), 1, false);
}

View file

@ -18,25 +18,25 @@ public class ProcessingTransforming
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if (aPrefix == OrePrefixes.plank) aPrefix = OrePrefixes.plate;
switch (aMaterial) {
case Wood:
switch (aMaterial.mName) {
case "Wood":
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SeedOil.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 120L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SeedOilLin.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.SeedOilHemp.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 80L, true)), GT_OreDictUnificator.get(aPrefix, Materials.WoodSealed, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
break;
case Iron:
case "Iron":
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 250L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16);
break;
case WroughtIron:
case "WroughtIron":
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 225L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16);
break;
case Steel:
case "Steel":
GT_Values.RA.addChemicalBathRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), Materials.FierySteel.getFluid(GT_Utility.translateMaterialToAmount(aPrefix.mMaterialAmount, 200L, true)), GT_OreDictUnificator.get(aPrefix, Materials.FierySteel, 1L), GT_Values.NI, GT_Values.NI, null, 100, 8);
GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 16);
break;
case Neodymium:
case "Neodymium":
GT_Values.RA.addPolarizerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L), (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / 3628800L), 256);
}
}

View file

@ -1472,18 +1472,18 @@ public class GT_Loader_MetaTileEntities
}
private static void makeWires(Materials aMaterial, int aStartID, long aLossInsulated, long aLoss, long aAmperage, long aVoltage, boolean aInsulatable, boolean aAutoInsulated) {
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", 0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", 1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 0, "wire." + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Wire", 0.125F, aMaterial, aLoss, 1L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.5F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", 0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.mName.toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", 1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated).getStackForm(1L));
if (aInsulatable) {
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.75F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", 1.0F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.mName.toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.mName.toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.mName.toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.mName.toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.75F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false).getStackForm(1L));
GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GT_MetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.mName.toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", 1.0F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false).getStackForm(1L));
}
}