aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java2
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java30
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java36
3 files changed, 58 insertions, 10 deletions
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 9d34aa371d..6f4e8870d7 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -1955,7 +1955,7 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.UNKNOWN),
Particle.getBaseParticle(Particle.UNKNOWN),
},
- FluidUtils.getWildcardFluidStack("ender", 1000),
+ FluidUtils.getFluidStack(FluidUtils.getWildcardFluidStack("ender", 1000), 1000),
new ItemStack[] {
ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT.getDust(1)
},
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
index a5cf9527a9..6fa58804dd 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
@@ -35,6 +35,7 @@ import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
+import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
@@ -1012,4 +1013,33 @@ public class ItemUtils {
}
+ public static String getItemName(ItemStack aStack) {
+ if (aStack == null) {
+ return "ERROR - Empty Stack";
+ }
+ String aDisplay = null;
+ try {
+ aDisplay = ("" + StatCollector
+ .translateToLocal(aStack.getItem().getUnlocalizedNameInefficiently(aStack) + ".name"))
+ .trim();
+ if (aStack.hasTagCompound()) {
+ if (aStack.stackTagCompound != null && aStack.stackTagCompound.hasKey("display", 10)) {
+ NBTTagCompound nbttagcompound = aStack.stackTagCompound.getCompoundTag("display");
+
+ if (nbttagcompound.hasKey("Name", 8)) {
+ aDisplay = nbttagcompound.getString("Name");
+ }
+ }
+ }
+ } catch (Throwable t) {
+
+ }
+ if (aDisplay == null || aDisplay.length() <= 0) {
+ aDisplay = aStack.getUnlocalizedName() + ":" + aStack.getItemDamage();
+ } else {
+ aDisplay += " | Meta: " + aStack.getItemDamage();
+ }
+ return aDisplay;
+ }
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index da8b4e4ff1..4be0378699 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -12,6 +12,7 @@ import gregtech.api.enums.Materials;
import gregtech.api.interfaces.internal.IGT_RecipeAdder;
import gregtech.api.util.CustomRecipeMap;
import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
import gtPlusPlus.api.objects.Logger;
@@ -783,7 +784,12 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
if (mAssemblyLine != null) {
try {
if (!tryAddTecTechScannerRecipe(aResearchItem, aInputs, aFluidInputs, aOutput, aDuration, aEUt)) {
- Logger.INFO("Failed to generate TecTech recipe for "+aResearchItem.getDisplayName()+", please report this to Alkalus.");
+ try {
+ Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus.");
+ }
+ catch (Throwable t) {
+
+ }
}
return (boolean) mAssemblyLine.invoke(GT_Values.RA, aResearchItem, aResearchTime, aInputs,
aFluidInputs, aOutput, aDuration, aEUt);
@@ -820,10 +826,13 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
if (mScannerTT != null) {
try {
- return (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec,
- (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt);
+ boolean aResult = (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec,
+ (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt);
+ Logger.INFO("Added TecTech Scanner Recipe for "+ItemUtils.getItemName(aResearchItem)+"? "+aResult);
+ return aResult;
+
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Logger.INFO("Failed to generate TecTech recipe for "+aResearchItem.getDisplayName()+", please report this to Alkalus. [Severe]");
+ Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus. [Severe]");
e.printStackTrace();
}
}
@@ -1058,11 +1067,20 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return true;
}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
}