Try something like this:
List<Class<? extends Entity>> classes = ImmutableList.of(
Animal.class, Monster.class // add any interfaces you want to match against here
);
Collection<EntityType> cet = Sponge.getRegistry().getAllOf(EntityType.class).stream()
// Match any classes that implement a class listed in "classes"
.filter(x -> classes.stream().anyMatch(y -> y.isAssignableFrom(x.getEntityClass())))
.collect(Collectors.toList());
for (EntityType et : cet) {
///
}
I suggested Animals and Monsters because from the context, I think that’s what you’re interested in controlling, you can see the entities that implement these by looking at the javadocs.
Make sure you know what this returns and how it works before using it!