Jump to content

Spawn Eggs in own Creative Tab?? - 1.12.2


UM3 F0R TH3 W1N

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 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.