List all entites

Looking for the equivalent to bukkits EntityType.values() or something similar.

What I want to do is use this list to build a config on startup, with the possibility of this list also containing forge mod entities as well.

Collection<EntityType> entityTypes = game.getRegistry().getAllOf(EntityType.class)
1 Like

Excellent. Now I’ve run into a flaw with this idea. I also need to know if the entity is Living…Any help?

EntityType entityType = ...;
boolean isLivingType = Living.class.isAssignableFrom(entityType.getEntityClass());
1 Like