Jump to content

How to start adding Entities


Recommended Posts

I want to add Entities to the game but I don't know how.

I know how you add a block,


First, you make a block class:



Then you call that in a ModBlocks class:



Then you Register the Block and the Block Item:





And then you would have the Blockstate and Block Models and Textures.


Those are all the steps to making a Block,

But what are all the steps to making an Entity?

I know Block Bench has an Entity Model creator thing but I do not know how to use it.


could someone please explain

Link to comment
Share on other sites

I'm assuming you're using MC 1.14.4.

Registering Entities is very similar to registering other game Objects, and extremely similar to registering TileEntities in that you actually register Types rather than the Entity itself. Here's an example:

    public static final EntityType<WabbitEntity> wabbit = null;

    public static void registerEntities(final RegistryEvent.Register<EntityType<?>> event) {
        LOGGER.debug("Wabbits: Registering Entities...");
                EntityType.Builder.create(WabbitEntity::new, EntityClassification.CREATURE)
                .build("wabbit").setRegistryName(Constants.MOD_ID, "wabbit");
    } //registerEntities()

You'll probably want a model for your Entity. Try reading https://mcforge.readthedocs.io/en/1.13.x/models/introduction/ (outdated) to get started. You ought to search through the vanilla files (I'd recommend the Slime or the Rabbit) to see how they make theirs, and you could use a program like Blender to create .obj models if you decide to go that route.

You'll likely need to create a special Renderer for you model. Try looking at the vanilla files to see how this works. As for registering your Renderer, try looking at this: https://stackoverflow.com/questions/37126170/irenderfactory-help-in-minecraft-forge (outdated, but the factory still works).

Finally, I have some code you can look at if you need more help. Note that it's mostly throw-away code and not very good, so you ought to use it as an example only.
EntityType Example
Entity and Goal Example
Renderer and Model Example

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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