Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Fixed honey bottle condense bug #3760

Open justinmtech opened this issue 3 years ago • 4 comments

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

justinmtech avatar Jan 20 '22 19:01 justinmtech

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.

pop4959 avatar Jan 20 '22 19:01 pop4959

I tested on other versions and added the version check condition.

justinmtech avatar Jan 22 '22 16:01 justinmtech

Few things;

You cannot just add the items to the User's inventory, you need to make them part of the Trade output.

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.

justinmtech avatar Jan 23 '22 01:01 justinmtech

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.

mdcfe avatar Mar 19 '22 16:03 mdcfe

Status? Cause this is still not fixed.

dahbawz avatar Jul 23 '23 19:07 dahbawz

Closing as this has been abandoned, I may just do this myself later.

JRoy avatar Nov 11 '23 23:11 JRoy