I want to program a Minecraft client-mod or server-plugin that adds a recipe for making a Bottle o' Enchanting with the following ingredients:
1 glass bottle + 1 lvl of experience → 1 Bottle o' Enchanting
One possible implementation that I have thought of is to execute the command /xp -1L player
, but I am unsure how to invoke that command from my Java code. Is there a better way?
How would you go about adding an experience-requiring recipe to Minecraft?