The only alternative I can think of is fairly convoluted and involves reflection. You could place the valid classes in a set:
private static final Set<Class<?>> validClasses = new HashSet<Class<?>> ();
static {
Collections.addAll(validClasses, ShapedRecipes.class,
ShapelessRecipes.class
ShapedOreRecipe.class); //etc.
}
Then you can replace the instanceof with something like:
if (o != null && validClasses.contains(o.getClass())) {
Finally the cast can't be done directly but you could use reflection to access the appropriate constructor:
Constructor<ShapelessRecursiveRecipe> constructor =
ShapelessRecursiveRecipe.class.getConstructor(o.getClass());
constructor.newInstance(o);
I have not tested it but it should work.
Whether it makes your code better is debatable - probably not.