diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2016-11-06 19:32:27 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-11-06 19:32:27 +1000 |
| commit | cbe0e497be8e466c380a5b4fa781b314ede9ada3 (patch) | |
| tree | b85848b432adf458e3abda466ee46d9dfc3e454b /src/Java/gtPlusPlus/core/util | |
| parent | c40416b036c0e89451e1558253ccf07bbee028d0 (diff) | |
| download | GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.gz GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.bz2 GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.zip | |
Revert "$ Cleaned up the entire project."
This reverts commit 0669f5eb9d5029a8b94ec552171b0837605f7747.
# Conflicts:
# src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
# src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java
Revert "% Cleaned up Imports."
This reverts commit 3654052fb63a571c5eaca7f20714b87c17f7e966.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
36 files changed, 3812 insertions, 4360 deletions
diff --git a/src/Java/gtPlusPlus/core/util/BaseHandler.java b/src/Java/gtPlusPlus/core/util/BaseHandler.java index e8fb919ab0..63f22f3763 100644 --- a/src/Java/gtPlusPlus/core/util/BaseHandler.java +++ b/src/Java/gtPlusPlus/core/util/BaseHandler.java @@ -2,10 +2,10 @@ package gtPlusPlus.core.util; public abstract class BaseHandler { + public abstract void preInit(); + public abstract void init(); - + public abstract void postInit(); - - public abstract void preInit(); - + } diff --git a/src/Java/gtPlusPlus/core/util/ClassUtils.java b/src/Java/gtPlusPlus/core/util/ClassUtils.java index e58c2f2785..ba3db748f9 100644 --- a/src/Java/gtPlusPlus/core/util/ClassUtils.java +++ b/src/Java/gtPlusPlus/core/util/ClassUtils.java @@ -1,56 +1,70 @@ package gtPlusPlus.core.util; -import java.lang.reflect.*; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; public class ClassUtils { - public static Method getMethodViaReflection(final Class<?> lookupClass, final String methodName, - final boolean invoke) throws Exception { - final Class<? extends Class> lookup = lookupClass.getClass(); - final Method m = lookup.getDeclaredMethod(methodName); - m.setAccessible(true);// Abracadabra - if (invoke) { + + /*@ if (isPresent("com.optionaldependency.DependencyClass")) { + // This block will never execute when the dependency is not present + // There is therefore no more risk of code throwing NoClassDefFoundException. + executeCodeLinkingToDependency(); + }*/ + public static boolean isPresent(String className) { + try { + Class.forName(className); + return true; + } catch (Throwable ex) { + // Class or one of its dependencies is not present... + return false; + } + } + + public static Method getMethodViaReflection(Class<?> lookupClass, String methodName, boolean invoke) throws Exception{ + Class<? extends Class> lookup = lookupClass.getClass(); + Method m = lookup.getDeclaredMethod(methodName); + m.setAccessible(true);// Abracadabra + if (invoke){ m.invoke(lookup);// now its OK } return m; } - public static Class getNonPublicClass(final String className) { + public static Class getNonPublicClass(String className){ Class<?> c = null; try { c = Class.forName(className); - } - catch (final ClassNotFoundException e) { + } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } - // full package name --------^^^^^^^^^^ - // or simpler without Class.forName: - // Class<package1.A> c = package1.A.class; + //full package name --------^^^^^^^^^^ + //or simpler without Class.forName: + //Class<package1.A> c = package1.A.class; - if (null != c) { - // In our case we need to use + if (null != c){ + //In our case we need to use Constructor<?> constructor = null; try { constructor = c.getDeclaredConstructor(); - } - catch (NoSuchMethodException | SecurityException e) { + } catch (NoSuchMethodException | SecurityException e) { // TODO Auto-generated catch block e.printStackTrace(); } - // note: getConstructor() can return only public constructors - // so we needed to search for any Declared constructor + //note: getConstructor() can return only public constructors + //so we needed to search for any Declared constructor - // now we need to make this constructor accessible - if (null != constructor) { - constructor.setAccessible(true);// ABRACADABRA! + //now we need to make this constructor accessible + if (null != constructor){ + constructor.setAccessible(true);//ABRACADABRA! try { - final Object o = constructor.newInstance(); + Object o = constructor.newInstance(); return (Class) o; - } - catch (InstantiationException | IllegalAccessException | IllegalArgumentException - | InvocationTargetException e) { + } catch (InstantiationException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } @@ -59,21 +73,6 @@ public class ClassUtils { return null; } - /* - * @ if (isPresent("com.optionaldependency.DependencyClass")) { // This - * block will never execute when the dependency is not present // There is - * therefore no more risk of code throwing NoClassDefFoundException. - * executeCodeLinkingToDependency(); } - */ - public static boolean isPresent(final String className) { - try { - Class.forName(className); - return true; - } - catch (final Throwable ex) { - // Class or one of its dependencies is not present... - return false; - } - } + } diff --git a/src/Java/gtPlusPlus/core/util/Log.java b/src/Java/gtPlusPlus/core/util/Log.java index 460f8598dc..ea7076e453 100644 --- a/src/Java/gtPlusPlus/core/util/Log.java +++ b/src/Java/gtPlusPlus/core/util/Log.java @@ -3,22 +3,27 @@ package gtPlusPlus.core.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -public final class Log { - public static final Logger LOGGER = LogManager.getLogger("MiscUtils"); - - public static void debug(final String msg) { - Log.LOGGER.debug(msg); - } - - public static void error(final String msg) { - Log.LOGGER.error(msg); - } - - public static void info(final String msg) { - Log.LOGGER.info(msg); - } - - public static void warn(final String msg) { - Log.LOGGER.warn(msg); - } +public final class Log +{ + public static final Logger LOGGER = LogManager.getLogger("MiscUtils"); + + public static void warn(String msg) + { + LOGGER.warn(msg); + } + + public static void error(String msg) + { + LOGGER.error(msg); + } + + public static void info(String msg) + { + LOGGER.info(msg); + } + + public static void debug(String msg) + { + LOGGER.debug(msg); + } } diff --git a/src/Java/gtPlusPlus/core/util/LoggingUtils.java b/src/Java/gtPlusPlus/core/util/LoggingUtils.java index ffae71c40d..7783577ee2 100644 --- a/src/Java/gtPlusPlus/core/util/LoggingUtils.java +++ b/src/Java/gtPlusPlus/core/util/LoggingUtils.java @@ -1,52 +1,54 @@ package gtPlusPlus.core.util; -import java.io.*; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.util.Date; public class LoggingUtils { - public static boolean logCurrentSystemTime(final String message) { - final Date date = new Date(System.currentTimeMillis()); - try { - LoggingUtils.profileLog(message + " | " + date.toString()); - return true; - } - catch (final Throwable r) { - return false; - } - - } - - public static void profileLog(final Object o) { - try { + public static void profileLog(Object o){ + try { String content; - final File file = new File("GregtechTimingsTC.txt"); + File file = new File("GregtechTimingsTC.txt"); // if file doesnt exists, then create it if (!file.exists()) { file.createNewFile(); - final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); - final BufferedWriter bw = new BufferedWriter(fw); + FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); + BufferedWriter bw = new BufferedWriter(fw); bw.write("============================================================"); bw.write(System.lineSeparator()); bw.close(); - } - if (o instanceof String) { + } + if (o instanceof String){ content = (String) o; - } - else { - content = o.toString(); - } - final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); - final BufferedWriter bw = new BufferedWriter(fw); + } + else { + content = o.toString(); + } + FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); + BufferedWriter bw = new BufferedWriter(fw); bw.write(content); bw.write(System.lineSeparator()); bw.close(); System.out.println("Data Logged."); - } - catch (final IOException e) { + } catch (IOException e) { System.out.println("Data logging failed."); } + } + + public static boolean logCurrentSystemTime(String message){ + Date date = new Date(System.currentTimeMillis()); + try { + profileLog(message+" | "+date.toString()); + return true; + } + catch (Throwable r) { + return false; + } + } - + } diff --git a/src/Java/gtPlusPlus/core/util/Quality.java b/src/Java/gtPlusPlus/core/util/Quality.java index 50d1b9fc90..1ce29c7a58 100644 --- a/src/Java/gtPlusPlus/core/util/Quality.java +++ b/src/Java/gtPlusPlus/core/util/Quality.java @@ -4,65 +4,56 @@ import gtPlusPlus.core.util.math.MathUtils; import net.minecraft.util.EnumChatFormatting; public enum Quality { - + // Magic Blue // Rare Yellow // Set Green // Unique Gold/Purple // Trade-off Brown - - POOR("Poor", EnumChatFormatting.GRAY), COMMON("Common", EnumChatFormatting.WHITE), UNCOMMON("Uncommon", - EnumChatFormatting.DARK_GREEN), MAGIC("Magic", EnumChatFormatting.BLUE), RARE("Rare", - EnumChatFormatting.YELLOW), UNIQUE("Unique", EnumChatFormatting.GOLD), ARTIFACT("Artifact", - EnumChatFormatting.AQUA), SET("Set Piece", EnumChatFormatting.GREEN), TRADEOFF("Trade-off", - EnumChatFormatting.DARK_RED), EPIC("Epic", EnumChatFormatting.LIGHT_PURPLE); - - public static Quality getRandomQuality() { - final int lootChance = MathUtils.randInt(0, 100); - if (lootChance <= 10) { - return Quality.POOR; - } - else if (lootChance <= 45) { - return Quality.COMMON; - } - else if (lootChance <= 65) { - return Quality.UNCOMMON; - } - else if (lootChance <= 82) { - return Quality.MAGIC; - } - else if (lootChance <= 92) { - return Quality.EPIC; - } - else if (lootChance <= 97) { - return Quality.RARE; - } - else if (lootChance <= 99) { - return Quality.ARTIFACT; - } - else { - return null; - } - } - private String LOOT; - - private EnumChatFormatting COLOUR; - - private Quality(final String lootTier, final EnumChatFormatting tooltipColour) { + + POOR("Poor", EnumChatFormatting.GRAY), + COMMON("Common", EnumChatFormatting.WHITE), + UNCOMMON("Uncommon", EnumChatFormatting.DARK_GREEN), + MAGIC("Magic", EnumChatFormatting.BLUE), + RARE("Rare", EnumChatFormatting.YELLOW), + UNIQUE("Unique", EnumChatFormatting.GOLD), + ARTIFACT("Artifact", EnumChatFormatting.AQUA), + SET("Set Piece", EnumChatFormatting.GREEN), + TRADEOFF("Trade-off", EnumChatFormatting.DARK_RED), + EPIC("Epic", EnumChatFormatting.LIGHT_PURPLE); + + private String LOOT; + private EnumChatFormatting COLOUR; + private Quality (final String lootTier, final EnumChatFormatting tooltipColour) + { this.LOOT = lootTier; this.COLOUR = tooltipColour; } - public String formatted() { - return this.COLOUR + this.LOOT; + public String getQuality() { + return LOOT; } - - protected EnumChatFormatting getColour() { - return this.COLOUR; + + protected EnumChatFormatting getColour(){ + return COLOUR; } - - public String getQuality() { - return this.LOOT; + + public String formatted(){ + return this.COLOUR+this.LOOT; + } + + public static Quality getRandomQuality(){ + int lootChance = MathUtils.randInt(0, 100); + if (lootChance <= 10){return Quality.POOR;} + else if (lootChance <= 45){return Quality.COMMON;} + else if (lootChance <= 65){return Quality.UNCOMMON;} + else if (lootChance <= 82){return Quality.MAGIC;} + else if (lootChance <= 92){return Quality.EPIC;} + else if (lootChance <= 97){return Quality.RARE;} + else if (lootChance <= 99){return Quality.ARTIFACT;} + else return null; } } + + diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index e65e0f2ea9..2e25b8b0e9 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -1,14 +1,5 @@ package gtPlusPlus.core.util; -import java.awt.Color; -import java.awt.Graphics; -import java.lang.reflect.Method; -import java.util.*; - -import org.apache.commons.lang3.EnumUtils; - -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.FMLLog; import gregtech.api.enums.Materials; import gregtech.api.enums.TC_Aspects; import gregtech.api.enums.TC_Aspects.TC_AspectStack; @@ -20,285 +11,237 @@ import gtPlusPlus.core.util.math.MathUtils; import ic2.core.Ic2Items; import ic2.core.init.InternalName; import ic2.core.item.resources.ItemCell; + +import java.awt.Color; +import java.awt.Graphics; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; + import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.EnumHelper; -import net.minecraftforge.fluids.*; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; +import org.apache.commons.lang3.EnumUtils; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.FMLLog; + public class Utils { + public static final int WILDCARD_VALUE = Short.MAX_VALUE; + + public static final boolean isServer(){ + return FMLCommonHandler.instance().getEffectiveSide().isServer(); + } + static class ShortTimerTask extends TimerTask { @Override public void run() { Utils.LOG_WARNING("Timer expired."); } } - - public static final int WILDCARD_VALUE = Short.MAX_VALUE; - - private static short cellID = 15; - - public static Integer appenedHexNotationToInteger(final int hexAsStringOrInt) { - final String hexChar = "0x"; - String result; - Utils.LOG_INFO(String.valueOf(hexAsStringOrInt)); - result = hexChar + String.valueOf(hexAsStringOrInt); - return Integer.getInteger(result); - } - - public static String appenedHexNotationToString(final Object hexAsStringOrInt) { - final String hexChar = "0x"; - String result; - if (hexAsStringOrInt.getClass() == String.class) { - - if (((String) hexAsStringOrInt).length() != 6) { - final String temp = Utils.leftPadWithZeroes((String) hexAsStringOrInt, 6); - result = temp; - } - result = hexChar + hexAsStringOrInt; - return result; - } - else if (hexAsStringOrInt.getClass() == Integer.class) { - ; - if (((String) hexAsStringOrInt).length() != 6) { - final String temp = Utils.leftPadWithZeroes((String) hexAsStringOrInt, 6); - result = temp; - } - result = hexChar + String.valueOf(hexAsStringOrInt); - return result; - } - else { - return null; - } - } - - public static String byteToHex(final byte b) { - final int i = b & 0xFF; - return Integer.toHexString(i); - } - - public static String checkCorrectMiningToolForBlock(final Block currentBlock, final World currentWorld) { - String correctTool = ""; - if (!currentWorld.isRemote) { - try { - correctTool = currentBlock.getHarvestTool(0); - Utils.LOG_WARNING(correctTool); - - } - catch (final NullPointerException e) { - - } - } - - return correctTool; - } - - public static boolean containsMatch(final boolean strict, final ItemStack[] inputs, final ItemStack... targets) { - for (final ItemStack input : inputs) { - for (final ItemStack target : targets) { - if (Utils.itemMatches(target, input, strict)) { - return true; - } - } - } - return false; - } - - public static List<Object> convertArrayListToList(final ArrayList sourceArray) { - final List<Object> targetList = new ArrayList<Object>(Arrays.asList(sourceArray)); - return targetList; - } - - public static List<Object> convertArrayToFixedSizeList(final Object[] sourceArray) { - final List<Object> targetList = Arrays.asList(sourceArray); - return targetList; - } - - public static List<Object> convertArrayToList(final Object[] sourceArray) { - final List<Object> targetList = new ArrayList<Object>(Arrays.asList(sourceArray)); - return targetList; - } - - public static Object[] convertListToArray(final List<Object> sourceList) { - final Object[] targetArray = sourceList.toArray(new Object[sourceList.size()]); - return targetArray; - } - - public static ItemStack createInternalNameAndFluidCell(final String s) { - Utils.LOG_WARNING("1"); - final InternalName yourName = EnumHelper.addEnum(InternalName.class, s, new Class[0], new Object[0]); - Utils.LOG_WARNING("2 " + yourName.name()); - final ItemCell item = (ItemCell) Ic2Items.cell.getItem(); - Utils.LOG_WARNING("3 " + item.getUnlocalizedName()); - try { - Utils.LOG_WARNING("4"); - final Class<? extends ItemCell> clz = item.getClass(); - Utils.LOG_WARNING("5 " + clz.getSimpleName()); - final Method methode = clz.getDeclaredMethod("addCell", int.class, InternalName.class, Block[].class); - Utils.LOG_WARNING("6 " + methode.getName()); - methode.setAccessible(true); - Utils.LOG_WARNING("7 " + methode.isAccessible()); - final ItemStack temp = (ItemStack) methode.invoke(item, Utils.cellID++, yourName, new Block[0]); - Utils.LOG_INFO("Successfully created " + temp.getDisplayName() + "s."); - FluidContainerRegistry.registerFluidContainer(FluidUtils.getFluidStack(s.toLowerCase(), 0), temp.copy(), - Ic2Items.cell.copy()); - ItemUtils.addItemToOreDictionary(temp.copy(), "cell" + s); - return temp; - } - catch (final Exception e) { - e.printStackTrace(); - } - return null; - } - - public static boolean doesEntryExistAlreadyInOreDictionary(final String OreDictName) { - if (OreDictionary.getOres(OreDictName).size() != 0) { + + public static boolean isModUpToDate(){ + + if (CORE.MASTER_VERSION.equals(CORE.VERSION.toLowerCase())){ return true; - } + } return false; } - - public static ToolMaterial generateMaterialFromGT(final Materials gtMaterial) { - final String name = gtMaterial.name(); - final int harvestLevel = gtMaterial.mToolQuality; - final int durability = gtMaterial.mDurability; - final float damage = gtMaterial.mToolQuality; - final int efficiency = (int) gtMaterial.mToolSpeed; - final int enchantability = gtMaterial.mEnchantmentToolsLevel; - final ToolMaterial temp = EnumHelper.addToolMaterial(name, harvestLevel, durability, efficiency, damage, - enchantability); - return temp; - + + public static TC_AspectStack getTcAspectStack (TC_Aspects aspect, long size){ + return getTcAspectStack(aspect.name(), (int) size); } - - /** - * Returns a Liquid Stack with given amount of IC2Steam. - */ - public static FluidStack getIC2Steam(final long aAmount) { - return FluidRegistry.getFluidStack("ic2steam", (int) aAmount); + + public static TC_AspectStack getTcAspectStack (String aspect, long size){ + return getTcAspectStack(aspect, (int) size); } - public static TC_AspectStack getTcAspectStack(final String aspect, final int size) { + public static TC_AspectStack getTcAspectStack (TC_Aspects aspect, int size){ + return getTcAspectStack(aspect.name(), size); + } + + public static TC_AspectStack getTcAspectStack (String aspect, int size){ TC_AspectStack returnValue = null; - if (aspect.toUpperCase() == "COGNITIO") { - // Adds in Compat for older GT Versions which Misspell aspects. + if (aspect.toUpperCase() == "COGNITIO"){ + //Adds in Compat for older GT Versions which Misspell aspects. try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "COGNITIO")) { - Utils.LOG_WARNING("TC Aspect found - " + aspect); + if (EnumUtils.isValidEnum(TC_Aspects.class, "COGNITIO")){ + Utils.LOG_WARNING("TC Aspect found - "+aspect); returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITIO"), size); } else { - Utils.LOG_INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + Utils.LOG_INFO("Fallback TC Aspect found - "+aspect+" - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); returnValue = new TC_AspectStack(TC_Aspects.valueOf("COGNITO"), size); - } - } - catch (final NoSuchFieldError r) { + } + } catch (NoSuchFieldError r){ Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); } } - else if (aspect.toUpperCase() == "EXANIMUS") { - // Adds in Compat for older GT Versions which Misspell aspects. + else if (aspect.toUpperCase() == "EXANIMUS"){ + //Adds in Compat for older GT Versions which Misspell aspects. try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "EXANIMUS")) { - Utils.LOG_WARNING("TC Aspect found - " + aspect); + if (EnumUtils.isValidEnum(TC_Aspects.class, "EXANIMUS")){ + Utils.LOG_WARNING("TC Aspect found - "+aspect); returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXANIMUS"), size); } else { - Utils.LOG_INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + Utils.LOG_INFO("Fallback TC Aspect found - "+aspect+" - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); returnValue = new TC_AspectStack(TC_Aspects.valueOf("EXAMINIS"), size); - } - } - catch (final NoSuchFieldError r) { + } + } catch (NoSuchFieldError r){ Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); } - + + } - else if (aspect.toUpperCase() == "PRAECANTATIO") { - // Adds in Compat for older GT Versions which Misspell aspects. + else if (aspect.toUpperCase() == "PRAECANTATIO"){ + //Adds in Compat for older GT Versions which Misspell aspects. try { - if (EnumUtils.isValidEnum(TC_Aspects.class, "PRAECANTATIO")) { - Utils.LOG_WARNING("TC Aspect found - " + aspect); + if (EnumUtils.isValidEnum(TC_Aspects.class, "PRAECANTATIO")){ + Utils.LOG_WARNING("TC Aspect found - "+aspect); returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTATIO"), size); } else { - Utils.LOG_INFO("Fallback TC Aspect found - " + aspect - + " - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); + Utils.LOG_INFO("Fallback TC Aspect found - "+aspect+" - PLEASE UPDATE GREGTECH TO A NEWER VERSION TO REMOVE THIS MESSAGE - THIS IS NOT AN ERROR"); returnValue = new TC_AspectStack(TC_Aspects.valueOf("PRAECANTIO"), size); - } - } - catch (final NoSuchFieldError r) { + } + } catch (NoSuchFieldError r){ Utils.LOG_INFO("Invalid Thaumcraft Aspects - Report this issue to Alkalus"); - } + } } else { - Utils.LOG_WARNING("TC Aspect found - " + aspect); + Utils.LOG_WARNING("TC Aspect found - "+aspect); returnValue = new TC_AspectStack(TC_Aspects.valueOf(aspect), size); } return returnValue; } - /* - * public static void recipeBuilderBlock(ItemStack slot_1, ItemStack slot_2, - * ItemStack slot_3, ItemStack slot_4, ItemStack slot_5, ItemStack slot_6, - * ItemStack slot_7, ItemStack slot_8, ItemStack slot_9, Block resultBlock){ - * GameRegistry.addRecipe(new ItemSt |
