1.16.5 Is there a method that you can use to get the result of if you combined two items in an anvil?

Discussion in 'Spigot Plugin Development' started by JusticeKing, Jul 1, 2021.

  1. I am working on a custom enchantments plugin and I need to know if there is a built-in way to get the result of if you combined two items in an anvil.
     
  2. You can create a temporary Anvil GUI, put the items in it, and get the result after a tick or 2
     
  3. I thought about that. On paper, it seems nice, but I need this to happen in realtime or so, and that sounds very costly.
     
  4. You can do this on startup instead and check all recipes and then make a HashMap of all items - this will use a tad more memory, but you'll only have to do it once (and taking something out of a HashMap is super fast so no worries there)
     
    • Friendly Friendly x 1