Posted July 24, 20205 yr I need help making a spawn egg for a entity. I keep trying different ways, but none of them work. If some has the code for it, please send it my way.
July 24, 20205 yr 36 minutes ago, Willatendo said: If some has the code for it, please send it my way. That's not a good way to problem solve. Asking for the answer without even showing an attempt is just bad. I'll explain the process that's needed; however, someone else can just give you the code. There are a few things to note. First, you can't use the normal spawn egg method as it doesn't contain supplier for later access. Items are registered before entities so they will not go into a spawn egg. So basically, you need to create your own SpawnEggItem extension that takes in a supplier, passes in a null value for the original, overrides the default entity type gotten from the egg, and adds the unadded eggs to the original list using via reflection after entity types have been registered. You might want to take a look at how SpawnEggs are stored and how their dispenser behavior is handled before attempting this.
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.