Jump to content

Recommended Posts

Posted

Nevermind just found it I had to add the following code to my mod:

EntityRegistry.addSpawn(entityClass, 2, 0, 1, EnumCreatureType.monster, BiomeGenBase.sky);

 

So it would look like this:

    public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) {
        int randomId = EntityRegistry.findGlobalUniqueEntityId();

        EntityRegistry.registerGlobalEntityID(entityClass, entityName, randomId);
        EntityRegistry.registerModEntity(entityClass, entityName, randomId, Eac.mobInstance, 64, 1, true);
        EntityRegistry.addSpawn(entityClass, 2, 0, 1, EnumCreatureType.monster, BiomeGenBase.sky);
        createEgg(randomId, solidColor, spotColor);
    }

Owner of The-Eac.nl domain and Eac teamspeak server Creator of WIP-Eac mod

Posted

@diesieben07

I have somethings to ask and say

So basically I can delete line 21 (registerGlobalEntityId) (At EacEntity.java) or do I have to delete line 22 (registerModEntity)?

 

How would I pass the entity-egg colors to registerGlobalEntityID? With the current setup I only would have to use the following code to register an Entity

createEntity(ClassNameOfEntity.class, "Name Of Entity", 0xBackgroundColor, 0xSpotColour);

 

I dont know How I would Not use the global IDs (yet...)

 

 

Owner of The-Eac.nl domain and Eac teamspeak server Creator of WIP-Eac mod

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.