I was doing the wrong way around. The solution is the opposite if (EntityCreature.class.isAssignableFrom(EntityList.getClass(entity))) //returns true if entity is a subtype of EntityCreature