Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,326 Categories: 12

Total Tutorial Views: 41,447,256

[ Minecraft ] How To Make A Custom Tool Set! [ Part 1 ]

Tutorial Name: [ Minecraft ] How To Make A Custom Tool Set! [ Part 1 ]  

Category: PC Tutorials

Submitted By: Console

Date Added:

Comments: 0

Views: 7,060

Related Forum: PC Building Forum

Share:


Hello Guys This Tutorial Is Going To Be In Parts!

Today's Part:
Part 1 Getting Ready!



The first thing you need you need to do is make five new items like this:



        public static final Item shovelTitanium = (new CamelOreItemSpade(128, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumshovel.png").setItemName("shovelTitanium
");
        public static final Item pickaxeTitanium = (new CamelOreItemPickaxe(129, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumpickaxe.png").setItemName("pickaxeTitani
um");
        public static final Item axeTitanium = (new CamelOreItemAxe(130, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumaxe.png").setItemName("hatchetTitanium&q
uot;);
        public static final Item swordTitanium = (new CamelOreItemSword(131, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumsword.png").setItemName("swordTitanium&q
uot;);
        public static final Item hoeTitanium = (new CamelOreItemHoe(132, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumhoe.png").setItemName("hoeTitanium"
);





Now there are really only two things I have to explain in this if you have followed my item tutorial. The first is that we have to make six separate files each called CamelOreItem*.java which will match up with the new CamelOreItem* in each statement. The second is that we have to make CamelOreEnumToolMaterial.java too. Our mod_CamelOre now looks like this:




package net.minecraft.src;

public class mod_CamelOre extends BaseMod
{
        public static final Block oreTitanium = new CamelOreBlockOre(123, ModLoader.addOverride("/terrain.png", "/CamelMod/CamelOre/terrain/titaniumore.png")).setHardness(3F).setResistanc
e(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTitanium"
);
        public static final Item ingotTitanium = (new CamelOreItem(127)).setIconIndex(ModLoader.addOverride("/gui/items.png",
"/CamelMod/CamelOre/gui/items/titaniumingot.png").setItemName("ingotTitanium&q
uot;);
        public static final Item shovelTitanium = (new CamelOreItemSpade(128, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumshovel.png").setItemName("shovelTitanium
");
        public static final Item pickaxeTitanium = (new CamelOreItemPickaxe(129, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumpickaxe.png").setItemName("pickaxeTitani
um");
        public static final Item axeTitanium = (new CamelOreItemAxe(130, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumaxe.png").setItemName("hatchetTitanium&q
uot;);
        public static final Item swordTitanium = (new CamelOreItemSword(131, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumsword.png").setItemName("swordTitanium&q
uot;);
        public static final Item hoeTitanium = (new CamelOreItemHoe(132, CamelOreEnumToolMaterial.toolTITANIUM)).setIconIndex(ModLoader.addOverride("/gui
/items.png", "/CamelMod/CamelOre/gui/items/titaniumhoe.png").setItemName("hoeTitanium"
);





     public mod_CamelOre()
        {

        }

        public void load()
        {
                ModLoader.RegisterBlock(oreTitanium);
                ModLoader.AddName(oreTitanium, "Titanium Ore");
                ModLoader.AddName(ingotTitanium, "Titanium Ingot");
        }

        public String getVersion()
        {
                return "1.0.0";
        }
}





We have to do two other things to our mod_CamelOre which I am not going to explain. We have to add names for our tools and make recipes for them.




package net.minecraft.src;

public class mod_CamelOre extends BaseMod
{
        public static final Block oreTitanium = new CamelOreBlockOre(123, ModLoader.addOverride("/terrain.png", "/CamelMod/CamelOre/terrain/titaniumore.png")).setHardness(3F).setResistanc
e(5F).setStepSound(Block.soundStoneFootstep).setBlockName("oreTitanium"
);
        public static final Item ingotTitanium = (new CamelOreItem(127)).setIconIndex(ModLoader.addOverride("/gui/items.png",
"/CamelMod/CamelOre/gui/items/titaniumingot.png").setItemName("ingotTitanium&q
uot;);
        public static final Item shovelTitanium = (new CamelOreItemSpade(128, CamelOreEnumToolMaterial. TITANIUM)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/CamelMod/CamelOre/gui/items/titaniumshovel.png").setItemName("shovelTitanium
");
        public static final Item pickaxeTitanium = (new CamelOreItemPickaxe(129, CamelOreEnumToolMaterial. TITANIUM)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/CamelMod/CamelOre/gui/items/titaniumpickaxe.png").setItemName("pickaxeTitani
um");
        public static final Item axeTitanium = (new CamelOreItemAxe(130, CamelOreEnumToolMaterial. TITANIUM)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/CamelMod/CamelOre/gui/items/titaniumaxe.png").setItemName("hatchetTitanium&q
uot;);
        public static final Item swordTitanium = (new CamelOreItemSword(131, CamelOreEnumToolMaterial. TITANIUM)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/CamelMod/CamelOre/gui/items/titaniumsword.png").setItemName("swordTitanium&q
uot;);
        public static final Item hoeTitanium = (new CamelOreItemHoe(132, CamelOreEnumToolMaterial. TITANIUM)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/CamelMod/CamelOre/gui/items/titaniumhoe.png").setItemName("hoeTitanium"
);





        public mod_CamelOre()
        {

        }

        public void load()
        {
                ModLoader.RegisterBlock(oreTitanium);
                ModLoader.AddName(oreTitanium, "Titanium Ore");
                ModLoader.AddName(ingotTitanium, "Titanium Ingot");
                ModLoader.AddName(shovelTitanium, "Titanium Shovel");
                ModLoader.AddName(pickaxeTitanium, "Titanium Pickaxe");
                ModLoader.AddName(axeTitanium, "Titanium Axe");
                ModLoader.AddName(swordTitanium, "Titanium Sword");
                ModLoader.AddName(hoeTitanium, "Titanium Hoe");
                ModLoader.AddRecipe(new ItemStack(pickaxeTitanium), new Object[] {"XXX", " # ", " # ", Character.valueOf('X'), ingotTitanium, Character.valueOf('#'), Item.stick});
                ModLoader.AddRecipe(new ItemStack(shovelTitanium), new Object[] {"X", "#", "#", Character.valueOf('X'), ingotTitanium, Character.valueOf('#'), Item.stick});
                ModLoader.AddRecipe(new ItemStack(axeTitanium), new Object[] {"XX", "X#", " #", Character.valueOf('X'), ingotTitanium, Character.valueOf('#'), Item.stick});
                ModLoader.AddRecipe(new ItemStack(hoeTitanium), new Object[] {"XX", " #", " #", Character.valueOf('X'), ingotTitanium, Character.valueOf('#'), Item.stick});
                ModLoader.AddRecipe(new ItemStack(swordTitanium), new Object[] {"X", "X", "#", Character.valueOf('X'), ingotTitanium, Character.valueOf('#'), Item.stick});
        }

        public String getVersion()
        {
                return "1.0.0";
        }
}





Now we just have seven files left! Let's start with CamelOreEnumToolMaterial. Here it is:




package net.minecraft.src;

public enum CamelOreEnumToolMaterial
{
        TITANIUM("TITANIUM", 5, 2, 500, 7F, 3, 9);
        private final int harvestLevel;
        private final int maxUses;
        private final float efficiencyOnProperMaterial;
        private final int damageVsEntity;
        private final int enchantability;
        private static final CamelOreEnumToolMaterial allToolMaterials[];

        private CamelOreEnumToolMaterial(String s, int i, int j, int k, float f, int l, int i1)
        {
                harvestLevel = j;
                maxUses = k;
                efficiencyOnProperMaterial = f;
                damageVsEntity = l;
                enchantability = i1;
        }

        public int getMaxUses()
        {
                return maxUses;
        }

        public float getEfficiencyOnProperMaterial()
        {
                return efficiencyOnProperMaterial;
        }

        public int getDamageVsEntity()
        {
                return damageVsEntity;
        }

        public int getHarvestLevel()
        {
                return harvestLevel;
        }

        public int getEnchantability()
        {
                return enchantability;
        }

        static
        {
                allToolMaterials = (new CamelOreEnumToolMaterial[] {
                        TITANIUM
                });
        }
}





There are really only three (six) things you have to pay attention to in this file.

Change all the CamelOreEnumToolMaterials to whatever your file is called (there are 4 of them).
The line that say TITANIUM on it. It should have the name of your tool material in all caps. If there are more than one, then separate them by a comma.
We have to break down the TITANIUM line at the top of this file.




Here's that breakdown:




"TITANIUM" is just the name of your tool material. (the original ones are "WOOD", "STONE", "IRON", "EMERALD", "GOLD" (they are referenced in the rest of this breakdown in the same order as here))
5 is like a block ID except it is a tool material id (0, 1, 2, 3, 4)
2 is the harvest level which defines what breaks it can break and which it can't. (3 - obsidian, 2 - diamond, gold, and redstone, 1 - iron and lapis) (0, 1, 2, 3, 0)
500 is its maximum uses or how many times it can be used before it breaks (59, 131, 250, 1561, 32)
7F is its efficiency on proper material or how much faster it can mine stuff than usual if it is for that tool (pickaxe - cobblestone, stairs, stone, sand stone, mossy cobblestone, iron, coal, gold, diamond, ice, netherrack lapis, redstone, and rails. shovel - grass, dirt, sand, gravel, snow, clay, slow sand. axe - planks, wood, bookshelf, chest, stairs, and pumpkins) (2F, 4F, 6F, 8F, 12F)
3 is its damage vs entities or how much damage it does to entities. (0, 1, 2, 3, 0)
9 is its enchantibility level or how enchantible
it is (15, 5, 14, 10, 22)




If you wanted to do more than one tool material up there you would just put a comma instead of a semicolon and put another one. We're done with that file!




Now we have six left. But its not that bad. What we have to do is copy each original file and just change all the Item* to CamelOreItem* and all the EnumToolMaterial to CamelOreEnumToolMaterial We're just going to look at one of them and then I'll just give you the other five because you will know what they all mean.




Thanks Guys For Viewing!
Thanks To : Methuselah96
Next Tutorial : Unknown.

Ratings

Current rating: 4.64 by 28 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"[ Minecraft ] How To Make A Custom Tool Set! [ Part 1 ]" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.