Rain Ripples on Undergound Water
SurealSulwyn opened this issue · 6 comments
Installation:
- Minecraft: v1.19.2
- Fabric Loader: v0.14.9
- Effective: v1.3
- Fabric API: v0.60.0+1.19.2
- Mod Menu: v4.0.6
Expected Behaviour:
- Rain ripples appear on source water that has sky access when it is raining
Actual Behaviour:
- Rain ripples appear on all source water when it is raining, even underground water with no sky access
Can confirm, it is caused by WaterFluidMixin.shouldRippile
.
Using World#hasRain(BlockPos)
instead of World#isRaining() && BlockState#isAir()
on line 40 would fix this issue.
Thanks for the fix @lonefelidae16, didn't even know that method was a thing! Appreciate it a lot <3
After giving it a try, it seems hasRain doesn't work on the client, as isSkyVisible always returns false on the client for some reason
Thank you for trying my patch!
After giving it a try, it seems hasRain doesn't work on the client, as isSkyVisible always returns false on the client for some reason
I wonder why. I installed and tried Quilt immediately and it worked fine.
My WaterFluidMixin.java is:
@Unique
private static boolean shouldRipple(World world, BlockPos pos) {
if (EffectiveConfig.rainRippleDensity > 0) {
FluidState fluidState = world.getFluidState(pos);
- return fluidState.isSource() && world.isRaining() && world.getBlockState(pos.add(0, 1, 0)).isAir();
+ return fluidState.isSource() && world.hasRain(pos.up());
}
return false;
}
It is important to note that it must to be specified the position of the Y-axis +1 to work, rather than entering pos
directly.