Forge version

The process or flow is following:

For Minecraft 1.18:

  1. Create your entity subclass.
  2. Use a deferred registry to register a new appropriate entity type. You will have to create and use a casting method to satisfy the bounds of generics there. Specify its size, 1.0 is 1 block dimension. If the entity is mobile, make sure to size it smaller than whole numbers, e.g. use 3.9 instead of 4.0. Otherwise the entity will keep getting stuck on blocks while moving.
  3. Register attributes using EntityAttributeCreationEvent.
  4. Register a spawner item for the entity in your item registry of class ForgeSpawnEggItem.
  5. Make an item model appropriate to the spawn egg, it should contain just string '"parent": "minecraft:item/template_spawn_egg"'.
  6. Design a model (preferably in BlockBench), texture it, then save everything and export.
  7. Put the model into your project, generate necessary imports, setup animations.
  8. In your client setup handler, register model layer definitions using EntityRenderersEvent.RegisterLayerDefinitions.
  9. There as well, register a renderer via EntityRenderersEvent.RegisterRenderers.
  10. Put the texture into your project.
  11. Make appropriate entries in language files.
  12. Test the entity and fix mistakes until it's done.