Jump to content

Recommended Posts

Posted (edited)

It was a bit hard to explain in the title but basically i wanted to add a recipe for a spawn egg for one of my mod's mobs, so i created a class that extended ItemMonsterPlacer. The custom spawn egg does appear in game and it does spawn my mob successfully, the issue im having is that it created a spawn egg with my texture and name added on to vanilla mobs. So under all the vanilla eggs would be a copy of all the vanilla eggs with the name "Fame Minion Blaze" for example, and those egg copies will spawn the mob that they are copied from, so the egg in the above mentioned example would spawn a blaze, its just that the name and texture of the egg are wrong. So my question is, is there something in ItemMonsterPlacer that i need to Override to get this to stop? Or am i possibly messing something else up. Now go easy on me, its been many years since ive tried to mod and ive never tried to do this in particular before, that being said, im also an idiot.

 

My custom spawn egg class: 

  Reveal hidden contents

Within my item initialization class, this is the entry for this item:

  Reveal hidden contents

So if someone could tell me the stupid thing im doing, that would be great. Thanks.

 

P.S. Heres a pic of what it looks like in game for more reference.

eggs.png

Edited by VaritekCibus
Posted (edited)

could you post your itemInit class?

 

I believe that there is also a way to register your egg at the same time as registering your entity which could eliminate the problem

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 2/12/2018 at 8:51 AM, diesieben07 said:

Why are you creating a custom spawn egg? Just use the one vanilla adds.

Expand  

Well im trying to create a craftable egg, i figured i would need to create a new item that functioned as a "spawn egg" in order to give it a recipe. I might have been wrong in that assumption, vanilla doesnt have a precedent for creating craftable eggs so i wasnt sure exactly how that would be done.

 

  On 2/12/2018 at 5:16 AM, Cadiboo said:

could you post your itemInit class?

 

I believe that there is also a way to register your egg at the same time as registering your entity which could eliminate the problem

Expand  

The whole ItemInit class is like 300 lines due to the amount of items in my mod, so in the interest of space, this is the structure:

  Reveal hidden contents

Then within that i register all the items with the same format as the example i gave in the first post.

Posted (edited)
  On 2/12/2018 at 2:53 PM, diesieben07 said:

You can add a crafting recipe for a normal spawn egg just fine. You do not need to make your own item.

Expand  

Hm, ok ignore my last reply, i guess i did assume incorrectly. Thank you.

Edit: it did indeed work, im mad at myself for not thinking of the nbt from the start. Thank you though diesieben.

Edited by VaritekCibus

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.