Skip to content

Creating an entity

Olafcio1 edited this page Jul 13, 2026 · 5 revisions

This guide assumes you've already created and setup an Avoid project.
This guide uses meta-programming. Another way may either not be implemented or you may need to figure it out on your own.


§ Making an entity with the Avoid Framework


  1. Create a java class;
    You can pick any location within your project source code directory.

  2. Paste the following code:

    package com.example.avoidtmpl;
    
    import pl.olafcio.avoid.mods.annotation_processor.AutoEntity;
    import pl.olafcio.avoid.mods.annotation_processor.AutoID;
    import pl.olafcio.avoid.net.entity.custom.Entity;
    import pl.olafcio.avoid.net.entity_type.properties._attributes;
    import pl.olafcio.avoid.net.entity_type.properties._category;
    import pl.olafcio.avoid.net.entity_type.properties._fireImmune;
    import pl.olafcio.avoid.net.entity_type.properties._living;
    import pl.olafcio.avoid.net.entity_type.properties.attribute.Attribute;
    import pl.olafcio.avoid.net.entity_type.properties.attribute.AttributeBase;
    import pl.olafcio.avoid.net.entity_type.values.Category;
    
    @AutoEntity
    @AutoID
    
    @_living
    @_category(Category.MONSTER)
    @_fireImmune
    @_attributes(base = AttributeBase.LIVING_ENTITY,
                 attributes = {
                    @Attribute(type = Attribute.Type.MAX_HEALTH, value = 100)
                 })
    
    public class HerobrineEntity extends Entity {
        public HerobrineEntity(int id, Object... args) {
            super(id, args);
        }
    }

    Of course you need to replace the class name and package.

  3. Customize it as you wish;
    The API uses underscore (_)-prefixed annotations to describe most of default behaviour.

  4. Create a state class;
    More info here.

  5. Create a model;
    More info here.

  6. Create a renderer;
    More info here.


Avoid Framework


    🏚️ 1. Home
    📽️ 2. Creating your mod
    🌄 3. Adding assets to your mod
    🧊 4. Creating a block
    ✏️ 5. Creating an item
    🎯 6. Creating an entity selector
    🤖 7. Creating a command
    ⌨️ 8. Creating a keybind
    🐺 9. Creating an entity

Clone this wiki locally