Tools is creative tab

11 posts / 0 new
Last post
ohadk123's picture
Offline
Last seen: 2 months 5 days 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: 5 months 1 day 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

 

 

Offline
Last seen: 1 week 4 days ago
Joined: 02/02/2017 - 07:53
Gems: 38
RE:Hey ohadk123, I will give a

@GH127 That doesnt work

C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_uraninitePickaxe.java:65: error: illegal start of expression
          .setCreativeTab(mcreator_KodiKraftTools.tab);
          ^
1 error

FAILURE: Build failed with an exception.

Offline
Last seen: 1 month 4 hours ago
Joined: 07/04/2015 - 20:41
Gems: 19
RE:RE:Hey ohadk123, I will give a

@KodiKodi As far as I know, you can just click on the toolbar that lists all the creative tabs.  Just scroll down; your tabs should appear at the bottom. ;)

Offline
Last seen: 1 week 4 days ago
Joined: 02/02/2017 - 07:53
Gems: 38
RE:RE:RE:Hey ohadk123, I will give a

@Sushi3462 What? Where is that?

Rainbow Gamer's picture
Offline
Last seen: 3 hours 28 min ago
Joined: 02/05/2015 - 21:49
Gems: 334
What version are you using?

What version are you using?

Offline
Last seen: 1 week 4 days ago
Joined: 02/02/2017 - 07:53
Gems: 38
RE:What version are you using?

@Rainbow Gamer I think pylo 1.7.2 minecraft version 1.7.10

Rainbow Gamer's picture
Offline
Last seen: 3 hours 28 min ago
Joined: 02/05/2015 - 21:49
Gems: 334
RE:RE:What version are you using?

@KodiKodi That might explain it. It seems certain things can have their own tabs. Blocks and normal items are the only ones. Maybe you can make the creative tan in MCreator, then export it and find the code for your tools and set it to be there.

Offline
Last seen: 1 week 4 days ago
Joined: 02/02/2017 - 07:53
Gems: 38
RE:RE:RE:What version are you using?

@Rainbow Gamer Too complicated

Rainbow Gamer's picture
Offline
Last seen: 3 hours 28 min ago
Joined: 02/05/2015 - 21:49
Gems: 334
RE:RE:RE:RE:What version are you using?

@KodiKodi hmmm. Maybe you could make two versions of your tools like activating it.
Maybe you can make the real version of the tools and have a items version of the tools.
Then have the 'item' tools be in your tab since the real tools seems to be on strike.
After that you make it so that you need to right click the items to 'activate' the real tools.

Offline
Last seen: 21 min 53 sec ago
Joined: 08/27/2013 - 18:03
Gems: 365
Could you show a whole code

Could you show a whole code of the attempt that has been based on what GH127 has written here 2 years ago? Just console log can not say very much useful info about your code.