mojira.dev
MC-81834

"shade" tag does not work for item models

In custom resource packs, the "shade" tag does not work when used in an item model. This means that if a block is put on the head of the armor stand and rotated around it will change color quite drastically.

Example item model that attempts to use "shade": false:

{
    "textures": {
        "Black": "blocks/black",
        "Red": "blocks/red",
        "RedEdge": "blocks/red_edge",
        "White": "blocks/white",
        "WhiteEdge": "blocks/white_edge",
        "Green": "blocks/green",
        "GreenEdge": "blocks/green_edge"
    },
    "elements": [
        {
            "from": [16,12,16],
            "to": [31,27,31],
            "shade": false,
            "faces": {
                "up": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                },
                "down": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                },
                "west": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                },
                "east": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                },
                "north": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                },
                "south": {
                    "uv": [1,1,1,1],
                    "texture": "#Black"
                }
            }
        },
        {
            "from": [16,12,32],
            "to": [30,26,31],
            "shade": false,
            "faces": {
                "up": {
                    "uv": [1,1,1,1],
                    "texture": "#Red"
                },
                "down": {
                    "uv": [1,1,1,1],
                    "texture": "#RedEdge"
                },
                "west": {
                    "uv": [1,1,1,1],
                    "texture": "#Red"
                },
                "east": {
                    "uv": [1,1,1,1],
                    "texture": "#Red"
                },
                "north": {
                    "uv": [1,1,1,1],
                    "texture": "#Red"
                }
            }
        },
        {
            "from": [31,12,16],
            "to": [32,26,30],
            "shade": false,
            "faces": {
                "up": {
                    "uv": [1,1,1,1],
                    "texture": "#WhiteEdge"
                },
                "down": {
                    "uv": [1,1,1,1],
                    "texture": "#White"
                },
                "east": {
                    "uv": [1,1,1,1],
                    "texture": "#White"
                },
                "north": {
                    "uv": [1,1,1,1],
                    "texture": "#White"
                },
                "south": {
                    "uv": [1,1,1,1],
                    "texture": "#White"
                }
            }
        },
        {
            "from": [16,27,16],
            "to": [30,28,30],
            "shade": false,
            "faces": {
                "up": {
                    "uv": [1,1,1,1],
                    "texture": "#Green"
                },
                "west": {
                    "uv": [1,1,1,1],
                    "texture": "#Green"
                },
                "east": {
                    "uv": [1,1,1,1],
                    "texture": "#Green"
                },
                "north": {
                    "uv": [1,1,1,1],
                    "texture": "#Green"
                },
                "south": {
                    "uv": [1,1,1,1],
                    "texture": "#Green"
                }
            }
        }
    ],
    "display": {
        "head": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0, 0, 0 ],
            "scale": [ 1.603, 1.603, 1.603 ]
        },
        "gui": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0, 1, -16 ],
            "scale": [ 1, 1, 1 ]
        }
    }
}

Linked issues

Attachments

Comments 8

marcono1234

I haven't tested it yet, but for the formatting, code starts with {code} and ends with this tag again. There is no slash needed.

Edit: Could you please add a resource pack with this properties?

Christie N

Confirmed in 1.8.7. This is present in the GUI and item frames as well as in entity form.

magib1

As requested, added a resource pack implementing the example item model code for the white wool block. Note that this was zipped on a mac, so there may be some extra (unnecessary) files in the zip.

insomniac_lemon

Related issue to this (the reason the OP wanted to remove the shading from models at all) is because the non-world form (item frames and armor stands, mainly) are shaded ONCE and then their shading rotates with them.

Item frame items should re-shade when you rotate them, and armor stand items should AT LEAST shade to the orientation of the armor stand when it was summoned/placed (like OP's case, north vs. south or up vs. down should not be so drastic).

And example of this happening already? Random rotations on world blocks (which are shaded AFTER rotations). If the shading was carried over there, the NTM-like pattern-breaking rotations wouldn't work because it would make tiles randomly brighter or darker because of the top face being used on the south or the north face being used on the west, etc.

magib1

Possibly related to MC-72866

KnightMiner

Definitely related to MC-72866, as the shading hardcoding affects both disabling it in resource packs and its usage out of item frames.

magib1

Added an image to highlight why "shade": false not working for item models is a problem.
Left ArmorStand rotation: Head:[0f,0f,0f]
Right ArmorStand rotation: Head:[30f,0f,0f]

magib1

Updated the attached resource pack to a 1.9-compatible pack. To put the item model on the head of an armor stand use:

/replaceitem entity @e[type=ArmorStand,c=1] slot.armor.head golden_hoe 1

magib1

(Unassigned)

Community Consensus

rendering, texture

Minecraft 1.8.7, Minecraft 15w31b, Minecraft 15w31c, Minecraft 15w32a, Minecraft 15w32c, ..., Minecraft 15w36c, Minecraft 15w36d, Minecraft 15w37a, Minecraft 15w38a, Minecraft 15w38b

Retrieved