Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ExoCraft.Main;
- import java.io.File;
- import ExoCraft.Main.Items.Amethyst;
- import ExoCraft.Main.Items.Peridot;
- import ExoCraft.Main.Items.Prompt;
- import ExoCraft.Main.Items.Tanzanite;
- import ExoCraft.Main.Items.TanzaniteShard;
- import ExoCraft.Main.Ores.BlockAmethystOre;
- import ExoCraft.Main.Ores.BlockPeridotOre;
- import ExoCraft.Main.Ores.BlockTanzaniteShardOre;
- import ExoCraft.Main.Tools.AmethystAxe;
- import ExoCraft.Main.Tools.AmethystPickaxe;
- import ExoCraft.Main.Tools.AmethystSword;
- import ExoCraft.Main.Tools.PeridotAxe;
- import ExoCraft.Main.Tools.PeridotPickaxe;
- import ExoCraft.Main.Tools.PeridotSword;
- import ExoCraft.Main.Tools.Spear;
- import ExoCraft.Main.Tools.TanzaniteAxe;
- import ExoCraft.Main.Tools.TanzanitePickaxe;
- import ExoCraft.Main.Tools.TanzaniteSuperSword;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraftforge.common.Configuration;
- import net.minecraftforge.common.EnumHelper;
- 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.NetworkMod;
- import cpw.mods.fml.common.registry.GameRegistry;
- import cpw.mods.fml.common.registry.LanguageRegistry;
- //Define Basic Information For Mod
- @Mod(modid="exocraft", name="ExoCraft", version="Alpha v1.1")
- //Define CLient & Server Side Requirement's
- @NetworkMod(clientSideRequired=true, serverSideRequired=false)
- public class Main {
- //Enum Tool Materials
- public EnumToolMaterial tanzanite = EnumHelper.addToolMaterial("Tanzanite", 3, 10000, 25.0F, 15.0F, 30);
- public EnumToolMaterial spear = EnumHelper.addToolMaterial("spear", 3, 500, 20.0F, 10.0F, 0);
- public EnumToolMaterial amethsyt = EnumHelper.addToolMaterial("Amethsyt", 3, 2500, 15.0F, 10.0F, 20);
- public EnumToolMaterial peridot = EnumHelper.addToolMaterial("Peridot", 3, 5000, 20.0F, 7.5F, 25);
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Declare Stuff
- public static int TanzaniteShardOreID = 3500;
- public static int TanzaniteShardID = 4000;
- public static int TanzaniteID = 4001;
- public static int PromptID = 4002;
- public static int TanzaniteSuperSwordID = 4003;
- public static int TanzanitePickaxeID = 4004;
- public static int TanzaniteAxeID = 4005;
- public static int SpearID = 4006;
- public static int AmethystID = 4007;
- public static int AmethystOreID = 3501;
- public static int AmethystSwordID= 4008;
- public static int AmethystPickaxeID = 4009;
- public static int AmethystAxeID = 4010;
- public static int PeridotID = 4011;
- public static int PeridotOreID = 3502;
- public static int PeridotSwordID = 4012;
- public static int PeridotPickaxeID = 4013;
- public static int PeridotAxeID = 4014;
- //Define Tools
- public static Item TanzaniteSuperSword;
- public static Item TanzanitePickaxe;
- public static Item TanzaniteAxe;
- public static Item Spear;
- public static Item AmethystSword;
- public static Item AmethystPickaxe;
- public static Item AmethystAxe;
- public static Item PeridotSword;
- public static Item PeridotPickaxe;
- public static Item PeridotAxe;
- //Define Blocks and Ores
- public static Block TanzaniteShardOre;
- public static Block AmethystOre;
- public static Block PeridotOre;
- //Define Items
- public static Item TanzaniteShard;
- public static Item Tanzanite;
- public static Item Prompt;
- public static Item Amethyst;
- public static Item Peridot;
- @EventHandler
- public void initConfiguration(FMLPreInitializationEvent event){
- // === Creates The .cfg File === \\
- Configuration config = new Configuration(event.getSuggestedConfigurationFile());
- // === Loads The .cfg File === \\
- config.load();
- TanzaniteShardOreID = config.get("Ore", "TanzaniteShardOre", TanzaniteShardOreID).getInt();
- TanzaniteShardID = config.get("Gem", "TanzaniteShard", TanzaniteShardID).getInt();
- TanzaniteID = config.get("Gem", "Tanzanite", TanzaniteID).getInt();
- PromptID = config.get("Other", "Prompt", PromptID).getInt();
- TanzaniteSuperSwordID = config.get("Sword", "TanzaniteSuperSword", TanzaniteSuperSwordID).getInt();
- TanzanitePickaxeID = config.get("PickAxe", "TanzanitePickaxe", TanzanitePickaxeID).getInt();
- TanzaniteAxeID = config.get("Axe", "TanzaniteAxe", TanzaniteAxeID).getInt();
- SpearID = config.get("Other", "Spear", SpearID).getInt();
- AmethystID = config.get("Gem", "Amethyst", AmethystID).getInt();
- AmethystOreID = config.get("Ore", "AmethystOre", AmethystOreID).getInt();
- AmethystSwordID = config.get("Sword", "AmethystSword", AmethystSwordID).getInt();
- AmethystPickaxeID = config.get("PickAxe", "AmethystPickaxe", AmethystPickaxeID).getInt();
- AmethystAxeID = config.get("Axe", "AmethystAxe", AmethystAxeID).getInt();
- PeridotID = config.get("Gem", "Peridot", PeridotID).getInt();
- PeridotOreID = config.get("Ore", "PeridotOre", PeridotOreID).getInt();
- PeridotSwordID = config.get("Sword", "PeridotSword", PeridotSwordID).getInt();
- PeridotPickaxeID = config.get("Pickaxe", "PeridotPickaxe", PeridotPickaxeID).getInt();
- PeridotAxeID = config.get("Axe", "PeridotAxe", PeridotAxeID).getInt();
- config.save();
- // === Saves The .cfg File === \\
- }
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- //Settings for Blocks and Ores
- TanzaniteShardOre = new BlockTanzaniteShardOre(3500, Material.rock).setUnlocalizedName("exocraft:TanzaniteShardOre");
- AmethystOre = new BlockAmethystOre(3501, Material.rock).setUnlocalizedName("exocraft:AmethystOre");
- PeridotOre = new BlockPeridotOre(3502, Material.rock).setUnlocalizedName("exocraft:PeridotOre");
- //Settings for Items
- TanzaniteShard = new TanzaniteShard(4000).setUnlocalizedName("exocraft:TanzaniteShard");
- Tanzanite = new Tanzanite(4001).setUnlocalizedName("exocraft:Tanzanite");
- Prompt = new Prompt(4002).setUnlocalizedName("exocraft:Prompt");
- Amethyst = new Amethyst(4007).setUnlocalizedName("exocraft:Amethyst");
- Peridot = new Peridot(4011).setUnlocalizedName("exocraft:Peridot");
- //Settings for Tools
- TanzaniteSuperSword = new TanzaniteSuperSword(4003, tanzanite).setUnlocalizedName("TanzaniteSuperSword");
- TanzanitePickaxe = new TanzanitePickaxe(4004, tanzanite).setUnlocalizedName("TanzanitePickaxe");
- TanzaniteAxe = new TanzaniteAxe(4005, tanzanite).setUnlocalizedName("TanzaniteAxe");
- Spear = new Spear(4006, spear).setUnlocalizedName("Spear");
- AmethystSword = new AmethystSword(4008, amethsyt).setUnlocalizedName("AmethystSword");
- AmethystPickaxe = new AmethystPickaxe(4009, amethsyt).setUnlocalizedName("AmethystPickaxe");
- AmethystAxe = new AmethystAxe(4010, amethsyt).setUnlocalizedName("AmethystAxe");
- PeridotSword = new PeridotSword(4012, peridot).setUnlocalizedName("PeridotSword");
- PeridotPickaxe = new PeridotPickaxe(4013, peridot).setUnlocalizedName("PeridotPickaxe");
- PeridotAxe = new PeridotAxe(4014, peridot).setUnlocalizedName("PeridotAxe");
- //////////////////////////////////////////////////////////////////////////////////////////////////////////
- //Register Ores
- GameRegistry.registerBlock(TanzaniteShardOre, "TanzaniteShardOre");
- LanguageRegistry.addName(TanzaniteShardOre, "TanzaniteShardOre");
- GameRegistry.registerBlock(AmethystOre, "AmethystOre");
- LanguageRegistry.addName(AmethystOre, "AmethystOre");
- GameRegistry.registerBlock(PeridotOre, "PeridotOre");
- LanguageRegistry.addName(PeridotOre, "PeridotOre");
- //Register Items
- LanguageRegistry.addName(TanzaniteShard, "TanzaniteShard");
- LanguageRegistry.addName(Tanzanite, "Tanzanite");
- LanguageRegistry.addName(Prompt, "Prompt");
- LanguageRegistry.addName(Amethyst, "Amethyst");
- LanguageRegistry.addName(Peridot, "Peridot");
- //Register Tools
- //Swords
- GameRegistry.registerItem(TanzaniteSuperSword, "TanzaniteSuperSword");
- LanguageRegistry.addName(TanzaniteSuperSword, "Tanzanite Super Sword");
- GameRegistry.registerItem(PeridotSword, "PeridotSword");
- LanguageRegistry.addName(PeridotSword, "Peridot Sword");
- GameRegistry.registerItem(PeridotSword, "PeridotSword");
- LanguageRegistry.addName(PeridotSword, "Peridot Sword");
- //Picks
- GameRegistry.registerItem(TanzanitePickaxe, "TanzanitePickaxe");
- LanguageRegistry.addName(TanzanitePickaxe, " Tanzanite Pickaxe");
- GameRegistry.registerItem(AmethystPickaxe, "AmethystPickaxe");
- LanguageRegistry.addName(AmethystPickaxe, " Amethyst Pickaxe");
- GameRegistry.registerItem(PeridotPickaxe, "PeridotPickaxe");
- LanguageRegistry.addName(PeridotPickaxe, " Peridot Pickaxe");
- //Axes
- GameRegistry.registerItem(TanzaniteAxe, "TanzaniteAxe");
- LanguageRegistry.addName(TanzaniteAxe, "Tanzanite Axe");
- GameRegistry.registerItem(AmethystAxe, "AmethystAxe");
- LanguageRegistry.addName(AmethystAxe, "Amethyst Axe");
- GameRegistry.registerItem(PeridotAxe, "PeridotAxe");
- LanguageRegistry.addName(PeridotAxe, "Peridot Axe");
- //Other
- GameRegistry.registerItem(Spear, "Spear");
- LanguageRegistry.addName(Spear, "Spear");
- //Recipes for Items
- GameRegistry.addRecipe(new ItemStack(Main.Prompt), new Object[]{ "111", "101", "AAA", '0', Item.redstone, '1', Item.ingotIron, 'A', Main.Amethyst});
- GameRegistry.addRecipe(new ItemStack(Block.commandBlock), new Object[]{ "101", "020", "101", '0', Item.leather, '1', Item.ingotIron, '2', Main.Prompt });
- GameRegistry.addRecipe(new ItemStack(Main.Tanzanite), new Object[]{ " 0 ", "0 0", " 0 ", '0', Main.TanzaniteShard});
- GameRegistry.addRecipe(new ItemStack(Main.TanzaniteSuperSword), new Object[]{ "E0E", "F1F", "L1L", '0', Main.Tanzanite, '1', Item.stick, 'F', Item.flintAndSteel, 'L', Item.bucketLava, 'E', Item.eyeOfEnder});
- GameRegistry.addRecipe(new ItemStack(Main.TanzanitePickaxe), new Object []{ "111", " 0 ", " 0 ", '0', Item.stick, '1', Main.Tanzanite});
- GameRegistry.addRecipe(new ItemStack(Main.TanzaniteAxe), new Object []{ "11 ", "10 ", " 0 ", '0', Item.stick, '1', Main.Tanzanite});
- GameRegistry.addRecipe(new ItemStack(Main.Spear), new Object []{ " 1 ", " 0 ", " 0 ", '0', Item.stick, '1', Item.flint});
- GameRegistry.addRecipe(new ItemStack(Main.AmethystSword), new Object []{ " 1 ", " 1 ", " 0 ", '0', Item.stick, '1', Main.Amethyst});
- GameRegistry.addRecipe(new ItemStack(Main.AmethystPickaxe), new Object []{ "111", " 0 ", " 0 ", '0', Item.stick, '1', Main.Amethyst});
- GameRegistry.addRecipe(new ItemStack(Main.AmethystAxe), new Object []{ "11 ", "10 ", " 0 ", '0', Item.stick, '1', Main.Amethyst});
- GameRegistry.addRecipe(new ItemStack(Main.PeridotSword), new Object []{ " 1 ", " 1 ", " 0 ", '0', Item.stick, '1', Main.Peridot});
- GameRegistry.addRecipe(new ItemStack(Main.PeridotPickaxe), new Object []{ "111", " 0 ", " 0 ", '0', Item.stick, '1', Main.Peridot});
- GameRegistry.addRecipe(new ItemStack(Main.PeridotAxe), new Object []{ "11 ", "10 ", " 0 ", '0', Item.stick, '1', Main.Peridot});
- //Smelting
- GameRegistry.addSmelting(Main.TanzaniteShardOre.blockID, new ItemStack(Main.TanzaniteShard), 20.0F);
- GameRegistry.addSmelting(Main.AmethystOre.blockID, new ItemStack(Main.Amethyst), 5.0F);
- GameRegistry.addSmelting(Main.PeridotOre.blockID, new ItemStack(Main.Peridot), 10.0F);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement