Minecraftforge: [1.13] Specific y-levels in water behaves like you're in air.

Created on 11 Jan 2019  路  5Comments  路  Source: MinecraftForge/MinecraftForge

When being in water with a y-level of x.37847 or similar where your eye level is above the surface of water, the game treats it like you're in air. Instead of water behaving as a full block when water is above it, it always behaves as a surface source block. The behavior is similar to the screenshot shown, but pretend the end portal frames are water sources with air gaps.

2019-01-10_23 01 07

1.13 Bug

All 5 comments

could you check if the problem happens in vanilla?

Already tested. This same bug occurs in one of the 1.13 snapshots, but not the full release.

Alright, this is a stupid one. This DOES happen in vanilla just very rarely.
Vanilla uses the formula: eyes < (double)(pos.getY() + state.getHeight() + 0.11111111F);
Forge uses the formula: eyes < (double)(pos.getY() + state.getHeight() + 0.1F);
Spot the difference.

getHeight() is level / 9.0f which is odd considering the max a fluid can be is 8, so 8/9 = 0.88888888F
Which is why they add the stupid number 0.11111111F, turns that into 0.99999999F. And considering vanilla uses double for positions, TECHNICALLY this can occure for 0.99999999F < Y < 1.0D

Forge's side just expands the issue because I used 0.1F, instead of 0.11111111F.

Actually, 8.0F/9.0F + 0.11111111F == 1.0, so this is not an issue in vanilla at all. More specifically, there is no 0.99999999F. When you try to get such float, you get 1.0F

That is not held out in the actual code. As I stepped through it and verified it myself before posting/pushing the fix. Unless my IDE suddenly decided to start lying to me about the value of variables. But thanks anyways.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaedalusGame picture DaedalusGame  路  3Comments

MSandro picture MSandro  路  3Comments

bs2609 picture bs2609  路  3Comments

williewillus picture williewillus  路  3Comments

juliand665 picture juliand665  路  3Comments