blob: a622a6c82ee051ffab2753964bdc25b3b84b6e0d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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}")
}
}
|