Created
March 27, 2014 00:20
-
-
Save anonymous/9797030 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package recipeplus; | |
import recipeplus.blocks.BlockBlueberry; | |
import recipeplus.items.ItemBlueberry; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.material.Material; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.item.Item; | |
import net.minecraftforge.common.MinecraftForge; | |
import cpw.mods.fml.common.FMLCommonHandler; | |
import cpw.mods.fml.common.Mod; | |
import cpw.mods.fml.common.Mod.EventHandler; | |
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.registry.GameRegistry; | |
@Mod(modid = RecipePlus.MODID, name = RecipePlus.MODNAME, version = RecipePlus.VERSION) | |
public class RecipePlus | |
{ | |
public static final String MODID = "recipeplus"; | |
public static final String MODNAME = "Recipe+"; | |
public static final String VERSION = "0.0.1"; | |
// create custom creativetab for mod items | |
// instantiate blocks | |
public final static Block blockBlueberry = new BlockBlueberry(); | |
// instantiate items | |
public final static Item blueberry = new ItemBlueberry(); | |
@EventHandler | |
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the GameRegistry." | |
public void preInit(FMLPreInitializationEvent event) { | |
// DEBUG | |
System.out.println("preInit()"); | |
// register blocks | |
GameRegistry.registerBlock(blockBlueberry, "blueberries"); | |
// register items | |
GameRegistry.registerItem(blueberry, "blueberry"); | |
// register tileentities | |
} | |
@EventHandler | |
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." | |
public void load(FMLInitializationEvent event) { | |
// DEBUG | |
System.out.println("load()"); | |
// register custom event listeners | |
MinecraftForge.EVENT_BUS.register(new RecipeEventHandler()); | |
// FMLCommonHandler.instance().bus().register(new RecipeEventHandler()); | |
} | |
@EventHandler | |
// postInit "Handle interaction with other mods, complete your setup based on this." | |
public void postInit(FMLPostInitializationEvent event) { | |
// DEBUG | |
System.out.println("postInit()"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment