[MC-8858] Rain goes through upside-down stairs Created: 31/Jan/13  Updated: 28/Oct/15  Resolved: 07/Jul/14

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.7, Snapshot 13w05a, Snapshot 13w09c, Snapshot 13w23b, Snapshot 13w24a, Snapshot 13w24b, Snapshot 13w25a, Minecraft 1.7.4, Minecraft 14w08a
Fix Version/s: Minecraft 14w28a

Type: Bug
Reporter: Chris Assignee: Mog (Ryan Holtz)
Resolution: Fixed Votes: 8
Labels: rain, stairs, upside-down, water
Environment:

Windows 8 64-bit, Java 7


Attachments: PNG File 2013-01-31_17.01.31.png     PNG File 2013-01-31_17.10.35.png     PNG File 2013-02-04_19.46.20.png     PNG File 2013-02-04_19.46.56.png     PNG File 2013-06-17_15.04.20.png     PNG File testing_rain_particles.png     PNG File with_particles.png     PNG File without_particles.png    
Issue Links:
Duplicate
is duplicated by MC-18291 Rain leaks through stairs Resolved
is duplicated by MC-52835 Rain Keeps Falling Through The Wooden... Resolved
Relates
relates to MC-1390 Upper slabs with water/lava on top ma... Resolved
relates to MC-9186 Water does not leak through leaves an... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

Rain will fall through upside-down stairs when they are placed with no blocks above them. Screenshots aren't as good as I was hoping, but I think the gist of the issue is there. Small graphical bug otherwise.



 Comments   
Comment by Shannon Brogan [ 28/Oct/15 ]

Hate the new update where rain leaks through glass blocks and stone blocks. In real life, these materials would be mortared together and would not leak. Why would you make these materials leak in your game? It really puts a damper (pun intended) on architecture in Minecraft. Now, roofs and things look clunky, Please walk this "update" back a little.

Comment by Tim Gunderson [ 18/Jun/13 ]

I'm seeing this issue in 13w25a.

I noticed that the actual rain from the sky isn't falling through and it doesn't look the same as water dripping from the underside of a block.

It appears to be:
rain falls on the blocks adjacent to the upside down stair
droplet bounces
bounced droplets that splash to the stair block pass through the stair.

Possibly all that code above describes the issue as accurately, but hopefully this plain language helps straighten it in the non-coders' minds.

Comment by Markku [ 02/Mar/13 ]

Affects 13w09c. and 1.4.7.

Comment by Markku [ 02/Mar/13 ]

Testing
The rain particles have even more issues with top-half slabs and upside down stairs. I traced the reason for the particular case described in this issue, but when testing it on 13w09c (though probably same thing on 1.4.7), I noticed that there are even deeper issues.

I attached a screenshot showing my test setup ('testing_rain_particles.png'). When moving (move or turn) the reticle so it points on any of the stone slabs, the rain particles stop showing over all stone slabs (both left and right). And when moving the reticle over any of the stairs, the rain particles do not show over all of the stairs. (Though, there can be rarely a random one over the blocks not showing particles..) Correspondingly, if looking below the stairs, when reticle hits a stair block, the particles can be seen below the stairs, but once the reticle points to something else, no more "leaking" particles.

See the two other example screenshots ('with_particles.png' and 'without_particles.png') for comparison, and note the reticle aiming point.

Reason
A bit of related code:

EntityRenderer.addRainParticles()
    ...
    this.mc.effectRenderer.addEffect(
        new EntityRainFX(var3,
            (double) ((float) var17 + var22),
            (double) ((float) rainFloor + 0.1F) - Block.blocksList[blockId].getBlockBoundsMinY(),
            (double) ((float) var18 + var23)));
    ...

That getBlockBoundsMinY changes depending on whether the block type is "aimed" or not. This seems to be caused by a bit bad design of reusing those bounds to multiple purposes. Various pieces of code that use the method are supposed to ensure the representative block object has its bounds set to whatever purpose the caller needs. Apparently, in this case the bounds are still set up for something else than what is needed for calculating the rain hit level. (No need to say that this completely prevents multi-threading, too.)

Possible fix

    Block block = Block.blocksList[blockId]; // ADDED (optimization)
    block.setBlockBoundsBasedOnState(var3, var17, rainFloor - 1, var18); // ADDED (fix)
    if (this.random.nextInt(var14) == 0) {
        xForSound = (double) ((float) var17 + var22);
        //yForSound = (double) ((float) rainFloor + 0.1F) - block.getBlockBoundsMinY();
        yForSound = (double) ((float) rainFloor + 0.1F) + block.getBlockBoundsMaxY() - 1; // FIX
        zForSound = (double) ((float) var18 + var23);
    }

    this.mc.effectRenderer.addEffect(
        new EntityRainFX(var3,
            (double) ((float) var17 + var22),
            //(double) ((float) rainFloor + 0.1F) - block.getBlockBoundsMinY(),
            (double) ((float) rainFloor + 0.1F) + block.getBlockBoundsMaxY() - 1, // FIX
            (double) ((float) var18 + var23)));

Basically, added the bounds setup before using them, and also fixed the way it calculates the height (it is the top of the block that defines where the rain drops appear, not the bottom). There is one more spot to fix the same, nearby before, for lava + rain effect (smoke).

Tested on 1.4.7 and seems to fix things. However, I didn't test extensively with other blocks; some new issues may appear.

Comment by Kumasasa [ 04/Feb/13 ]

Made some coparison glass to upside down stairs to leaves.
In the hollow part of the upside down stairs the rain particles can be seen as through glass blocks. Leaves in fact drip very slowly.

So the summary of the ticket may be Rain particles are visible through upside-down stairs

Comment by Kumasasa [ 04/Feb/13 ]

Reopened.

Comment by Simons Mith [ 04/Feb/13 ]

The animation for rain leaking through upside-down stairs and rain dripping through leaves is different. The stairs actually look leakier IMO. Something is wrong. Please reopen.

In addition, water (still or running) does NOT drip through anything other than upside-down stairs. I have a test building with normal stairs, upside down stairs, glass blocks, and leaves, and with spring blocks above each. Only the upside-down stairs leak at all! Mac Os 10.5.8. I've reported that separately as MC-9186

Comment by kbk [ 04/Feb/13 ]

I don't think this being marked as WAI is a good decision either.
In this case stairs do not generate driples but just look penetrable by rain. Penetration stops at lower third level of the block, where raindrops just dissappear. Such penetration also does not occur with upper slabs, fences, closed fence gates and even leaves albeit they all are transparent. Moreover leaves do generate dripples but are not penetrable by raindrops.

Comment by Sealbudsman [ 04/Feb/13 ]

Simon, are you sure there is no still or running water above those upside-down stairs? Those blocks drip when water is directly above, though I could not reproduce it with rain.

Comment by Simons Mith [ 04/Feb/13 ]

Stairs are not leaves. Also, glass is transparent, and <s>water</s> - correction, rain - does not drip through glass. So there's an inconsistency in Kumasasa's explanation, so I don't think closing as 'Works as Intended' is appropriate.

Comment by Kumasasa [ 31/Jan/13 ]

http://www.minecraftwiki.net/wiki/Version_history/Development_versions#12w22a Rain will slowly drip through leaves.

Comment by Anon Ymus [ 31/Jan/13 ]

I thought they went through all blocks, but whatever.

Comment by Kumasasa [ 31/Jan/13 ]

That's intended.
Rain goes through transparent blocks (Leaves) and stairs are transparent.

Comment by Chris [ 31/Jan/13 ]

Appears to be the rain droplets.

Comment by Anon Ymus [ 31/Jan/13 ]

Is this actual rain or the rain droplets that drip from blocks?

Generated at Sun Jan 12 12:19:10 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.