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

["shade": false] is ignored by items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.18.2 Pre-release 2, 1.18.2
    • Confirmed
    • (Unassigned)

      Since these are their own set of issues which are related to item model rendering rather than block and entity rendering, these are being given a separate ticket from MC-248703.

      I later discovered this had been reported already in MC-81834, a ticket which has been resolved as "Works as Intended"; this resolution, however, occurred in mid-2015, which is six and a half years ago. Many very major changes have been made to rendering since then, particularly in 1.15; as such, I'd prefer it if this weren't considered a duplicate as the validity of the core issue may very well differ from what it was then (and this ticket is also more in-depth due to covering each distinct case). Resolving that ticket forwards into this ticket instead as a duplicate would be preferable. If this cannot be done, I'd at least appreciate it if the older ticket was sent in for review instead.

      The bug

      Models can have ambient occlusion and/or shading explicitly disabled in their model files. This works almost everywhere where the model is used for a placed block, however ultimately fails completely for items, introducing undesirable shading.

      How to reproduce

      A resource pack is attached to this ticket which replaces glowstone and sea lanterns with dedicated models composed of six intersecting planes. Ambient occlusion is turned off for each model, and shading is disabled for each element; as such, they appear identical when placed. The only difference between the two models is that glowstone has gui lighting set to "side", whereas the sea lantern has it set to "front"; they are identical everywhere else.

      Glowstone and sea lanterns were picked specifically due to MC-50734, such that even if the disabling of ambient occlusion were to not work due to some other bug, they'd still inherently be subject to it anyway.

      Current latest resource pack version: item-shading-test-1.18.2-v1.1.zip


      As this issue manifests in multiple places due to different items, reproduction steps for each of these will be summarized:

      Control group: placed blocks, to demonstrate expected appearence

      UI items: simply view the two items from within the inventory

      Held items in first person: hold glowstone in one hand and a sea lantern in the other hand in first person

      Held items in third person: repeat the above, but enter third person mode

      Dropped items: simply throw one of each on the ground

      Framed items: place one of each in an item frame, optionally repeat for glow item frames

      Worn on head: spawn two zombies, name one G and the other S, and use the following two commands:

      1. /item replace entity @e[type=minecraft:zombie,name=G] armor.head with minecraft:glowstone
      2. /item replace entity @e[type=minecraft:zombie,name=S] armor.head with minecraft:sea_lantern

      Projectiles: create a series of upwards bubble columns, and throw an ender pearl such that it remains suspended by them for easy observation

      Expected results

      The glowstone and sea lantern models would appear fully bright in all of these contexts in the same way they appear when placed.

      Actual results

      The models are shaded, with the different shadings accentuated by intersections between the planes.

      How to fix

      Item models should recognize the "shade" parameter in item models and respect it, preventing said element from receiving shade.

      Additionally (or alternatively), the "gui_light" parameter could accept a third parameter, "none", which would completely prevent any shading from being applied to the model as an inventory item. This could fix MC-213446, although only if it only affects inventory items; it may pose undesirable for dropped items.

        1. 2022-02-22_21.14.50.png
          2022-02-22_21.14.50.png
          287 kB
        2. 2022-02-22_21.15.08.png
          2022-02-22_21.15.08.png
          288 kB
        3. 2022-02-22_21.15.19.png
          2022-02-22_21.15.19.png
          513 kB
        4. 2022-02-22_21.16.04.png
          2022-02-22_21.16.04.png
          261 kB
        5. 2022-02-22_21.16.24.png
          2022-02-22_21.16.24.png
          243 kB
        6. 2022-02-22_21.19.41.png
          2022-02-22_21.19.41.png
          392 kB
        7. 2022-02-22_21.37.11.png
          2022-02-22_21.37.11.png
          256 kB
        8. 2022-03-10_10.43.26.png
          2022-03-10_10.43.26.png
          655 kB
        9. 2022-03-10_10.43.30.png
          2022-03-10_10.43.30.png
          497 kB
        10. item-shading-test-1.18.2-pre3-v1.0.zip
          2 kB
        11. item-shading-test-1.18.2-v1.1.zip
          3 kB

            Unassigned Unassigned
            Awesoman3000 Connor Steppie
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: