MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Tools (pickaxe, axe, shovel, hoe, sword)

+9
lcass
jesshankin22
Themountaindewosse
filip151
ikke009
Strengthowns
proshitness
breakyorself
austin56101
13 posters

Page 2 of 2 Previous  1, 2

Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Tools (pickaxe, axe, shovel, hoe, sword)

Post by austin56101 Sat Oct 22, 2011 5:15 am

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)
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
austin56101
Moderator
Moderator

Posts : 85
Join date : 2011-10-22
Age : 27
Location : Cali!

Back to top Go down


Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by MrCreeper07 Sat Oct 29, 2011 5:02 am

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
MrCreeper07
Member

Posts : 18
Join date : 2011-10-23

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by austin56101 Sat Oct 29, 2011 5:31 am

woot aha now this is a hot topic Smile
austin56101
austin56101
Moderator
Moderator

Posts : 85
Join date : 2011-10-22
Age : 27
Location : Cali!

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by lcass Sat Oct 29, 2011 1:08 pm

lol mrcreeper its not his he is not on this forum Very Happy

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by MrCreeper07 Sat Oct 29, 2011 5:00 pm

oh but his code looks like it was copied from henrythecoders website..
MrCreeper07
MrCreeper07
Member

Posts : 18
Join date : 2011-10-23

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by austin56101 Sat Oct 29, 2011 7:48 pm

did you not see at the top "NOT MADE BY ME, MADE BY HENRY"
austin56101
austin56101
Moderator
Moderator

Posts : 85
Join date : 2011-10-22
Age : 27
Location : Cali!

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by jesshankin22 Sat Oct 29, 2011 11:13 pm

haha^

jesshankin22
Member

Posts : 47
Join date : 2011-10-24

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by maciejkiller Tue Nov 08, 2011 4:47 pm

You can also just type ItemNamehere for the recipe.
In base items, it's Item.namehere

maciejkiller
Member

Posts : 5
Join date : 2011-11-07

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by missytammy888 Sat Dec 17, 2011 4:32 am

I don't know how to do mods, can u tell me how?

missytammy888
Member

Posts : 3
Join date : 2011-12-15

Back to top Go down

Tools (pickaxe, axe, shovel, hoe, sword) - Page 2 Empty Re: Tools (pickaxe, axe, shovel, hoe, sword)

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum