-
Notifications
You must be signed in to change notification settings - Fork 0
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
-
Create a java class;
You can pick any location within your project source code directory. -
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.
-
Customize it as you wish;
The API uses underscore (_)-prefixed annotations to describe most of default behaviour. -
Create a renderer;
More info here.
©️ Copyright 2026 Olafcio (on behalf of the AvoidLib org)
📝 Licensed with CC BY-NC (Attribution-NonCommercial)