Jump to content

[Solved] Entity Register with Spawn Egg


Mudsquisher

Recommended Posts

So I am using the newest version of Minecraft Forge and trying to create a new entity which just overrides the existing wolf. I am able to get it working correctly using the old deprecated methods:

 

EntityRegistry.registerGlobalEntityID(HeroWolf.class, "Hero Wolf", EntityRegistry.findGlobalUniqueEntityId(), 6750105, 7859797);
EntityRegistry.registerModEntity(HeroWolf.class, "Hero Wolf", 0, this, 64, 3, true);

 

I have looked through lots of forums and tutorials, and they all say to use this instead:

EntityRegistry.registerModEntity(HeroWolf.class,"Hero Wolf", 0, this, 64, 20, true);
EntityRegistry.registerEgg(HeroWolf.class, 6750105, 7859797);

 

When I use the newer methods, the spawn egg shows up correctly, but when I go to use it (spawn the entity) it spawns a regular pig. So, what am I missing here? I'm assuming it has something do with an ID conflict and it defaults to a pig, so how do I get a unique ID or how do I fix that issue?

 

Thank you

Link to comment
Share on other sites

Do not use the first version, the methods are deprecated for a good reason. If you do this, you will run into a lot of problems down the road, especially in compatibility with other mods.

Spawn eggs are currently broken in 1.9, you have to wait for this.

 

Oh, good, it's an actual bug and not me being stupid. lol. Well thank you! :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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