package com.example import net.minecraft.client.Minecraft import net.minecraft.init.Blocks import net.minecraftforge.fml.common.Mod import net.minecraftforge.fml.common.event.FMLInitializationEvent import net.minecraft.client.renderer.GlStateManager @Mod(modid = "examplemod", 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}") // Below is a demonstration of an access-transformed class access. println("Color State: " + GlStateManager.Color()); } }