Tools is creative tab

2 posts / 0 new
Last post
ohadk123's picture
Offline
Last seen: 4 days 1 hour ago
Joined: 06/12/2015 - 09:08
Gems: 24
Tools is creative tab

Hi, recently i started to make a mod in MCreator, I made tools but i can't find how to put tham in my creative tab.

please help!



GH127's picture
Offline
Last seen: 3 months 2 hours ago
Joined: 01/16/2015 - 19:00
Gems: -1
Hey ohadk123, I will give a

Hey ohadk123, I will give a example of how you can add tools on the creative tab:

Step 1:Hit the "view source" button of your tool

 

Step 2: something like this will appear on the final of the list:

 

static{
Item.ToolMaterial enumt = EnumHelper.addToolMaterial("MURASAME", 1, 4000, 4F, 4996, 2);block = (Item)(new ItemSword(enumt){public Set<String> getToolClasses(ItemStack stack){
HashMap<String, Integer> ret = new HashMap<String, Integer>();
ret.put("sword", 1);
return ret.keySet();
}
}).setUnlocalizedName("Murasame").setTextureName("name_of_the_texture");
Item.itemRegistry.addObject(431, "Murasame", block);

 

Step 3: search for ".setTextureName('name_of_the_texture')" and then put this code after it:

.setCreativeTab(mcreator_NameOftheTab.tab);

 

Step 4:Hit the "save and recompile" button

Step 5: Enjoy

 

Hope I helped you,if not please comment here the error and i will try to fix that