While trying to create a plugin to prevent map duplication, I came across several weird instances of Recipe.getResult().getType() returning material types that do not reflect what the displayed material types in-game are in a crafting table. This affects unique recipes like the crafting recipes for tool repair, map enlargement, and map & book cloning.
Tool repair & cloning recipes output Material.AIR instead of the actual material.
Map enlargement outputs Material.MAP instead of Material.FILLED_MAP, when minecraft:filled_map is the result displayed in-game.
Below is the simple debug code I was using for testing:
@EventHandler public void onCraft(PrepareItemCraftEvent e) { if (e.getRecipe() != null) { Bukkit.broadcastMessage(e.getRecipe().getResult().getType().toString()); } }