Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
implement forgelin fully and fix crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT2 committed Apr 24, 2020
1 parent 3191a63 commit 0e25473
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 4 deletions.
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public String getModContainerClass() {

@Override
public String getSetupClass() {
return null;
return "net.shadowfacts.forgelin.preloader.ForgelinSetup";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}

}

0 comments on commit 0e25473

Please sign in to comment.