Tools (pickaxe, axe, shovel, hoe, sword)
+9
lcass
jesshankin22
Themountaindewosse
filip151
ikke009
Strengthowns
proshitness
breakyorself
austin56101
13 posters
Page 2 of 2
Page 2 of 2 • 1, 2
Tools (pickaxe, axe, shovel, hoe, sword)
First topic message reminder :
NOT MADE BY ME, MADE BY HENRY
Here is the code I wrote in the tutorial. You can copy paste it if you like. Just make sure you paste it into a new file called mod_Tools.java. Or, if you want to change the name, make sure you replace wherever it says “mod_Tools” to the name of your mod. Also, don’t forget to name your textures accordingly.
//THIS CODE GOES INTO YOUR mod_Tools.java FILE! (or whatever you named your mod_*YourModNameHere*.java file)
NOT MADE BY ME, MADE BY HENRY
Here is the code I wrote in the tutorial. You can copy paste it if you like. Just make sure you paste it into a new file called mod_Tools.java. Or, if you want to change the name, make sure you replace wherever it says “mod_Tools” to the name of your mod. Also, don’t forget to name your textures accordingly.
//THIS CODE GOES INTO YOUR mod_Tools.java FILE! (or whatever you named your mod_*YourModNameHere*.java file)
- Code:
package net.minecraft.src;
import java.util.Random;
public class mod_Tools extends BaseMod
{
//Here we declare all of our new tools.
public static final Item Pick = new ItemPickaxe(2001, EnumToolMaterial.EMERALD).setItemName("asdf");
public static final Item Spade = new ItemSpade(2002, EnumToolMaterial.EMERALD).setItemName("sdfa");
public static final Item Axe = new ItemAxe(2003, EnumToolMaterial.EMERALD).setItemName("dfas");
public static final Item Hoe = new ItemHoe(2004, EnumToolMaterial.EMERALD).setItemName("fasd");
public static final Item Sword = new ItemSword(2005, EnumToolMaterial.EMERALD).setItemName("adsf");
public mod_Tools()
{
//Here we override all the textures, and add our own.
//Make sure the name of your texture is the same what you write here
Pick.iconIndex = ModLoader.addOverride("/gui/items.png", "/Pick.png");
Spade.iconIndex = ModLoader.addOverride("/gui/items.png", "/Spade.png");
Axe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Axe.png");
Hoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Hoe.png");
Sword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Sword.png");
//Here we add the in game names to all the tools.
ModLoader.AddName(Pick, "Pickaxe");
ModLoader.AddName(Spade, "Shovel");
ModLoader.AddName(Axe, "Axe");
ModLoader.AddName(Hoe, "Hoe");
ModLoader.AddName(Sword, "Sword");
//Here are all the recipes for each tool (all of them are made out of dirt)
ModLoader.AddRecipe(new ItemStack(Pick, 1), new Object[] {
"***", " * ", " * ", Character.valueOf('*'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(Axe, 1), new Object[] {
"** ", "** ", " * ", Character.valueOf('*'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(Spade, 1), new Object[] {
"* *", " * ", " * ", Character.valueOf('*'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(Hoe, 1), new Object[] {
"** ", " * ", " * ", Character.valueOf('*'), Block.dirt
});
ModLoader.AddRecipe(new ItemStack(Sword, 1), new Object[] {
" * ", " * ", " * ", Character.valueOf('*'), Block.dirt
});
}
public String Version()
{
return "3.14159265";
}
}
Last edited by austin56101 on Sat Oct 22, 2011 8:00 pm; edited 1 time in total (Reason for editing : /code)
austin56101- Moderator
- Posts : 85
Join date : 2011-10-22
Age : 28
Location : Cali!
Re: Tools (pickaxe, axe, shovel, hoe, sword)
OMG are you HenryTheCoder from Youtube??? If you are i love your vids!!! I subscribed!! and i know how to fix the mob error well i know how to add a 1.8.1 npc from these tutorials.
MrCreeper07- Member
- Posts : 18
Join date : 2011-10-23
Re: Tools (pickaxe, axe, shovel, hoe, sword)
woot aha now this is a hot topic
austin56101- Moderator
- Posts : 85
Join date : 2011-10-22
Age : 28
Location : Cali!
Re: Tools (pickaxe, axe, shovel, hoe, sword)
oh but his code looks like it was copied from henrythecoders website..
MrCreeper07- Member
- Posts : 18
Join date : 2011-10-23
Re: Tools (pickaxe, axe, shovel, hoe, sword)
did you not see at the top "NOT MADE BY ME, MADE BY HENRY"
austin56101- Moderator
- Posts : 85
Join date : 2011-10-22
Age : 28
Location : Cali!
Re: Tools (pickaxe, axe, shovel, hoe, sword)
You can also just type ItemNamehere for the recipe.
In base items, it's Item.namehere
In base items, it's Item.namehere
maciejkiller- Member
- Posts : 5
Join date : 2011-11-07
Re: Tools (pickaxe, axe, shovel, hoe, sword)
I don't know how to do mods, can u tell me how?
missytammy888- Member
- Posts : 3
Join date : 2011-12-15
Page 2 of 2 • 1, 2
Similar topics
» [Unanswered] sword code
» [1.1] tools set
» [Request} Special Tools
» [unanswered] making new materials and tools
» [1.1] tools set
» [Request} Special Tools
» [unanswered] making new materials and tools
Page 2 of 2
Permissions in this forum:
You cannot reply to topics in this forum