FANDOM


Creating an EntityEdit

To create an Entity, copy and paste this line of code;

registerEntityType(Class entityClass, String entityName, int entityId);

Then replace "Class entityClass" with the class of your Entity, such as "EntityRedDragon.class".

Replace "String entityName" with your Entity name, such as "EntityRedDragon".

Replace "int entityId" with a free Entity ID, or use the getFreeEntityId() function instead.


A completed line would look like this:

registerEntityType(EntityRedDragon.class, "EntityRedDragon", getFreeEntityId());