The bug
Potions in worlds which were last loaded in 1.8.9 or an earlier version will become water bottles if loaded in the latest version instead of staying the potion they were.
How to reproduce
Create a world in a pre-1.9 version
Obtain a potion via your desired method
Load this world in 1.18.2 or whatever the latest major release is
Note what the potion is
Alternatively, I've attached four world files:
one is a base world from 1.3.2
one is the base world loaded in 1.8.9
one is the base world loaded in 1.12.2
one is the base world loaded in 1.8.9 and then 1.12.2
These worlds can be used to reproduce this issue (as well as MC-249700 and MC-232104) instead of creating such a world yourself.
Expected results
The potion would... remain a potion?
Actual results
It becomes a water bottle.
Further notes
This is without a doubt related to the major refactoring done to potion formatting in 1.9.
Code analysis
Code analysis by @unknown in duplicate MC-277902.
Linked issues
Attachments
Comments 6
The first is from a 1.3.2 world loaded in 1.8.9, then 1.12.2 and finally 1.18.2, the second is from one loaded in 1.8.9 and then straight to 1.18.2.
I think the issue is that the datafixer for potions uses getOptionalTyped(tag_field) instead of getOrCreateTyped(tag_field) so it never actually runs because the lookup for item stack nbt data hasn't been created yet. This should be a trivial fix.
Um, your screenshots state the opposite/show downgrading❓