Open water nog recognized
https://preview.redd.it/bqpiufjgnacg1.png?width=1173&format=png&auto=webp&s=90f7b538b34a8cdd33f2ae7ed14d6447711e16fc
The attached screenshot displays what seems to be an open body of water when the dopper of my fishing rod is in the center. However, I am not cathing treasure loot (300+ catches). I have been trying to debug why but haven't found a reason yet. Does one of you see my mistake?
Validations i did:
\- filled everything with kelp to make sure all blocks are solid water blocks
\- the dobber is always in the center (due to a bubble column) within a 5x3x5 body of water, with only air above
The attached screenshot displays what seems to be an open body of water when the dopper of my fishing rod is in the center. However, I am not cathing treasure loot (300+ catches). I have been trying to debug why but haven't found a reason yet. Does one of you see my mistake?
Validations i did:
\- filled everything with kelp to make sure all blocks are solid water blocks
\- the dobber is always in the center (due to a bubble column) within a 5x3x5 body of water, with only air above
Commentaires
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Either remove the soul sand or put a lilypad in the middle of the pond where the bobber will float up to.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
**Details:**
**1)** The bubble column doesn't impede open-water-ness, but it is putting the bobber above the water most of the time, shifting the area it checks for open water up by 1 block and failing.
The bobber will rise to the surface by itself without the bubble column, so we don't need the soul sand when fishing from below.
We can still keep the soul sand and place the lily pad in the middle, the lily pad will keep the bobber from going above the water.
**2)** The mod's open water detection logic is slightly different from vanilla logic and it's giving false positives in this case.
Here's the mod [code](https://github.com/Wudji/XPlus-AutoFish/blob/fabric-1.21/src/main/java/troy/autofish/Autofish.java#L192-L200) where it checks 5 y layers going from -2 to +2 from the bobber's y level to see if each layers is either all water or all air (we already know about lily pad, waterlogged blocks with no collision, and bubble columns so I'll skip mentioning them from now).
So when the bobber is being pushed up too high, the mod checks 2 below and still found water.
But in the actual open water check, there are 4 y layers going from -1 to +2 from the bobber's y level to see if the bottom 2 is water and top 2 is air.
So when the bubble sends the bobber too high (the block above the water), it sees 1 deep water and 3 layers of air and failing.
**3)** We can use this rod to test:
/give @p fishing_rod[unbreakable={}, enchantments={lure:5,luck_of_the_sea:85}]
Luck of the sea 85 (or more) reduces the chance of getting fish and junk to 0, so this rod will always pull nothing if we're not in open water, and will always pull in treasure if we're in open water, so it's an accurate open-water detector.