Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-109503

Layered snow block incorrect collision / metadata match up

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.10.2
    • None
    • Unconfirmed

      The collision box for the layered snow block with 8 states has an off by 1 error. For example, if you place it with just 1 layer, you do not have any collision on it. If you place a full max amount of layers (8), you sink down 0.125.

      This is most noticeable if you put a half slab sized snow block next to the non layer-able variant of the full sized snow block, you cannot step up it.

      If this was intended behavior I figure the non layer-able variant of the snow block would also have this "sink in 0.125" behavior, but it does not.

      MCP Code snippets where the problem exists and how to fix:

      First fix:

      net.minecraft.block.BlockSnow.getCollisionBoundingBox:
      first line: int i = ((Integer)blockState.getValue(LAYERS)).intValue() - 1;
      to fix: remove the " - 1"
      to look like: int i = ((Integer)blockState.getValue(LAYERS)).intValue();

      Second fix:

      net.minecraft.block.BlockSnow.isFullyOpaque:
      the "== 7" should be "== 8"
      to look like: return ((Integer)state.getValue(LAYERS)).intValue() == 8;

            ProfMobius ProfMobius (Thomas Guimbretiere)
            corosus Kevin Gagnon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: