Hiding of Recycling recipes and unneeded ores in NEI
This commit is contained in:
parent
ac258896de
commit
009c032c13
8 changed files with 115 additions and 20 deletions
|
@ -231,6 +231,8 @@ public class GT_Mod
|
||||||
gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true);
|
gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true);
|
||||||
gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2"));
|
gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2"));
|
||||||
gregtechproxy.mNerfedCombs = tMainConfig.get("general", "NerfCombs", true).getBoolean(true);
|
gregtechproxy.mNerfedCombs = tMainConfig.get("general", "NerfCombs", true).getBoolean(true);
|
||||||
|
gregtechproxy.mHideUnusedOres = tMainConfig.get("general", "HideUnusedOres", true).getBoolean(true);
|
||||||
|
gregtechproxy.mHideRecyclingRecipes = tMainConfig.get("general", "HideRecyclingRecipes", true).getBoolean(true);
|
||||||
|
|
||||||
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
|
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
|
||||||
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);
|
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);
|
||||||
|
|
|
@ -159,6 +159,9 @@ public interface IGT_RecipeAdder {
|
||||||
*/
|
*/
|
||||||
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
|
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
|
||||||
|
|
||||||
|
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a CNC-Machine Recipe
|
* Adds a CNC-Machine Recipe
|
||||||
*
|
*
|
||||||
|
@ -373,6 +376,11 @@ public interface IGT_RecipeAdder {
|
||||||
* Adds a Recipe for Fluid Smelting
|
* Adds a Recipe for Fluid Smelting
|
||||||
*/
|
*/
|
||||||
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt);
|
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a Recipe for Fluid Smelting
|
||||||
|
*/
|
||||||
|
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt, boolean hidden);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a Recipe for Fluid Extraction
|
* Adds a Recipe for Fluid Extraction
|
||||||
|
@ -429,11 +437,22 @@ public interface IGT_RecipeAdder {
|
||||||
*/
|
*/
|
||||||
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
|
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a Recipe for the Arc Furnace. (up to 4 Outputs)
|
||||||
|
*/
|
||||||
|
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a Recipe for the GT Pulveriser. (up to 4 Outputs)
|
* Adds a Recipe for the GT Pulveriser. (up to 4 Outputs)
|
||||||
*/
|
*/
|
||||||
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
|
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a Recipe for the GT Pulveriser. (up to 4 Outputs)
|
||||||
|
*/
|
||||||
|
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a Distillation Tower Recipe
|
* Adds a Distillation Tower Recipe
|
||||||
* Every Fluid also gets seperate distillation recipes
|
* Every Fluid also gets seperate distillation recipes
|
||||||
|
|
|
@ -381,11 +381,11 @@ public class GT_ModHandler {
|
||||||
/**
|
/**
|
||||||
* Adds to Furnace AND Alloysmelter AND Induction Smelter
|
* Adds to Furnace AND Alloysmelter AND Induction Smelter
|
||||||
*/
|
*/
|
||||||
public static boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
|
public static boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput, boolean hidden) {
|
||||||
if (aInput == null || aOutput == null) return false;
|
if (aInput == null || aOutput == null) return false;
|
||||||
boolean temp = false;
|
boolean temp = false;
|
||||||
if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = true;
|
if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = true;
|
||||||
if (RA.addAlloySmelterRecipe(aInput, OrePrefixes.ingot.contains(aOutput) ? ItemList.Shape_Mold_Ingot.get(0) : OrePrefixes.block.contains(aOutput) ? ItemList.Shape_Mold_Block.get(0) : OrePrefixes.nugget.contains(aOutput) ? ItemList.Shape_Mold_Nugget.get(0) : null, aOutput, 130, 3))
|
if (RA.addAlloySmelterRecipe(aInput, OrePrefixes.ingot.contains(aOutput) ? ItemList.Shape_Mold_Ingot.get(0) : OrePrefixes.block.contains(aOutput) ? ItemList.Shape_Mold_Block.get(0) : OrePrefixes.nugget.contains(aOutput) ? ItemList.Shape_Mold_Nugget.get(0) : null, aOutput, 130, 3,hidden))
|
||||||
temp = true;
|
temp = true;
|
||||||
if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize * 1600, 0)) temp = true;
|
if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize * 1600, 0)) temp = true;
|
||||||
return temp;
|
return temp;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package gregtech.api.util;
|
package gregtech.api.util;
|
||||||
|
|
||||||
|
import gregtech.GT_Mod;
|
||||||
import gregtech.api.GregTech_API;
|
import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.enums.*;
|
import gregtech.api.enums.*;
|
||||||
import gregtech.api.enums.TC_Aspects.TC_AspectStack;
|
import gregtech.api.enums.TC_Aspects.TC_AspectStack;
|
||||||
|
@ -147,7 +148,9 @@ public class GT_RecipeRegistrator {
|
||||||
public static void registerReverseFluidSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) {
|
public static void registerReverseFluidSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByproduct) {
|
||||||
if (aStack == null || aMaterial == null || aMaterial.mSmeltInto.mStandardMoltenFluid == null || !aMaterial.contains(SubTag.SMELTING_TO_FLUID) || (L * aMaterialAmount) / (M * aStack.stackSize) <= 0)
|
if (aStack == null || aMaterial == null || aMaterial.mSmeltInto.mStandardMoltenFluid == null || !aMaterial.contains(SubTag.SMELTING_TO_FLUID) || (L * aMaterialAmount) / (M * aStack.stackSize) <= 0)
|
||||||
return;
|
return;
|
||||||
RA.addFluidSmelterRecipe(GT_Utility.copyAmount(1, aStack), aByproduct == null ? null : aByproduct.mMaterial.contains(SubTag.NO_SMELTING) || !aByproduct.mMaterial.contains(SubTag.METAL) ? aByproduct.mMaterial.contains(SubTag.FLAMMABLE) ? GT_OreDictUnificator.getDust(Materials.Ash, aByproduct.mAmount / 2) : aByproduct.mMaterial.contains(SubTag.UNBURNABLE) ? GT_OreDictUnificator.getDustOrIngot(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount) : null : GT_OreDictUnificator.getIngotOrDust(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount), aMaterial.mSmeltInto.getMolten((L * aMaterialAmount) / (M * aStack.stackSize)), 10000, (int) Math.max(1, (24 * aMaterialAmount) / M), Math.max(8, (int) Math.sqrt(2 * aMaterial.mSmeltInto.mStandardMoltenFluid.getTemperature())));
|
|
||||||
|
boolean tHide = (aMaterial != Materials.Iron)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes);
|
||||||
|
RA.addFluidSmelterRecipe(GT_Utility.copyAmount(1, aStack), aByproduct == null ? null : aByproduct.mMaterial.contains(SubTag.NO_SMELTING) || !aByproduct.mMaterial.contains(SubTag.METAL) ? aByproduct.mMaterial.contains(SubTag.FLAMMABLE) ? GT_OreDictUnificator.getDust(Materials.Ash, aByproduct.mAmount / 2) : aByproduct.mMaterial.contains(SubTag.UNBURNABLE) ? GT_OreDictUnificator.getDustOrIngot(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount) : null : GT_OreDictUnificator.getIngotOrDust(aByproduct.mMaterial.mSmeltInto, aByproduct.mAmount), aMaterial.mSmeltInto.getMolten((L * aMaterialAmount) / (M * aStack.stackSize)), 10000, (int) Math.max(1, (24 * aMaterialAmount) / M), Math.max(8, (int) Math.sqrt(2 * aMaterial.mSmeltInto.mStandardMoltenFluid.getTemperature())), tHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,8 +164,10 @@ public class GT_RecipeRegistrator {
|
||||||
return;
|
return;
|
||||||
aMaterialAmount /= aStack.stackSize;
|
aMaterialAmount /= aStack.stackSize;
|
||||||
if(aMaterial==Materials.Naquadah||aMaterial==Materials.NaquadahEnriched)return;
|
if(aMaterial==Materials.Naquadah||aMaterial==Materials.NaquadahEnriched)return;
|
||||||
|
|
||||||
|
boolean tHide = (aMaterial != Materials.Iron)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes);
|
||||||
if (aAllowAlloySmelter)
|
if (aAllowAlloySmelter)
|
||||||
GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount));
|
GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount),tHide);
|
||||||
else
|
else
|
||||||
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount));
|
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.getIngot(aMaterial.mSmeltInto, aMaterialAmount));
|
||||||
}
|
}
|
||||||
|
@ -204,9 +209,12 @@ public class GT_RecipeRegistrator {
|
||||||
}
|
}
|
||||||
|
|
||||||
aData = new ItemData(aData);
|
aData = new ItemData(aData);
|
||||||
|
boolean tIron = false;
|
||||||
|
|
||||||
if (aData.mByProducts.length > 3) for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
if (aData.mByProducts.length > 3) for (MaterialStack tMaterial : aData.getAllMaterialStacks()){
|
||||||
if (tMaterial.mMaterial == Materials.Ash) tMaterial.mAmount = 0;
|
if (tMaterial.mMaterial == Materials.Ash) tMaterial.mAmount = 0;
|
||||||
|
if (tMaterial.mMaterial == Materials.Iron) tIron = true;
|
||||||
|
}
|
||||||
|
|
||||||
aData = new ItemData(aData);
|
aData = new ItemData(aData);
|
||||||
|
|
||||||
|
@ -215,8 +223,9 @@ public class GT_RecipeRegistrator {
|
||||||
long tAmount = 0;
|
long tAmount = 0;
|
||||||
for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
||||||
tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
|
tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
|
||||||
|
|
||||||
RA.addArcFurnaceRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getIngotOrDust(aData.mMaterial), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(0)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(1)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(2))}, null, (int) Math.max(16, tAmount / M), 96);
|
boolean tHide = !tIron && GT_Mod.gregtechproxy.mHideRecyclingRecipes;
|
||||||
|
RA.addArcFurnaceRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getIngotOrDust(aData.mMaterial), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(0)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(1)), GT_OreDictUnificator.getIngotOrDust(aData.getByProduct(2))}, null, (int) Math.max(16, tAmount / M), 96, tHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
|
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
|
||||||
|
@ -239,8 +248,8 @@ public class GT_RecipeRegistrator {
|
||||||
long tAmount = 0;
|
long tAmount = 0;
|
||||||
for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
||||||
tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
|
tAmount += tMaterial.mAmount * tMaterial.mMaterial.getMass();
|
||||||
|
boolean tHide = (aData.mMaterial.mMaterial != Materials.Iron)&&(GT_Mod.gregtechproxy.mHideRecyclingRecipes);
|
||||||
RA.addPulveriserRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, aData.mMaterial.mMaterial==Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), 4);
|
RA.addPulveriserRecipe(aStack, new ItemStack[]{GT_OreDictUnificator.getDust(aData.mMaterial), GT_OreDictUnificator.getDust(aData.getByProduct(0)), GT_OreDictUnificator.getDust(aData.getByProduct(1)), GT_OreDictUnificator.getDust(aData.getByProduct(2))}, null, aData.mMaterial.mMaterial==Materials.Marble ? 1 : (int) Math.max(16, tAmount / M), 4, tHide);
|
||||||
|
|
||||||
if (aAllowHammer) for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
if (aAllowHammer) for (MaterialStack tMaterial : aData.getAllMaterialStacks())
|
||||||
if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL)) {
|
if (tMaterial.mMaterial.contains(SubTag.CRYSTAL) && !tMaterial.mMaterial.contains(SubTag.METAL)) {
|
||||||
|
|
|
@ -168,6 +168,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
public boolean mChangeHarvestLevels=false;
|
public boolean mChangeHarvestLevels=false;
|
||||||
public boolean mNerfedCombs = true;
|
public boolean mNerfedCombs = true;
|
||||||
public int mWireHeatingTicks = 4;
|
public int mWireHeatingTicks = 4;
|
||||||
|
public boolean mHideUnusedOres = true;
|
||||||
|
public boolean mHideRecyclingRecipes = true;
|
||||||
|
|
||||||
public GT_Proxy() {
|
public GT_Proxy() {
|
||||||
GameRegistry.registerFuelHandler(this);
|
GameRegistry.registerFuelHandler(this);
|
||||||
|
|
|
@ -114,8 +114,13 @@ public class GT_RecipeAdder
|
||||||
new GT_Recipe(aInput1, aEUt, aInput2, aDuration, aOutput1, aOutput2);
|
new GT_Recipe(aInput1, aEUt, aInput2, aDuration, aOutput1, aOutput2);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) {
|
||||||
|
return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) {
|
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden) {
|
||||||
if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) {
|
if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +130,10 @@ public class GT_RecipeAdder
|
||||||
if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) <= 0) {
|
if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1);
|
GT_Recipe tRecipe =new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1);
|
||||||
|
if ((hidden) && (tRecipe != null)) {
|
||||||
|
tRecipe.mHidden = true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,8 +472,13 @@ public class GT_RecipeAdder
|
||||||
GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe(true, new ItemStack[]{aMold}, new ItemStack[]{aOutput}, null, new FluidStack[]{aInput}, null, aDuration, aEUt, 0);
|
GT_Recipe.GT_Recipe_Map.sFluidSolidficationRecipes.addRecipe(true, new ItemStack[]{aMold}, new ItemStack[]{aOutput}, null, new FluidStack[]{aInput}, null, aDuration, aEUt, 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) {
|
||||||
|
return addFluidSmelterRecipe(aInput, aRemains, aOutput, aChance, aDuration, aEUt, false);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) {
|
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt, boolean hidden) {
|
||||||
if ((aInput == null) || (aOutput == null)) {
|
if ((aInput == null) || (aOutput == null)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -478,7 +491,10 @@ public class GT_RecipeAdder
|
||||||
if ((aDuration = GregTech_API.sRecipeFile.get("fluidsmelter", aInput, aDuration)) <= 0) {
|
if ((aDuration = GregTech_API.sRecipeFile.get("fluidsmelter", aInput, aDuration)) <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aRemains}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
|
GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aRemains}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
|
||||||
|
if ((hidden) && (tRecipe != null)) {
|
||||||
|
tRecipe.mHidden = true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,8 +635,14 @@ public class GT_RecipeAdder
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
|
@Override
|
||||||
|
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
|
||||||
|
return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) {
|
||||||
if ((aInput == null) || (aOutputs == null)) {
|
if ((aInput == null) || (aOutputs == null)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -629,11 +651,17 @@ public class GT_RecipeAdder
|
||||||
if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) {
|
if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{Materials.Oxygen.getGas(aDuration)}, null, Math.max(1, aDuration), Math.max(1, aEUt), 0);
|
GT_Recipe sRecipe = GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{Materials.Oxygen.getGas(aDuration)}, null, Math.max(1, aDuration), Math.max(1, aEUt), 0);
|
||||||
|
if ((hidden) && (sRecipe != null)) {
|
||||||
|
sRecipe.mHidden = true;
|
||||||
|
}
|
||||||
for (Materials tMaterial : new Materials[]{Materials.Argon, Materials.Nitrogen}) {
|
for (Materials tMaterial : new Materials[]{Materials.Argon, Materials.Nitrogen}) {
|
||||||
if (tMaterial.mPlasma != null) {
|
if (tMaterial.mPlasma != null) {
|
||||||
int tPlasmaAmount = (int) Math.max(1L, aDuration / (tMaterial.getMass() * 16L));
|
int tPlasmaAmount = (int) Math.max(1L, aDuration / (tMaterial.getMass() * 16L));
|
||||||
GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{tMaterial.getPlasma(tPlasmaAmount)}, new FluidStack[]{tMaterial.getGas(tPlasmaAmount)}, Math.max(1, aDuration / 16), Math.max(1, aEUt / 3), 0);
|
GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, new FluidStack[]{tMaterial.getPlasma(tPlasmaAmount)}, new FluidStack[]{tMaterial.getGas(tPlasmaAmount)}, Math.max(1, aDuration / 16), Math.max(1, aEUt / 3), 0);
|
||||||
|
if ((hidden) && (tRecipe != null)) {
|
||||||
|
tRecipe.mHidden = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -689,8 +717,14 @@ public class GT_RecipeAdder
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
|
@Override
|
||||||
|
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
|
||||||
|
return addPulveriserRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) {
|
||||||
if ((aInput == null) || (aOutputs == null)) {
|
if ((aInput == null) || (aOutputs == null)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -699,7 +733,10 @@ public class GT_RecipeAdder
|
||||||
if ((aDuration = GregTech_API.sRecipeFile.get("pulveriser", aInput, aDuration)) <= 0) {
|
if ((aDuration = GregTech_API.sRecipeFile.get("pulveriser", aInput, aDuration)) <= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, null, null, aDuration, aEUt, 0);
|
GT_Recipe tRecipe =GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.addRecipe(true, new ItemStack[]{aInput}, aOutputs, null, aChances, null, null, aDuration, aEUt, 0);
|
||||||
|
if ((hidden) && (tRecipe != null)) {
|
||||||
|
tRecipe.mHidden = true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -732,4 +769,7 @@ public class GT_RecipeAdder
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package gregtech.common.blocks;
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import gregtech.GT_Mod;
|
||||||
import gregtech.api.GregTech_API;
|
import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.OrePrefixes;
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
@ -40,6 +42,7 @@ public class GT_Block_Ores
|
||||||
this.isBlockContainer = true;
|
this.isBlockContainer = true;
|
||||||
setStepSound(soundTypeStone);
|
setStepSound(soundTypeStone);
|
||||||
setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
|
setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
|
||||||
|
boolean tHideOres = Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres;
|
||||||
for (int i = 0; i < 16; i++) {
|
for (int i = 0; i < 16; i++) {
|
||||||
GT_ModHandler.addValuableOre(this, i, 1);
|
GT_ModHandler.addValuableOre(this, i, 1);
|
||||||
}
|
}
|
||||||
|
@ -60,8 +63,19 @@ public class GT_Block_Ores
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
|
GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreEndstone.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 2000));
|
GT_OreDictUnificator.registerOre(OrePrefixes.oreEndstone.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 2000));
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreBlackgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 3000));
|
GT_OreDictUnificator.registerOre(OrePrefixes.oreBlackgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 3000));
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreRedgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 4000));
|
GT_OreDictUnificator.registerOre(OrePrefixes.oreRedgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 4000));
|
||||||
|
if (tHideOres) {
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 1000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 2000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 3000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 4000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 16000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 17000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 18000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 19000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 20000));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,16 @@ public class GT_Achievements {
|
||||||
registerAchievement("denseaspossible", 10, 10, ItemList.FusionComputer_UV.get(1, new Object[]{}), "tothelimit", false);
|
registerAchievement("denseaspossible", 10, 10, ItemList.FusionComputer_UV.get(1, new Object[]{}), "tothelimit", false);
|
||||||
registerAchievement("fullefficiency", 10, 12, ItemList.Generator_Plasma_ZPMV.get(1, new Object[]{}), "denseaspossible", false);
|
registerAchievement("fullefficiency", 10, 12, ItemList.Generator_Plasma_ZPMV.get(1, new Object[]{}), "denseaspossible", false);
|
||||||
registerAchievement("whatnow", 8, 10, ItemList.ZPM2.get(1, new Object[]{}), "denseaspossible", false);
|
registerAchievement("whatnow", 8, 10, ItemList.ZPM2.get(1, new Object[]{}), "denseaspossible", false);
|
||||||
|
|
||||||
|
if(Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres){
|
||||||
|
for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
|
||||||
|
if (GregTech_API.sGeneratedMaterials[i] != null) {
|
||||||
|
if(!oreList.contains(GregTech_API.sGeneratedMaterials[i])){
|
||||||
|
codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (GT_Mod.gregtechproxy.mAchievements) {
|
if (GT_Mod.gregtechproxy.mAchievements) {
|
||||||
AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray(
|
AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray(
|
||||||
new Achievement[this.achievementList.size()])));
|
new Achievement[this.achievementList.size()])));
|
||||||
|
|
Loading…
Reference in a new issue