aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java1
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java120
3 files changed, 60 insertions, 73 deletions
diff --git a/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java b/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java
index 853abe3edf..879f932165 100644
--- a/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java
+++ b/src/Java/gtPlusPlus/core/block/general/BlockCompressedObsidian.java
@@ -21,7 +21,6 @@ import net.minecraft.world.World;
public class BlockCompressedObsidian extends BlockObsidian {
- @SideOnly(Side.CLIENT)
private final IIcon textureArray[] = new IIcon[6];
public BlockCompressedObsidian() {
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 2bc794de16..60fa118b1d 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -247,13 +247,13 @@ public class RECIPES_Machines {
GregtechItemList.Gregtech_Computer_Cube.get(1));
RecipeUtils.addShapedGregtechRecipe(
- ItemList.Electric_Piston_EV, OrePrefixes.circuit.get(Materials.Ultimate), ItemList.Electric_Piston_EV,
- ItemList.Electric_Motor_EV, CI.machineCasing_EV, ItemList.Electric_Motor_EV,
+ CI.electricPiston_EV, OrePrefixes.circuit.get(Materials.Ultimate), CI.electricPiston_EV,
+ CI.electricMotor_EV, CI.machineCasing_EV, CI.electricMotor_EV,
"gearGtTitanium", "cableGt02Aluminium", "gearGtTitanium",
ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 793, 1));
RecipeUtils.addShapedGregtechRecipe(
- ItemList.Electric_Piston_IV, OrePrefixes.circuit.get(Materials.Superconductor), ItemList.Electric_Piston_IV,
- ItemList.Electric_Motor_IV, CI.machineCasing_IV, ItemList.Electric_Motor_IV,
+ CI.electricPiston_IV, OrePrefixes.circuit.get(Materials.Superconductor), CI.electricPiston_IV,
+ CI.electricMotor_IV, CI.machineCasing_IV, CI.electricMotor_IV,
"gearGtTungstenSteel", "cableGt02Platinum", "gearGtTungstenSteel",
ItemUtils.simpleMetaStack("gregtech:gt.blockmachines", 794, 1));
RecipeUtils.addShapedGregtechRecipe(
@@ -926,8 +926,8 @@ public class RECIPES_Machines {
//Thorium Reactor
RECIPE_LFTRController = GregtechItemList.ThoriumReactor.get(1);
- RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(Casing_Amount); //Zeron
- RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(Casing_Amount); //Hastelloy
+ RECIPE_LFTRInnerCasing = GregtechItemList.Casing_Reactor_II.get(1); //Zeron
+ RECIPE_LFTROuterCasing = GregtechItemList.Casing_Reactor_I.get(1); //Hastelloy
ItemStack controlCircuit = ItemUtils.getSimpleStack(ModItems.itemCircuitLFTR);
RecipeUtils.addShapedGregtechRecipe(
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
index 1717218062..f7e294ad0b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
@@ -18,12 +18,12 @@ import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.item.ItemStack;
-public class RecipeGen_Recycling implements Runnable{
+public class RecipeGen_Recycling implements Runnable {
final Material toGenerate;
static Map mNameMap;
- public RecipeGen_Recycling(final Material M){
+ public RecipeGen_Recycling(final Material M) {
this.toGenerate = M;
mNameMap = this.getNameMap();
}
@@ -33,64 +33,52 @@ public class RecipeGen_Recycling implements Runnable{
generateRecipes(this.toGenerate);
}
- public static void generateRecipes(final Material material){
-
- Utils.LOG_INFO("Generating Recycling recipes for "+material.getLocalizedName());
-
- final OrePrefixes[] mValidPrefixesAsString = {
- OrePrefixes.ingot,
- OrePrefixes.ingotHot,
- OrePrefixes.nugget,
- OrePrefixes.plate,
- OrePrefixes.plateDense,
- OrePrefixes.plateDouble,
- OrePrefixes.plateTriple,
- OrePrefixes.plateQuadruple,
- OrePrefixes.plateQuintuple,
- OrePrefixes.stick,
- OrePrefixes.stickLong,
- OrePrefixes.bolt,
- OrePrefixes.screw,
- OrePrefixes.ring,
- OrePrefixes.rotor,
- OrePrefixes.gearGt,
- OrePrefixes.gearGtSmall
- };
-
- Utils.LOG_INFO("Found "+mValidPrefixesAsString.length+" valid OreDict prefixes.");
- if (mValidPrefixesAsString.length >= 1){
- for (final OrePrefixes validPrefix : mValidPrefixesAsString){
+ public static void generateRecipes(final Material material) {
+
+ Utils.LOG_INFO("Generating Recycling recipes for " + material.getLocalizedName());
+
+ final OrePrefixes[] mValidPrefixesAsString = { OrePrefixes.ingot, OrePrefixes.ingotHot, OrePrefixes.nugget,
+ OrePrefixes.plate, OrePrefixes.plateDense, OrePrefixes.plateDouble, OrePrefixes.plateTriple,
+ OrePrefixes.plateQuadruple, OrePrefixes.plateQuintuple, OrePrefixes.stick, OrePrefixes.stickLong,
+ OrePrefixes.bolt, OrePrefixes.screw, OrePrefixes.ring, OrePrefixes.rotor, OrePrefixes.gearGt,
+ OrePrefixes.gearGtSmall };
+
+ Utils.LOG_INFO("Found " + mValidPrefixesAsString.length + " valid OreDict prefixes.");
+ if (mValidPrefixesAsString.length >= 1) {
+ for (final OrePrefixes validPrefix : mValidPrefixesAsString) {
try {
- final ItemStack tempStack = ItemUtils.getItemStackOfAmountFromOreDict(validPrefix+material.getLocalizedName(), 1);
+ final ItemStack tempStack = ItemUtils
+ .getItemStackOfAmountFromOreDict(validPrefix + material.getLocalizedName(), 1);
- if ((tempStack != null) && (tempStack != ItemUtils.getSimpleStack(ModItems.AAA_Broken))){
- //mValidItems[mSlotIndex++] = tempStack;
+ if ((tempStack != null) && (tempStack != ItemUtils.getSimpleStack(ModItems.AAA_Broken))) {
+ // mValidItems[mSlotIndex++] = tempStack;
final ItemStack mDust = getDust(material, validPrefix);
- if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)){
- Utils.LOG_INFO("Recycle Recipe: "+material.getLocalizedName()+" - Success - Recycle "+tempStack.getDisplayName()+" and obtain "+mDust.getDisplayName());
+ if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) {
+ Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
+ + tempStack.getDisplayName() + " and obtain " + mDust.getDisplayName());
}
else {
- Utils.LOG_INFO("Recycle Recipe: "+material.getLocalizedName()+" - Failed");
- if (mDust == null){
+ Utils.LOG_INFO("Recycle Recipe: " + material.getLocalizedName() + " - Failed");
+ if (mDust == null) {
Utils.LOG_INFO("Invalid Dust output.");
}
}
}
- } catch (final Throwable t){
- t.printStackTrace();
- Utils.LOG_INFO("Returning Null. Throwable Info: "+t.getMessage());
- Utils.LOG_INFO("Throwable Info: "+t.toString());
- Utils.LOG_INFO("Throwable Info: "+t.getCause().toString());
-
+ }
+ catch (final Throwable t) {
+ // t.printStackTrace();
+ // Utils.LOG_INFO("Returning Null. Throwable Info:
+ // "+t.getMessage());
+ // Utils.LOG_INFO("Throwable Info: "+t.toString());
+ // Utils.LOG_INFO("Throwable Info:
+ // "+t.getCause().toString());
}
}
}
}
-
-
public static ItemStack getDust(final Material aMaterial, final OrePrefixes aPrefix) {
return aMaterial == null ? null : getDust(aMaterial, aPrefix.mMaterialAmount);
}
@@ -109,10 +97,10 @@ public class RecipeGen_Recycling implements Runnable{
if ((rStack == null) && (((aMaterialAmount * 9) >= M))) {
rStack = get(OrePrefixes.dustTiny, aMaterial, (aMaterialAmount * 9) / M);
}
- if (rStack == null){
- Utils.LOG_INFO("Returning Null. Method: "+ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(2));
+ if (rStack == null) {
+ Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
}
return rStack;
@@ -132,38 +120,39 @@ public class RecipeGen_Recycling implements Runnable{
public static ItemStack get(final OrePrefixes aPrefix, final Object aMaterial, final ItemStack aReplacement,
final long aAmount) {
- /*if (OrePrefixes.mPreventableComponents.contains(aPrefix) && aPrefix.mDisabledItems.contains(aMaterial)) {
- return aReplacement; //TODO
- }*/
+ /*
+ * if (OrePrefixes.mPreventableComponents.contains(aPrefix) &&
+ * aPrefix.mDisabledItems.contains(aMaterial)) { return aReplacement;
+ * //TODO }
+ */
return get(aPrefix.get(aMaterial), aReplacement, aAmount, false, true);
}
public static ItemStack get(final Object aName, final ItemStack aReplacement, final long aAmount,
final boolean aMentionPossibleTypos, final boolean aNoInvalidAmounts) {
if (aNoInvalidAmounts && (aAmount < 1L)) {
- Utils.LOG_INFO("Returning Null. Method: "+ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(2));
+ Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
return null;
}
if (!mNameMap.containsKey(aName.toString()) && aMentionPossibleTypos) {
Utils.LOG_INFO("Unknown Key for Unification, Typo? " + aName);
}
- return GT_Utility.copyAmount(aAmount, new Object[]{mNameMap.get(aName.toString()),
- getFirstOre(aName, aAmount), aReplacement});
+ return GT_Utility.copyAmount(aAmount,
+ new Object[] { mNameMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement });
}
-
public static ItemStack getFirstOre(final Object aName, final long aAmount) {
if (GT_Utility.isStringInvalid(aName)) {
- Utils.LOG_INFO("Returning Null. Method: "+ReflectionUtils.getMethodName(0));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(1));
- Utils.LOG_INFO("Called from method: "+ReflectionUtils.getMethodName(2));
+ Utils.LOG_INFO("Returning Null. Method: " + ReflectionUtils.getMethodName(0));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(1));
+ Utils.LOG_INFO("Called from method: " + ReflectionUtils.getMethodName(2));
return null;
}
final ItemStack tStack = (ItemStack) mNameMap.get(aName.toString());
if (GT_Utility.isStackValid(tStack)) {
- return GT_Utility.copyAmount(aAmount, new Object[]{tStack});
+ return GT_Utility.copyAmount(aAmount, new Object[] { tStack });
}
return GT_Utility.copyAmount(aAmount, getOres(aName).toArray());
}
@@ -177,11 +166,12 @@ public class RecipeGen_Recycling implements Runnable{
return rList;
}
- public Map getNameMap(){
+ public Map getNameMap() {
Map<String, ItemStack> tempMap;
try {
- tempMap = (Map<String, ItemStack>) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap", true);
- if (tempMap != null){
+ tempMap = (Map<String, ItemStack>) FieldUtils.readStaticField(GT_OreDictUnificator.class, "sName2StackMap",
+ true);
+ if (tempMap != null) {
return tempMap;
}
}
@@ -192,6 +182,4 @@ public class RecipeGen_Recycling implements Runnable{
return null;
}
-
-
}