summaryrefslogtreecommitdiff
path: root/archenemyexample/src
diff options
context:
space:
mode:
Diffstat (limited to 'archenemyexample/src')
-rw-r--r--archenemyexample/src/allJvm/kotlin/moe/nea/test/TestClass.kt5
-rw-r--r--archenemyexample/src/allJvm/kotlin/test.kt9
-rw-r--r--archenemyexample/src/fabricMain/kotlin/doStuff.kt7
-rw-r--r--archenemyexample/src/fabricMain/kotlin/moe/nea/test/TestClass.fabric.kt9
-rw-r--r--archenemyexample/src/fabricMain/kotlin/test.kt0
-rw-r--r--archenemyexample/src/forgeMain/kotlin/doStuff.kt5
-rw-r--r--archenemyexample/src/forgeMain/kotlin/moe/nea/aee/forge/Main.kt21
-rw-r--r--archenemyexample/src/forgeMain/kotlin/moe/nea/test/TestClass.forge.kt9
8 files changed, 44 insertions, 21 deletions
diff --git a/archenemyexample/src/allJvm/kotlin/moe/nea/test/TestClass.kt b/archenemyexample/src/allJvm/kotlin/moe/nea/test/TestClass.kt
new file mode 100644
index 0000000..9d72fcc
--- /dev/null
+++ b/archenemyexample/src/allJvm/kotlin/moe/nea/test/TestClass.kt
@@ -0,0 +1,5 @@
+package moe.nea.test
+
+expect object TestClass {
+ fun printTitle()
+} \ No newline at end of file
diff --git a/archenemyexample/src/allJvm/kotlin/test.kt b/archenemyexample/src/allJvm/kotlin/test.kt
deleted file mode 100644
index 87010a6..0000000
--- a/archenemyexample/src/allJvm/kotlin/test.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-expect fun doStuff(args: Int)
-
-fun callDoStuff() {
- doStuff(1)
-}
-
-
-
-
diff --git a/archenemyexample/src/fabricMain/kotlin/doStuff.kt b/archenemyexample/src/fabricMain/kotlin/doStuff.kt
deleted file mode 100644
index fc163c2..0000000
--- a/archenemyexample/src/fabricMain/kotlin/doStuff.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-import net.minecraft.client.MinecraftClient
-import net.minecraft.server.dedicated.DedicatedServer
-
-actual fun doStuff(args: Int) {
- val client = MinecraftClient.getInstance()
- val dedicated: DedicatedServer = TODO()
-} \ No newline at end of file
diff --git a/archenemyexample/src/fabricMain/kotlin/moe/nea/test/TestClass.fabric.kt b/archenemyexample/src/fabricMain/kotlin/moe/nea/test/TestClass.fabric.kt
new file mode 100644
index 0000000..210bbc7
--- /dev/null
+++ b/archenemyexample/src/fabricMain/kotlin/moe/nea/test/TestClass.fabric.kt
@@ -0,0 +1,9 @@
+package moe.nea.test
+
+import net.minecraft.client.MinecraftClient
+
+actual object TestClass {
+ actual fun printTitle() {
+ println(MinecraftClient.getInstance().currentScreen?.toString() ?: "no screen")
+ }
+} \ No newline at end of file
diff --git a/archenemyexample/src/fabricMain/kotlin/test.kt b/archenemyexample/src/fabricMain/kotlin/test.kt
deleted file mode 100644
index e69de29..0000000
--- a/archenemyexample/src/fabricMain/kotlin/test.kt
+++ /dev/null
diff --git a/archenemyexample/src/forgeMain/kotlin/doStuff.kt b/archenemyexample/src/forgeMain/kotlin/doStuff.kt
deleted file mode 100644
index d370de8..0000000
--- a/archenemyexample/src/forgeMain/kotlin/doStuff.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-import net.minecraft.client.Minecraft
-
-actual fun doStuff(args: Int) {
- val client = Minecraft.getInstance()
-} \ No newline at end of file
diff --git a/archenemyexample/src/forgeMain/kotlin/moe/nea/aee/forge/Main.kt b/archenemyexample/src/forgeMain/kotlin/moe/nea/aee/forge/Main.kt
new file mode 100644
index 0000000..141949e
--- /dev/null
+++ b/archenemyexample/src/forgeMain/kotlin/moe/nea/aee/forge/Main.kt
@@ -0,0 +1,21 @@
+package moe.nea.aee.forge
+
+import net.minecraft.launchwrapper.ITweaker
+import net.minecraft.launchwrapper.LaunchClassLoader
+import java.io.File
+
+class Tweaker : ITweaker {
+ override fun acceptOptions(args: MutableList<String>?, gameDir: File?, assetsDir: File?, profile: String?) {
+ }
+
+ override fun injectIntoClassLoader(classLoader: LaunchClassLoader) {
+ }
+
+ override fun getLaunchTarget(): String {
+ return "net.minecraft.client.main.Main"
+ }
+
+ override fun getLaunchArguments(): Array<String> {
+ return arrayOf()
+ }
+}
diff --git a/archenemyexample/src/forgeMain/kotlin/moe/nea/test/TestClass.forge.kt b/archenemyexample/src/forgeMain/kotlin/moe/nea/test/TestClass.forge.kt
new file mode 100644
index 0000000..74e76b7
--- /dev/null
+++ b/archenemyexample/src/forgeMain/kotlin/moe/nea/test/TestClass.forge.kt
@@ -0,0 +1,9 @@
+package moe.nea.test
+
+import net.minecraft.client.Minecraft
+
+actual object TestClass {
+ actual fun printTitle() {
+ println(Minecraft.getMinecraft().currentScreen?.toString() ?: "no screen")
+ }
+} \ No newline at end of file