Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package theceruleanflash.TCFMod;
- import theceruleanflash.TCFMod.item.ItemAmethystArmor;
- import theceruleanflash.TCFMod.item.ItemAmethystAxe;
- import theceruleanflash.TCFMod.item.ItemAmethystHoe;
- import theceruleanflash.TCFMod.item.ItemAmethystPickaxe;
- import theceruleanflash.TCFMod.item.ItemAmethystShovel;
- import theceruleanflash.TCFMod.item.ItemAmethystSword;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.passive.EntityChicken;
- import net.minecraft.entity.passive.EntitySheep;
- import net.minecraft.init.Blocks;
- import net.minecraft.init.Items;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemArmor;
- import net.minecraft.item.ItemFood;
- import net.minecraft.item.ItemSeeds;
- import net.minecraft.item.ItemSoup;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.common.MinecraftForge;
- import net.minecraftforge.common.util.EnumHelper;
- import net.minecraftforge.event.entity.living.LivingDropsEvent;
- 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;
- import java.util.Random;
- import net.minecraft.entity.passive.EntityCow;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.event.entity.living.LivingDropsEvent;
- import cpw.mods.fml.common.eventhandler.SubscribeEvent;
- @Mod(modid = "tcfm", name = "TCF Mod", version = "1.0")
- public class TCFMod {
- public static Item itemFriedEgg;
- public static Item itemCocoaNibs;
- public static Item itemChocolateLiquor;
- public static Item itemUnsweetenedChocolate;
- public static Item itemMilkChocolate;
- public static Item itemDarkChocolate;
- public static Item itemChickenSandwich;
- public static Item itemHamburger;
- public static Item itemAmethyst;
- public static Block blockAmethystOre;
- public static Block cropRice;
- public static Item amethystPickaxe;
- public static Item amethystSword;
- public static Item amethystAxe;
- public static Item amethystHoe;
- public static Item amethystShovel;
- public static Item amethystHelmet;
- public static Item amethystChestplate;
- public static Item amethystLeggings;
- public static Item amethystBoots;
- public static Item itemRiceSeed;
- public static Item itemRiceCrop;
- public static Item itemBowlOfRice;
- public static Item itemTCFLogo;
- public static final Item.ToolMaterial amethystToolMaterial = EnumHelper.addToolMaterial("amethystToolMaterial", 2, 400, 7.0F, 2.5F, 14);
- public static final ItemArmor.ArmorMaterial amethystArmorMaterial = EnumHelper.addArmorMaterial("amethystArmorMaterial", 390, new int []{2,7,6,2} , 9);
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- //Item/Block init and registering
- //Config handling
- itemFriedEgg = new ItemFood(5, 0.5F, false).setUnlocalizedName("ItemFriedEgg").setTextureName("tcfm:itemfriedegg").setCreativeTab(tabTCFMod);
- itemCocoaNibs = new Item().setUnlocalizedName("ItemCocoaNibs").setTextureName("tcfm:itemcocoanibs").setCreativeTab(tabTCFMod).setCreativeTab(CreativeTabs.tabMaterials);
- itemChocolateLiquor = new Item().setUnlocalizedName("ItemChocolateLiquor").setTextureName("tcfm:itemchocolateliquor").setCreativeTab(tabTCFMod);
- itemUnsweetenedChocolate = new ItemFood(4, 0.3F, false).setUnlocalizedName("ItemUnsweetenedChocolate").setTextureName("tcfm:itemunsweetenedchocolate").setCreativeTab(tabTCFMod);
- itemMilkChocolate = new ItemFood(6, 0.5F, false).setUnlocalizedName("ItemMilkChocolate").setTextureName("tcfm:itemmilkchocolate").setCreativeTab(tabTCFMod);
- itemDarkChocolate = new ItemFood(6, 0.5F, false).setUnlocalizedName("ItemDarkChocolate").setTextureName("tcfm:itemdarkchocolate").setCreativeTab(tabTCFMod);
- itemChickenSandwich = new ItemFood(16, 1.0F, true).setUnlocalizedName("ItemChickenSandwich").setTextureName("tcfm:itemchickensandwich").setCreativeTab(tabTCFMod);
- itemHamburger = new ItemFood(20, 1.1F, true).setUnlocalizedName("ItemHamburger").setTextureName("tcfm:itemhamburger").setCreativeTab(tabTCFMod);
- itemAmethyst = new Item().setUnlocalizedName("ItemAmethyst").setTextureName("tcfm:itemamethyst").setCreativeTab(tabTCFMod);
- itemTCFLogo = new Item().setUnlocalizedName("ItemTCFLogo").setTextureName("tcfm:itemtcflogo").setCreativeTab(tabTCFMod);
- cropRice = new CropRice().setBlockName("CropRice").setCreativeTab(tabTCFMod).setBlockTextureName("tcfm:blockricecrop");
- itemRiceCrop = new Item().setUnlocalizedName("ItemRiceCrop").setTextureName("tcfm:itemricecrop").setCreativeTab(tabTCFMod);
- itemRiceSeed = new ItemSeeds(cropRice, Blocks.farmland).setUnlocalizedName("ItemRiceSeeds").setTextureName("tcfm:itemriceseeds").setCreativeTab(tabTCFMod);
- itemBowlOfRice = new ItemSoup(2).setUnlocalizedName("ItemBowlOfRice").setTextureName("tcfm:itembowlofrice").setCreativeTab(tabTCFMod);
- amethystPickaxe = new ItemAmethystPickaxe(amethystToolMaterial).setUnlocalizedName("ItemAmethystPickaxe").setTextureName("tcfm:itemamethystpickaxe").setCreativeTab(tabTCFMod);
- amethystSword = new ItemAmethystSword(amethystToolMaterial).setUnlocalizedName("ItemAmethystSword").setTextureName("tcfm:itemamethystsword").setCreativeTab(tabTCFMod);
- amethystAxe = new ItemAmethystAxe(amethystToolMaterial).setUnlocalizedName("ItemAmethystAxe").setTextureName("tcfm:itemamethystaxe").setCreativeTab(tabTCFMod);
- amethystHoe = new ItemAmethystHoe(amethystToolMaterial).setUnlocalizedName("ItemAmethystHoe").setTextureName("tcfm:itemamethysthoe").setCreativeTab(tabTCFMod);
- amethystShovel = new ItemAmethystShovel(amethystToolMaterial).setUnlocalizedName("ItemAmethystShovel").setTextureName("tcfm:itemamethystshovel").setCreativeTab(tabTCFMod);
- amethystHelmet = new ItemAmethystArmor(amethystArmorMaterial, 0, 0).setUnlocalizedName("ItemAmethystHelmet").setTextureName("tcfm:itemamethysthelmet").setCreativeTab(tabTCFMod);
- amethystChestplate = new ItemAmethystArmor(amethystArmorMaterial, 0, 1).setUnlocalizedName("ItemAmethystChestplate").setTextureName("tcfm:itemamethystchestplate").setCreativeTab(tabTCFMod);
- amethystLeggings = new ItemAmethystArmor(amethystArmorMaterial, 0, 2).setUnlocalizedName("ItemAmethystLeggings").setTextureName("tcfm:itemamethystleggings").setCreativeTab(tabTCFMod);
- amethystBoots = new ItemAmethystArmor(amethystArmorMaterial, 0, 3).setUnlocalizedName("ItemAmethystBoots").setTextureName("tcfm:itemamethystboots").setCreativeTab(tabTCFMod);
- blockAmethystOre = new BlockAmethystOre(Material.rock).setBlockName("BlockAmethystOre").setBlockTextureName("tcfm:blockamethystore").setCreativeTab(tabTCFMod);
- GameRegistry.registerItem(itemCocoaNibs, itemCocoaNibs.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemFriedEgg, itemFriedEgg.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemChocolateLiquor, itemChocolateLiquor.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemUnsweetenedChocolate, itemUnsweetenedChocolate.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemMilkChocolate, itemMilkChocolate.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemDarkChocolate, itemDarkChocolate.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemChickenSandwich, itemChickenSandwich.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemHamburger, itemHamburger.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemAmethyst, itemAmethyst.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(blockAmethystOre, blockAmethystOre.getUnlocalizedName().substring(5));
- System.out.println(blockAmethystOre.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemTCFLogo, itemTCFLogo.getUnlocalizedName().substring(5));
- GameRegistry.registerWorldGenerator(new AmethystGeneration(), 0);
- GameRegistry.registerItem(amethystPickaxe, amethystPickaxe.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystSword, amethystSword.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystAxe, amethystAxe.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystHoe, amethystHoe.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystShovel, amethystShovel.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystHelmet, amethystHelmet.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystChestplate, amethystChestplate.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystLeggings, amethystLeggings.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(amethystBoots, amethystBoots.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemRiceSeed, itemRiceSeed.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemRiceCrop, itemRiceCrop.getUnlocalizedName().substring(5));
- GameRegistry.registerBlock(cropRice, cropRice.getUnlocalizedName().substring(5));
- GameRegistry.registerItem(itemBowlOfRice, itemBowlOfRice.getUnlocalizedName().substring(5));
- // X * 0.5 = 10 hunger
- // beef saturation 0.8F
- //hunger, saturation, dog
- GameRegistry.addRecipe(new ItemStack(itemUnsweetenedChocolate, 1), new Object[]{"NNN","NLN","NNN",'L', itemChocolateLiquor, 'N', itemCocoaNibs });
- GameRegistry.addRecipe(new ItemStack(itemChickenSandwich, 1), new Object[]{" B "," C "," B ",'C', Items.cooked_chicken, 'B', Items.bread });
- GameRegistry.addRecipe(new ItemStack(itemHamburger, 1), new Object[]{" B "," S "," B ",'S', Items.cooked_beef, 'B', Items.bread });
- GameRegistry.addRecipe(new ItemStack(amethystPickaxe, 1), new Object[]{"AAA"," S "," S ",'S', Items.stick, 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystAxe, 1), new Object[]{"AA","AS"," S",'S', Items.stick, 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystShovel, 1), new Object[]{"A","S","S",'S', Items.stick, 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystSword, 1), new Object[]{"A","A","S",'S', Items.stick, 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystHoe, 1), new Object[]{"AA"," S"," S",'S', Items.stick, 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystHelmet, 1), new Object[]{"AAA","A A", 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystChestplate, 1), new Object[]{"A A","AAA","AAA", 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystLeggings, 1), new Object[]{"AAA","A A","A A", 'A', itemAmethyst });
- GameRegistry.addRecipe(new ItemStack(amethystBoots, 1), new Object[]{"A A","A A", 'A', itemAmethyst });
- GameRegistry.addShapelessRecipe(new ItemStack(itemMilkChocolate, 1), new Object[] { new ItemStack(itemUnsweetenedChocolate), new ItemStack (Items.milk_bucket)});
- GameRegistry.addShapelessRecipe(new ItemStack(itemDarkChocolate, 1), new Object[] { new ItemStack(itemUnsweetenedChocolate), new ItemStack (Items.sugar)});
- GameRegistry.addShapelessRecipe(new ItemStack(itemCocoaNibs, 2), new Object[] { new ItemStack(Items.dye, 1, 3) });
- GameRegistry.addSmelting(Items.egg, new ItemStack(itemFriedEgg), 5.0F);
- GameRegistry.addSmelting(itemCocoaNibs, new ItemStack(itemChocolateLiquor), 5.0F);
- GameRegistry.addShapelessRecipe(new ItemStack(itemBowlOfRice, 1), new Object[] { new ItemStack(itemRiceCrop), new ItemStack (Items.bowl)});
- }
- @EventHandler
- public void init(FMLInitializationEvent event) {
- //Proxy, TileENtity, entity, GUI and Packet Registering
- MinecraftForge.EVENT_BUS.register(new DropHandler());
- }
- @EventHandler
- public void postInit(FMLPostInitializationEvent event) {
- }
- public static CreativeTabs tabTCFMod = new CreativeTabs("tabTCFMod"){
- @Override
- public Item getTabIconItem(){
- return new ItemStack(itemTCFLogo).getItem();
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment