mojira.dev
MC-2813

Snow doesn't form / cannot be placed on upside down slabs / stairs

When you have an upside down slab and it is snowing in the game, the snow will land on whole blocks but not upside down slabs. I believe that this is a bug because you can place red stone, torches, and other things on slabs, but snow doesn't fall on them.

Related issues

Attachments

Comments

migrated
[media][media][media]
Anon Ymus

This is most likely because half-slabs are transparent. You will notice that snow also does not show up on glass, etc. Does this bug apply to double half-slabs?

kumasasa

Confirmed.
On all double slabs snow does form.

Kimitsu Desu

Nor can you place the new snow blocks on these, as of 13w05b

Pete Frisky

Seeing as redstone and rails can be placed on top slabs and upside down stairs this is more a bug than an unimplemented feature.

bugi74

Fix
Pretty much a rewrite (at least when compared to MCP version).

BlockSnow

public boolean canPlaceBlockAt(World world, int x, int y, int z) {
        int blockId = world.getBlockId(x, y - 1, z);
        if (blockId == 0)
            return false;
        if (blockId == Block.glass.blockID || blockId == Block.leaves.blockID)
            return true;
        if (Block.blocksList[blockId].isOpaqueCube()) {
            if (world.getBlockMaterial(x, y - 1, z).blocksMovement())
                return true;
        }
        // Check the top surface more accurately, the fix for halfslabs:
        if (world.doesBlockHaveSolidTopSurface(x, y-1, z))
            return true;
        
        return false;
    }

And then remove some unnecessary checks in World:

World.canSnowAt()

...
                int blockIdUnder = this.getBlockId(x, y - 1, z);
                int blockIdOver = this.getBlockId(x, y, z);
                if (blockIdUnder != 0 && blockIdOver == 0
                        && Block.snow.canPlaceBlockAt(this, x, y, z)
                        /*&& blockIdUnder != Block.ice.blockID && Block.blocksList[blockIdUnder].blockMaterial.blocksMovement()*/) {
                    return true;
                }
            ...

Note, added the glass block separately. Does not make sense to allow snow on top of leaves (pretty non-solid stuff), but disallow it on top of smooth solid chunk of glass, especially when torches have similar special check. Easy to remove if really not intended. Also, moved the leaves check to that simpler 'if', as it does not need to check for blocksMovement, at least for now.

I would have added ice, too, but noticed the specific disallowing in the current World.canSnotAt() method. Though I wonder why so, and wonder why the check was there and not in the method in BlockSnow.)

Changes tested on 1.4.7. Adding screenshot 'fixed_snow.png' to show results. Snow near the torches (except on furnace blocks) is hand placed, while the snow nearer has rained on the blocks.

Bud Gillett

In orger for this to generate, especially for regularly placed stairs, they would need to add "sub-blocks" in order to create the look of snow laying on the stair or on the regularly placed slab. This could cause crashing and lag.

bugi74

A) This is issue is not about regularly places stairs (or slabs) (they are in the screenshots just for completeness/comparison).
B) To support regularly placed stairs or slabs, full support for sub-blocks is not needed - there are easier solutions, already used for e.g. raindrop splashes (although bit crudely) and aiming/shooting through the empty parts of stair blocks etc.
C) Even if sub-blocks would be used for B, it would not cause crashing and lag - crashing and lag is caused by bugs and poor design/implementation, respectively.

kumasasa

Please do not mark unreleased versions as affected. You do not have access to this yet.

Itouch2

Confirmed for 08a

Itouch2

Confirmed for 10c

Itouch2

Confirmed for 14w11b

Itouch2

Confirmed for 14w17a

Itouch2

Confirmed for 14w25b.

ggxl

I also noticed that if you have one type of slab and try to place another (of a different type) on top, it behave differently than if you were placing the same type. It behaves as if the slab is a full block.

It would look strange if snow was hovering a half block above the ground, so it was probably disabled.

I think that the game can't store 2 separate partial blocks in one block of space

Torabi

That is correct. A slab takes up a full block, even though it visually only occupies have the block. They've added special blocks to allow you to stack two identical slabs in the same block, but it's not possible to mix them because of how blocks are stored. It would be too many possible combinations for the 4-bit metadata each block is allowed.

However, an "upside-down" slab occupies the top half of a block space, so it should be possible for snow to form or be placed on top of it, without it floating.

Hitohora

Confirmed for MC 14w28b.

KingSupernova

Also occurs with hoppers.

marcono1234

Confirmed for

  • 1.8.6

Also for

  • Slimeblock

  • Packed Ice

branza

The packed ice might be intended to be consistent with normal ice.

Samuel Shank

Confirmed for 15w43a

Erik Broes

Barriers is Working as Intended. Removed from the ticket title.

marcono1234

The screenshot from the fix provided by @unknown might be a little bit irritating

bugi74

Marcono1234, please explain... Irritating? It has been there for years now, and I fail to find anything irritating in it, except the obnoxious falling snow disturbing the view... (Btw, I can not make a new screenshot of the fixed state; all my old various fixed MC versions I made back then are long gone now.)

marcono1234

What I meant was that having a screenshot of the fixed situation might make people think that it is fixed already. But it is probably not such a big deal

user-f2760

How do you know it affects 16w15b? You can't download it yet, it's in the process of being uploaded. (Neither client nor server are downloadable ATM.)

Edit: It can now.

nogluten

migrated

Confirmed

placement, slab, snow

Minecraft 1.4.2, Minecraft 1.4.4, Minecraft 1.4.5, Minecraft 1.4.6, Minecraft 1.4.7, ..., Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w14a

Minecraft 17w15a

Retrieved