Falling Leaves (Fabric)

Falling Leaves (Fabric)

22M Downloads

Why is bro levitatingπŸ™πŸ™πŸ™πŸ™πŸ™πŸ™

Epik0rangutan opened this issue Β· 3 comments

commented

What's wrong with blud

commented

Bro just doesn't want to get wet!

commented

Leaf Jesus aside for a second,
the reason why the leaves don't really "fall" here is because leaves stop their vertical momentum once they collide with water and the collision check is just a rough block check:

if (world.getFluidState(BlockPos.ofFloored(x, y, z)).isIn(FluidTags.WATER)) {
// float on water
velocityY = 0.0;

I remember trying to improve the water collisions ages ago, but it was still janky because the true water collisions are boxy and not as smooth as the water model suggest. Here's a very scientific illustration of what I mean:
illustration
The leaves would "hickup" when going from one water level to a lower one.

Looks like I didn't even feel the need to keep that experimental code around.
I'll give it some more thought, maybe there's a better way of handling this.

commented

I improved the water physics a bit.
Leaves should flow on water, dip up and down a bit and ascend to the heavens when they hit a water fall from the side.

New version 1.15.5 is up!