implement forgelin fully and fix crashes

This commit is contained in:
Bella 2020-04-24 11:27:36 -04:00
parent 3191a63a84
commit 0e25473c86
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
4 changed files with 47 additions and 4 deletions

View File

@ -94,7 +94,13 @@ dependencies {
compile 'com.github.MrPowerGamerBR:TemmieWebhook:-SNAPSHOT'
compile 'com.github.kevinsawicki:http-request:http-request-6.0'
compile group: "net.shadowfacts", name: "Forgelin", version: "1.8.4"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlin_version
compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version
compile group: "org.jetbrains", name: "annotations", version: annotations_version
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-core", version: coroutines_version
compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version
}
processResources {
@ -130,7 +136,14 @@ shadowJar {
include(dependency('org.javassist:javassist'))
include(dependency('com.github.MrPowerGamerBR:TemmieWebhook'))
include(dependency('com.github.kevinsawicki:http-request'))
include(dependency('org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version'))
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"))
include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}"))
include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"))
include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}"))
include(dependency("org.jetbrains:annotations:${annotations_version}"))
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}"))
include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}"))
include(dependency('net.shadowfacts:Forgelin'))
}
exclude 'dummyThing' // can someone explain why this is here
classifier = 'release'

View File

@ -4,4 +4,6 @@ modVersion=1.1.4-beta
modBaseName=kamiblue
forgeVersion=1.12.2-14.23.5.2847
mcpVersion=stable_39
kotlin_version=1.3.40
kotlin_version=1.3.50
annotations_version=16.0.3
coroutines_version=1.3.1

View File

@ -35,7 +35,7 @@ public class MixinLoaderForge implements IFMLLoadingPlugin {
@Override
public String getSetupClass() {
return null;
return "net.shadowfacts.forgelin.preloader.ForgelinSetup";
}
@Override

View File

@ -0,0 +1,28 @@
package net.shadowfacts.forgelin.preloader;
import net.minecraftforge.fml.relauncher.IFMLCallHook;
import java.util.Map;
/**
* @author shadowfacts
*/
public class ForgelinSetup implements IFMLCallHook {
@Override
public void injectData(Map<String, Object> data) {
ClassLoader loader = (ClassLoader)data.get("classLoader");
try {
loader.loadClass("net.shadowfacts.forgelin.KotlinAdapter");
} catch (ClassNotFoundException e) {
// this should never happen
throw new RuntimeException("Couldn't find Forgelin langague adapter, this shouldn't be happening", e);
}
}
@Override
public Void call() throws Exception {
return null;
}
}