Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.stolenchristmas.mods;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.item.Item.ToolMaterial;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.ItemTool;
- import net.minecraftforge.common.util.EnumHelper;
- import net.minecraftforge.oredict.OreDictionary;
- import net.stolenchristmas.mods.blocks.XMASOven;
- import net.stolenchristmas.mods.blocks.XmasTable;
- import net.stolenchristmas.mods.blocks.blockCoalesBlock;
- import net.stolenchristmas.mods.blocks.blockCoalesOre;
- import net.stolenchristmas.mods.blocks.blockTitaniumBlock;
- import net.stolenchristmas.mods.handler.CraftingHandler;
- import net.stolenchristmas.mods.handler.FuelHandler;
- import net.stolenchristmas.mods.handler.GuiHandler;
- import net.stolenchristmas.mods.items.SCItems;
- import net.stolenchristmas.mods.items.hammerItem;
- import net.stolenchristmas.mods.items.itemTitaniumAxe;
- import net.stolenchristmas.mods.items.itemTitaniumHoe;
- import net.stolenchristmas.mods.items.itemTitaniumPick;
- import net.stolenchristmas.mods.items.itemTitaniumShovel;
- import net.stolenchristmas.mods.items.itemTitaniumSword;
- import net.stolenchristmas.mods.items.portFurnaceItem;
- import net.stolenchristmas.mods.items.welderItem;
- import net.stolenchristmas.mods.proxy.CommonProxy;
- import net.stolenchristmas.mods.tileentity.TileEntityXMASOven;
- import net.stolenchristmas.mods.worldgen.XMASWorldGen;
- import cpw.mods.fml.common.FMLCommonHandler;
- 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.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.NetworkRegistry;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- @Mod(modid = stolenchristmas.modid, version = stolenchristmas.version, name = "How Nick Stole Christmas!")
- public class stolenchristmas {
- public static final String modid = "XMAS";
- public static final String version = "Alpha";
- //WorldGEN
- XMASWorldGen eventWorldGen = new XMASWorldGen();
- //CreativeTAB
- public static CreativeTabs xmasTab;
- //Toolkit
- public static ToolMaterial TitaniumMaterial = EnumHelper.addToolMaterial("Titanium", 3, 10000, 15.0F, 20.0F, 25);
- @Instance(modid)
- public static stolenchristmas instance;
- //XMASTABLECRAFTING 5x5
- public static Block blockXmasTable;
- public static final int guiIDWorkSurface = 1;
- public static Item TitaniumSword;
- public static Item TitaniumAxe;
- public static Item TitaniumPick;
- public static Item TitaniumHoe;
- public static Item TitaniumShovel;
- public static Item ItemPortFurnace;
- public static Item ItemHammer;
- public static Item ItemWelder;
- //Items....
- public static Item ItemCoalesence;
- public static Item ItemPineCone;
- public static Item ItemTitanium;
- public static Item ItemStarDust;
- //Blocks.....
- public static Block XMASOvenIdle;
- public static Block XMASOvenActive;
- public static final int guiIDXMASOven = 0;
- //Ores and metal blocks
- public static Block CoalesOre;
- public static Block CoalesBlock;
- public static Block TitaniumOre;
- public static Block TitaniumBlock;
- public static Block StarDustOre;
- @SidedProxy(clientSide = "net.stolenchristmas.mods.proxy.ClientProxy", serverSide = "net.stolenchristmas.mods.proxy.CommonProxy")
- public static CommonProxy xmasProxy;
- @EventHandler
- public void PreInit(FMLPreInitializationEvent preEvent){
- xmasTab = new CreativeTabs("XMAS"){
- @Override
- public Item getTabIconItem() {
- // TODO Auto-generated method stub
- return stolenchristmas.ItemCoalesence;
- }
- };
- //Item Registry
- ItemCoalesence = new SCItems().setUnlocalizedName("CoalesenceItem").setTextureName("XMAS:Coalesence");
- GameRegistry.registerItem(ItemCoalesence, "CoalesenceItem");
- ItemPineCone = new SCItems().setUnlocalizedName("PineCone").setTextureName("XMAS:PineCone");
- GameRegistry.registerItem(ItemPineCone, "PineCone");
- ItemTitanium = new SCItems().setUnlocalizedName("Titanium").setTextureName("XMAS:Titanium");
- GameRegistry.registerItem(ItemTitanium, "Titanium");
- ItemStarDust = new SCItems().setUnlocalizedName("StarDust").setTextureName("XMAS:StarDust");
- GameRegistry.registerItem(ItemStarDust, "StarDust");
- //ToolKit Reg
- ItemPortFurnace = new portFurnaceItem().setUnlocalizedName("PortableFurnace").setTextureName("XMAS:PortableFurnace");
- GameRegistry.registerItem(ItemPortFurnace, "PortableFurnace");
- ItemHammer = new hammerItem().setUnlocalizedName("Hammer").setTextureName("XMAS:Hammer");
- GameRegistry.registerItem(ItemHammer, "Hammer");
- ItemWelder = new welderItem().setUnlocalizedName("Welder").setTextureName("XMAS:Welder");
- GameRegistry.registerItem(ItemWelder, "Welder");
- TitaniumSword = new itemTitaniumSword(TitaniumMaterial).setUnlocalizedName("TitaniumSword").setTextureName("XMAS:TitaniumSword");
- GameRegistry.registerItem(TitaniumSword, "TitaniumSword");
- TitaniumAxe = new itemTitaniumAxe(TitaniumMaterial).setUnlocalizedName("TitaniumAxe").setTextureName("XMAS:TitaniumAxe");
- GameRegistry.registerItem(TitaniumAxe, "TitaniumAxe");
- TitaniumPick = new itemTitaniumPick(TitaniumMaterial).setUnlocalizedName("TitaniumPick").setTextureName("XMAS:TitaniumPick");
- GameRegistry.registerItem(TitaniumPick, "TitaniumPick");
- TitaniumHoe = new itemTitaniumHoe(TitaniumMaterial).setUnlocalizedName("TitaniumHoe").setTextureName("XMAS:TitaniumHoe");
- GameRegistry.registerItem(TitaniumHoe, "TitaniumHoe");
- TitaniumShovel = new itemTitaniumShovel(TitaniumMaterial).setUnlocalizedName("TitaniumShovel").setTextureName("XMAS:TitaniumShovel");
- GameRegistry.registerItem(TitaniumShovel, "TitaniumShovel");
- //Block Registry
- CoalesOre = new blockCoalesOre(Material.rock).setBlockTextureName("XMAS:CoalesenceOre").setBlockName("CoalesenceOre");
- GameRegistry.registerBlock(CoalesOre, "CoalesenceOre");
- CoalesBlock = new blockCoalesBlock(Material.iron).setBlockTextureName("XMAS:CoalesenceBlock").setBlockName("CoalesenceBlock");
- GameRegistry.registerBlock(CoalesBlock, "CoalesenceBlock");
- //Custom Table
- blockXmasTable = new XmasTable(Material.cloth).setBlockTextureName("XMAS:XmasTable").setBlockName("XmasTable");
- GameRegistry.registerBlock(blockXmasTable, "XmasTable");
- //Ores
- TitaniumOre = new blockCoalesOre(Material.rock).setBlockTextureName("XMAS:TitaniumOre").setBlockName("TitaniumOre");
- GameRegistry.registerBlock(TitaniumOre, "TitaniumOre");
- TitaniumBlock = new blockTitaniumBlock(Material.iron).setBlockTextureName("XMAS:TitaniumBlock").setBlockName("TitaniumBlock");
- GameRegistry.registerBlock(TitaniumBlock, "TitaniumBlock");
- StarDustOre = new blockCoalesOre(Material.rock).setBlockTextureName("XMAS:StarDustOre").setBlockName("StarDustOre");
- GameRegistry.registerBlock(StarDustOre, "StarDustOre");
- //Machines
- XMASOvenIdle = new XMASOven(false).setBlockName("XMASOvenIdle").setCreativeTab(xmasTab);
- XMASOvenActive = new XMASOven(true).setBlockName("XMASOvenIdle").setLightLevel(0.625F);
- GameRegistry.registerBlock(XMASOvenIdle, "XMASOvenIdle");
- GameRegistry.registerBlock(XMASOvenActive, "XMASOvenActive");
- //WorldGen
- GameRegistry.registerWorldGenerator(eventWorldGen, 0);
- //Renders
- xmasProxy.registerRenderThings();
- }
- @EventHandler
- public void Init(FMLInitializationEvent event){
- FMLCommonHandler.instance().bus().register(new CraftingHandler());
- NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
- GameRegistry.registerTileEntity(TileEntityXMASOven.class, "XMASOven");
- //Recipes
- GameRegistry.addRecipe(new ItemStack(CoalesBlock), new Object[] {"XXX", "XXX", "XXX", 'X', ItemCoalesence});
- //Smelting
- GameRegistry.addSmelting(CoalesOre, new ItemStack(ItemCoalesence, 5), 20);
- GameRegistry.addSmelting(TitaniumOre, new ItemStack(ItemTitanium, 1), 20);
- GameRegistry.addRecipe(new ItemStack(Items.iron_ingot, 4), new Object[] {"IH", 'I', Blocks.iron_ore, 'H', new ItemStack(ItemPortFurnace, 1, OreDictionary.WILDCARD_VALUE)});
- GameRegistry.addRecipe(new ItemStack(Items.gold_ingot, 2), new Object[] {"IH", 'I', Blocks.gold_ore, 'H', new ItemStack(ItemPortFurnace, 1, OreDictionary.WILDCARD_VALUE)});
- GameRegistry.addRecipe(new ItemStack(ItemCoalesence, 5), new Object[] {"IH", 'I', CoalesOre, 'H', new ItemStack(ItemPortFurnace, 1, OreDictionary.WILDCARD_VALUE)});
- GameRegistry.addRecipe(new ItemStack(ItemTitanium, 2), new Object[] {"IH", 'I', TitaniumOre, 'H', new ItemStack(ItemPortFurnace, 1, OreDictionary.WILDCARD_VALUE)});
- //Fuels
- GameRegistry.registerFuelHandler(new FuelHandler());
- }
- @EventHandler
- public void PostInit(FMLPostInitializationEvent postEvent){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment