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

Unneeded faces and missing cullface in fence gate models

XMLWordPrintable

    • Confirmed
    • Textures and models
    • Low
    • Gameplay

      The resource pack attached offers a complete fix for this issue. Mojang have my full permission to (and are encouraged to) replace the affected vanilla model files with the contents of the resource pack.

      Download resource pack:

      The bug

      The closed fence gate models contain two faces which are completely impossible to see under normal circumstances. In addition, non-wall fence gates contain two faces which are also impossible to see when a block is placed directly above them - despite this, these faces do not have the "cullface" parameter attached to them. Opened fence gates also do not have a "cullface" parameter attached to the doors either, even in cases where faces of the door would be completely occluded by a solid block. (Introducing a cullface parameter to these does pose a problem, however, for hardcoded reasons which cannot be resolved through models - these are elaborated upon later into the ticket.)

      The "custom" fence gate model, used by bamboo fence gates, does not have the two inner faces when closed. However, the top faces for non-wall custom fence gates are still not culled.

      How to reproduce

      1. Place down a fence gate in the open
      2. Enter Spectator mode
      3. Fly into the fence gate
        1. Note the presence of two planes in the very middle of the fence gate which can only be seen in Spectator due to being completely internal
      4. Now place a block above the fence gate and fly into it in Spectator
        1. Note that the top faces of the two posts are still visible, despite being occluded - face culling would be expected here
      5. Now open the fence gate and place a block directly against the side of one of the doors, then fly into this block
        1. Note that these faces of the door are not all culled either

      Expected results

      The two inner planes would not exist on closed gates, and occluded planes would be culled.

      Actual results

      The two inner planes still exist and are rendered, as are occluded planes.

      How to fix

      Two resource packs are attached to fix this issue. The "full" version fixes the internal planes and both the top and side culling issues. The "safe" version fixes the internal planes and top culling issue, but leaves the sides of doors untouched. Due to reasons outwith the control of a resource pack, fixing the side face culling also causes the faces to be culled against other fence gates, as well as against walls, which is undesirable. The safe version therefore does not include the side fix, and is the fix that can be used to mostly fix this issue without undesirable side effects, but it may be worth looking into whatever causes this excess culling problem anyway.

      The resource packs attached also clean up the model files for consistency and readability, reducing their file size compared to their current versions.

        1. gate-fix-full-21w40a-v1.0.zip
          3 kB
        2. gate-fix-safe-21w40a-v1.0.zip
          3 kB
        3. 2021-10-10_18.58.27.png
          2021-10-10_18.58.27.png
          36 kB
        4. 2021-10-10_18.57.55.png
          2021-10-10_18.57.55.png
          129 kB
        5. 2021-10-10_18.58.02.png
          2021-10-10_18.58.02.png
          63 kB
        6. 2021-10-10_18.58.25.png
          2021-10-10_18.58.25.png
          68 kB
        7. 2021-10-10_18.58.19.png
          2021-10-10_18.58.19.png
          109 kB
        8. 2021-10-10_18.58.35.png
          2021-10-10_18.58.35.png
          93 kB
        9. 2021-10-10_18.58.08.png
          2021-10-10_18.58.08.png
          192 kB
        10. 2021-10-10_18.57.59.png
          2021-10-10_18.57.59.png
          178 kB
        11. gate-fix-safe-1.20pre1-v1.1.zip
          5 kB

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            10 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: