Before you initialize your EntityItem variable, you should probably check if the entity on top of the block IS an Item. If it's not your game will crash. As for the recipe manager, look into the CraftingManager class. Maybe you could use ArrayLists and a getter or something. I'm not sure exactly, but I'd have to look.