aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2021-12-12 17:44:34 +0100
committerGitHub <noreply@github.com>2021-12-12 17:44:34 +0100
commitf407403142c021800f2aa0ce93a3e0487237da70 (patch)
tree444242d8339e84ad5db8fd210cc96c2bd572c49e
parent20769d1407d616ea988ec30f6bd4f82eefee95a7 (diff)
parent3c9a892a341a1461f7a0b0c8467e501c99449b77 (diff)
downloadGT5-Unofficial-f407403142c021800f2aa0ce93a3e0487237da70.tar.gz
GT5-Unofficial-f407403142c021800f2aa0ce93a3e0487237da70.tar.bz2
GT5-Unofficial-f407403142c021800f2aa0ce93a3e0487237da70.zip
Merge pull request #21 from GTNewHorizons/gtpp-compat
Fix compat with gtpp, also fixed the build
-rw-r--r--build.gradle.kts8
-rw-r--r--real.gradle.properties2
-rw-r--r--src/main/java/com/github/technus/tectech/compatibility/gtpp/GtppAtomLoader.java12
3 files changed, 17 insertions, 5 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 5688298c49..fe1dfcb909 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
- classpath("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT")
+ classpath("com.github.GTNewHorizons:ForgeGradle:1.2.4")
}
}
@@ -169,9 +169,13 @@ dependencies {
//Hard Dependencies
compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev")
- compile("com.github.GTNewHorizons:StructureLib:1.0.9:deobf")
+ compile("com.github.GTNewHorizons:StructureLib:1.0.11: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/real.gradle.properties b/real.gradle.properties
index 5cf1722acc..d97131bc7f 100644
--- a/real.gradle.properties
+++ b/real.gradle.properties
@@ -2,7 +2,7 @@ systemProp.org.gradle.internal.http.connectionTimeout=120000
systemProp.org.gradle.internal.http.socketTimeout=120000
projectVersion=4.10.8
ic2Version=2.2.828-experimental
-gt5uVersion=experimental-SNAPSHOT
+gt5uVersion=master-SNAPSHOT
yamcoreVersion=1.7.10-0.5.79
opencomputersVersion=MC1.7.10-1.7.5.1291
computercraftVersion=1.75
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);