Skip to content

Instantly share code, notes, and snippets.

@tinkerstudent
Created October 17, 2015 19:20
Show Gist options
  • Select an option

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

Select an option

Save tinkerstudent/eeaaa50b608987067b3b to your computer and use it in GitHub Desktop.
package com.tinkeracademy.rvergis;
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 = MyItemsMod.MODID, version = MyItemsMod.VERSION)
public class MyItemsMod
{
public static final String MODID = "rvergis_myitemsmod";
public static final String VERSION = "1.0";
public static Item key;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
key = new ItemKey();
}
@EventHandler
public void init(FMLInitializationEvent event)
{
if (event.getSide() == Side.CLIENT) {
((ItemKey) key).init();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment