Fixed honey bottle condense bug #3760
https://github.com/EssentialsX/Essentials/issues/3760
Information
This PR fixes #3760.
Details
Proposed fix:
Checks if the result of the condensation is a honey block, and if it is, adds a glass bottle to their inventory based on the input amount. This is the easiest way to fix it to me, and it seems reasonable since this is the only recipe to my knowledge that functions like this.
Environments tested:
OS: Windows 10
Java version: 17.0.1
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [x] Spigot 1.14.4
- [x] Spigot 1.12.2
- [x] CraftBukkit/Spigot 1.8.8
Demonstration:
Screenshots (before/after command): https://imgur.com/a/bgUHbF0
Plugin Download: https://www.dropbox.com/s/yfow8l9m7b8ba3v/EssentialsX-2.19.3-dev%2B6-739600e-honey-bottle-fix.jar?dl=0
It's a workaround, but I think this might be the best way to fix this for now. Though I doubt that this code is safe on versions below 1.15, you should add a version check to the condition and test on < 1.15.
I tested on other versions and added the version check condition.
Few things;
You cannot just add the items to the User's inventory, you need to make them part of the
Tradeoutput.Also, I'd rather a separate method be made so future deviations can be added easier at another time.
Will do! I'm new around here so I'm still figuring out the proper way to do stuff like that.
On Paper 1.18.2 (build 264), I can't condense honey bottles into blocks at all. This is likely due to a change in how the recipe API works on modern versions. In order for this to be merged, we would need to guarantee some sort of consistent behaviour across versions.
Status? Cause this is still not fixed.
Closing as this has been abandoned, I may just do this myself later.