UM3 F0R TH3 W1N Posted September 9, 2018 Posted September 9, 2018 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. Quote
DeBugger Posted September 9, 2018 Posted September 9, 2018 (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 September 9, 2018 by DeBugger Quote
V0idWa1k3r Posted September 9, 2018 Posted September 9, 2018 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. Quote
UM3 F0R TH3 W1N Posted September 9, 2018 Author Posted September 9, 2018 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 Quote
UM3 F0R TH3 W1N Posted November 1, 2018 Author Posted November 1, 2018 ik this post might be totally dead now but I still haven't managed to do it so help would be highly appreciated Quote
Recommended Posts
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.