aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-12 17:54:08 +0100
committerMartin Robertz <dream-master@gmx.net>2021-12-12 17:54:08 +0100
commit6b578fb99c135821aa36fae6eb5b187c4bcd8c86 (patch)
tree7725d73bd3039a9f975a33f4f25151ffdf93a998
parentcb0fd15baf2b21032a0fdf37107c269af6514c3b (diff)
parentf407403142c021800f2aa0ce93a3e0487237da70 (diff)
downloadGT5-Unofficial-6b578fb99c135821aa36fae6eb5b187c4bcd8c86.tar.gz
GT5-Unofficial-6b578fb99c135821aa36fae6eb5b187c4bcd8c86.tar.bz2
GT5-Unofficial-6b578fb99c135821aa36fae6eb5b187c4bcd8c86.zip
Merge branch 'master' of github.com:GTNewHorizons/TecTech
# Conflicts: # build.gradle.kts
-rw-r--r--build.gradle.kts6
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java12
2 files changed, 15 insertions, 3 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index a6241492d3..99e6fa0b11 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -170,8 +170,12 @@ dependencies {
//Hard Dependencies
compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev")
compile("com.github.GTNewHorizons:StructureLib:1.0.12:dev")
- compile("com.github.GTNewHorizons:GT5-Unofficial:master-SNAPSHOT:dev"){
+ compile("com.github.GTNewHorizons:GT5-Unofficial:$gt5uVersion:dev"){
exclude("net.industrial-craft", "industrialcraft-2")
+ exclude("com.github.GTNewHorizons", "StructureLib")
+ }
+ compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") {
+ isTransitive = false
}
compile("eu.usrv:YAMCore:$yamcoreVersion:deobf")
diff --git a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
index 32db2caed9..bf96d61795 100644
--- a/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
+++ b/src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java
@@ -40,6 +40,14 @@ public class GtppAtomLoader implements Runnable{
}
//endregion
+ private static Method getMethodWithReplacements(Class<?> owner, String name1, String name2, Class<?>... arguments) throws ReflectiveOperationException {
+ try {
+ return owner.getMethod(name1, arguments);
+ } catch (ReflectiveOperationException e) {
+ return owner.getMethod(name2, arguments);
+ }
+ }
+
@Override
public void run() {
//region reflect a bit
@@ -47,9 +55,9 @@ public class GtppAtomLoader implements Runnable{
ELEMENT=Class.forName("gtPlusPlus.core.material.ELEMENT");
ELEMENT_INSTANCE=ELEMENT.getMethod("getInstance").invoke(null);
- Class clazz=Class.forName("gtPlusPlus.core.material.Material");
+ Class<?> clazz=Class.forName("gtPlusPlus.core.material.Material");
getUnlocalizedName=clazz.getMethod("getUnlocalizedName");
- getFluid=clazz.getMethod("getFluid", int.class);
+ getFluid=getMethodWithReplacements(clazz,"getFluidStack", "getFluid", int.class);
clazz=Class.forName("gtPlusPlus.core.material.MaterialGenerator");
generate=clazz.getMethod("generate", Class.forName("gtPlusPlus.core.material.Material"), boolean.class, boolean.class);