Was able to reproduce this bug in 1.15.1
What I did:
Generated new world (redstone ready, creative, cheats on, etc.)
Placed down redstone block
Placed command block next to redstone block
Enter GUI and set mode to repeating, unconditional, always active
Entered this command: 'execute if entity @a[nbt={Inventory:[{id:"minecraft:potion",tag:{Potion:"minecraft:mundane"}}]}] run say hi'
Used creative menu to put mundane potion in inventory
No output
Destory and replace redstone block
Continuous stream of output
Not sure what the important part of this setup is, just added every single thing I've down. With more testing this could probably be narrowed down.
EDIT:
Not sure anymore if same bug or different one.
More testing:
Any update to the command block wil fix this (placing block next to it, running a signal in a block next to it, placing an uppowered repeater facing a block next to it)
If the redstone block is placed after the command block is placed this bug does not occur
EDIT:
I believe now this is a different bug. Updating it after it was placed adjacent to a redstone block but before the command is entered also fixes it. Created MC-168681 for this new bug.
okay, thx for telling me
why is my bug marked as a duplicate of this, even though i reported it earlier then this?
can confirm in 51w31a
can't confirm in 51w31a
probably because they all have the same data value, and you can't put items back with the same data value. For normal items (e.g. steak), when you click twice on the icon in the creative menu, you will get 2 steak. But potions don't stack, so you can only get a stack of 1. Also, placing it on a ghast tear isn't necessary, it will work with any item with an other data value then potions have.
confirmed in 1.8.1
it also seems to get more off the further you get from 0 0
just searched a little bit, there are a lot of other issues saying command blocks doesn't place blocks right, but not about and -0 coordinate... not sure if this is than a duplicate or not...
Confirmed for 1.15.1