Skip to content

Creating a entity renderer

Olafcio1 edited this page Jul 13, 2026 · 5 revisions

This guide assumes you've already created and setup an Avoid project.


§ Making an entity renderer 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.net.entity_renderer.Baker;
    import pl.olafcio.avoid.net.entity_renderer.LivingEntityRenderer;
    import pl.olafcio.avoid.net.id.Identification;
    
    public class HerobrineEntityRenderer
           extends LivingEntityRenderer<HerobrineEntity, HerobrineEntityState>
    {
        public HerobrineEntityRenderer(Baker baker) {
            super(baker, new HerobrineEntityModel(baker.bakeLayer("minecraft:player", "main")), 0.0f);
        }
    
        @Override
        public Identification getTextureLocation(HerobrineEntityState herobrineEntityState) {
            return new Identification("testmod", "textures/entity/herobrine.png");
        }
    
        @Override
        public void render(HerobrineEntity herobrineEntity, HerobrineEntityState herobrineEntityState, float v) {
        }
    }

    Of course you need to replace the class name and package.
    This creates a living entity:

    • with the HerobrineEntityModel model,
    • with the minecraft:player layer,
    • using the testmod:textures/entity/herobrine.png skin.

    The entity has the shadow radius of 0.
    It doesn't have any additional rendering (default rendering is automatically called before the custom rendering for living entities).

  3. Add any additional layers;
    It's possible to add content to another layers, by:

    • adding existing content (e.g. addCustomHead()), or
    • adding new content with modelparts (baker.bakeLayer(/layer/, /element/)).

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