summaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/kowalski/ExampleMod.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/kowalski/ExampleMod.kt')
-rw-r--r--src/main/kotlin/moe/nea/kowalski/ExampleMod.kt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/kowalski/ExampleMod.kt b/src/main/kotlin/moe/nea/kowalski/ExampleMod.kt
new file mode 100644
index 0000000..a622a6c
--- /dev/null
+++ b/src/main/kotlin/moe/nea/kowalski/ExampleMod.kt
@@ -0,0 +1,22 @@
+package moe.nea.kowalski
+
+import net.minecraft.client.Minecraft
+import net.minecraft.init.Blocks
+import net.minecraftforge.fml.common.Mod
+import net.minecraftforge.fml.common.event.FMLInitializationEvent
+
+@Mod(modid = "kowalski", useMetadata = true)
+class ExampleMod {
+ @Mod.EventHandler
+ fun init(event: FMLInitializationEvent) {
+ try {
+ val resource: net.minecraft.client.resources.IResource = Minecraft.getMinecraft().getResourceManager()
+ .getResource(net.minecraft.util.ResourceLocation("test:test.txt"))
+ org.apache.commons.io.IOUtils.copy(resource.getInputStream(), java.lang.System.out)
+ } catch (e: java.io.IOException) {
+ throw java.lang.RuntimeException(e)
+ }
+
+ println("Dirt: ${Blocks.dirt.unlocalizedName}")
+ }
+}