DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
207 stars 104 forks source link

Fix brewing material choice block handling #2592

Closed tal5 closed 7 months ago

tal5 commented 7 months ago

Reported on Discord.

Additions

Changes

[!NOTE] The NMS method used by ItemHelper#isValidMix checks both vanilla and custom recipes, which is why the new handling checks for a custom recipe first and then if it can't find one & that's true it knows it's a vanilla recipe. This works, but can result in custom recipes technically being checked twice - an alternative is to set the internal custom brewing recipes map to an empty map, call that method, and then set the original map back in, which might be more efficient, but would also mean more messy reflection.