Skip to content

Instantly share code, notes, and snippets.

@tinkerstudent
Last active December 5, 2015 18:14
Show Gist options
  • Select an option

  • Save tinkerstudent/df415263a19096b3c9c3 to your computer and use it in GitHub Desktop.

Select an option

Save tinkerstudent/df415263a19096b3c9c3 to your computer and use it in GitHub Desktop.
package com.tinkeracademy.minecraft;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
@Mod(modid = ItemsMod.MODID, version = ItemsMod.VERSION)
public class ItemsMod {
public static final String MODID = "itemsmod";
public static final String VERSION = "1.0";
private static Item key;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
key = new Key();
}
@EventHandler
public void init(FMLInitializationEvent event)
{
if (event.getSide() == Side.CLIENT) {
((Key) key).init();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment