package pegasusepsilon.hardmodenavigation.common;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import pegasusepsilon.hardmodenavigation.client.HandledItem;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(
modid = HardModeNavigation.MODID,
name = HardModeNavigation.NAME,
version = HardModeNavigation.VERSION
) @NetworkMod(
clientSideRequired = true,
serverSideRequired = true
) public class HardModeNavigation {
@Instance(HardModeNavigation.MODID)
public static HardModeNavigation instance;
public static final String MODID = "hardmodenavigation";
public static final String NAME = "Hard Mode Navigation by Pegasus Epsilon";
public static final String VERSION = "0a";
@SidedProxy(
clientSide="pegasusepsilon.hardmodenavigation.client.ClientProxy",
serverSide="pegasusepsilon.hardmodenavigation.common.CommonProxy"
) public static CommonProxy proxy;
private void mcModInfo (FMLPreInitializationEvent event) {
/* hardcoded mcmod.info */
ModMetadata data = event.getModMetadata();
data.modId = MODID;
data.name = NAME;
data.version = VERSION;
data.description = "Telescopes, sextants, barometers, oh my...";
data.url = "http://pegasus.pimpninjas.org/HardModeNavigation";
data.updateUrl = "http://pegasus.pimpninjas.org/PE-HMN-1.6.4.jar";
String author = "Pegasus Epsilon <pegasus@pimpninjas.org>";
data.authorList.add(author);
data.credits = author;
//data.logoFile = "";
//data.screenshots[0] = "";
}
@EventHandler public void preInit (FMLPreInitializationEvent event) {
mcModInfo(event);
System.out.println("HMN.preinit");
}
@EventHandler public void init (FMLInitializationEvent event) {
/*
itemProtractor,
itemPlumbBob,
itemTelescope,
itemSextant,
itemNavCompass,
itemNavClock
*/
CreativeTabs creativeTab = CreativeTabs.tabTools;
String internalName = "itemTelescope";
String visibleName = "Makeshift Telescope";
int itemID = 0;
int maxStackSize = 1;
Item telescopeItem = new HandledItem(itemID)
.setTextureName(MODID + ":" + internalName)
.setUnlocalizedName(internalName)
.setMaxStackSize(maxStackSize)
.setCreativeTab(creativeTab);
GameRegistry.registerItem(telescopeItem, internalName);
LanguageRegistry.addName(telescopeItem, visibleName);
new CraftingIngredient(0);
System.out.println("HMN.init");
}
@EventHandler public void postInit (FMLPostInitializationEvent event) {
System.out.println("HMN.postinit");
}
}