Jump to content

Recommended Posts

Posted

Hello fellow modders, I have recently created my first entity and realised that the spawn egg automatically gets put into the Miscellaneous Tab. I would like my spawn egg to be in my tab, however I couldn't find a way of doing this. I looked through some of the mc code and couldn't find anything, therefore I couldn't change it. Anyone know how I can get the spawn egg in my own tab. I was thinking of creating my own spawn egg for each of my mobs, but I've now realised that might be too complicated for my level of skill. If anyone could help me with getting the spawn egg into my tab I would be highly appreciated. Thanks.

Posted (edited)

Im not sure, perhaps if you use the registerEgg method? I never used them in this way, but it sounds like that you can do it there. 

Edited by DeBugger
Posted
1 hour ago, UM3 F0R TH3 W1N said:

I was thinking of creating my own spawn egg for each of my mobs

This is pretty much the only option. Monster eggs exist as one single item with various NBT data that determines the mob spawned. As such it has one creative tab - the misc tab. As it is a singleton you can't change the creative tab of a specific monster egg without changing the creative tab of them all.

A hacky partial workaround is to override CreativeTabs#displayAllRelevantItems in your CreativeTab and manually add the spawn eggs you need to the tab items list. However this will require you to manually construct the correct NBT data of the egg and it won't remove the eggs from the misc creative tab.

Posted
Just now, V0idWa1k3r said:

This is pretty much the only option. Monster eggs exist as one single item with various NBT data that determines the mob spawned. As such it has one creative tab - the misc tab. As it is a singleton you can't change the creative tab of a specific monster egg without changing the creative tab of them all.

A hacky partial workaround is to override CreativeTabs#displayAllRelevantItems in your CreativeTab and manually add the spawn eggs you need to the tab items list. However this will require you to manually construct the correct NBT data of the egg and it won't remove the eggs from the misc creative tab.

ok i'll try to make my own spawn egg

sounds easier lol

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.