Skip to content

Tint for item models stops being applied during the pick-up process. #268

Description

@grian32
2026-07-21.19-35-35.mp4

In this video I have a custom grass block model

{
  "parent": "block/block",
  "display": {
    "gui": {
      "rotation": [ 30, 45, 0 ],
      "translation": [ 0, 0, 0],
      "scale":[ 0.625, 0.625, 0.625 ]
    },
    "fixed": {
      "rotation": [ 30, 45, 0 ],
      "translation": [ 0, 0, 0],
      "scale":[ 0.5, 0.5, 0.5 ]
    }
  },
  "textures": {
    "particle": "minecraft:block/grass_block_side",
    "side": "minecraft:block/grass_block_side",
    "side_overlay": "minecraft:block/grass_block_side_overlay",
    "top": "minecraft:block/grass_block_top",
    "bottom": "minecraft:block/dirt"
  },
  "elements": [
    {
      "from": [ 0, 0, 0 ],
      "to": [ 16, 16, 16 ],
      "faces": {
        "down":  { "texture": "#bottom", "cullface": "down" },
        "up":    { "texture": "#top", "cullface": "up", "tintindex": 0 },
        "north": { "texture": "#side", "cullface": "north" },
        "south": { "texture": "#side", "cullface": "south" },
        "west":  { "texture": "#side", "cullface": "west" },
        "east":  { "texture": "#side", "cullface": "east" }
      }
    },
    {
      "from": [ -0.001, 0, -0.001 ],
      "to": [ 16.001, 16, 16.001 ],
      "faces": {
        "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#side_overlay", "cullface": "north", "tintindex": 0 },
        "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#side_overlay", "cullface": "south", "tintindex": 0 },
        "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#side_overlay", "cullface": "west", "tintindex": 0 },
        "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#side_overlay", "cullface": "east", "tintindex": 0 }
      }
    }
  ]
}

along with this provider:

object ItemColorsListener {
    @EventListener
    fun register(event: ItemColorsRegisterEvent) {
        event.itemColors.register({_, tintIndex ->
            if (tintIndex == 0) 0x7CBD6B else 0xFFFFFF
        }, Block.GRASS_BLOCK)
    }
}

(kotlin but idt super relevant)
and it as far as i can tell the tint isn't applied during pickup, my item model should be more or less correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions