aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util/reflect
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-04-04 16:57:56 +0100
committerAlkalus <Draknyte1@hotmail.com>2020-04-04 16:57:56 +0100
commitacf7193504fba4a7165d2ba5732cc9ce5f35ec55 (patch)
tree1fb97da489c70c4cc7f134fe5b5aeef2b944979a /src/Java/gtPlusPlus/core/util/reflect
parent35f473d3f79d3b4f30e2cd02885a6e685d66fb45 (diff)
downloadGT5-Unofficial-acf7193504fba4a7165d2ba5732cc9ce5f35ec55.tar.gz
GT5-Unofficial-acf7193504fba4a7165d2ba5732cc9ce5f35ec55.tar.bz2
GT5-Unofficial-acf7193504fba4a7165d2ba5732cc9ce5f35ec55.zip
+ Added a new base bus type.
+ Added the Ball Housing bus. + Added the Catalyst Housing bus. + Added the Reinforced Engine Casing. + Made the Flotation Cell Regulator actually load. $ Fixed Tooltips on Milling Balls & Catalysts. $ Added improved item handling for Milling Balls. $ Added improved item handling for Catalysts.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/reflect')
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index e45d27b926..59d20835ae 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -22,6 +22,7 @@ import com.google.common.reflect.ClassPath;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.data.StringUtils;
+import gtPlusPlus.xmod.gregtech.common.StaticFields59;
public class ReflectionUtils {
@@ -1035,5 +1036,19 @@ public class ReflectionUtils {
return null;
}
+ public static <T> T createNewInstanceFromConstructor(Constructor aConstructor, Object[] aArgs) {
+ T aInstance;
+ try {
+ aInstance = (T) aConstructor.newInstance(aArgs);
+ if (aInstance != null) {
+ return aInstance;
+ }
+ }
+ catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
}