Skip to content

[BUG] Fallback models in the items/ directory are using absolute paths instead of relative. #256

@AdmiralSky

Description

@AdmiralSky

Thank you for creating such a wonderful tool.
I'm using CustomModelData, but is it impossible to convert packs that contain it?

For example, when converting iron_ingot.json, it ends up as a file containing a local path.
As a result, buggy textures are displayed.

I've heard that handling around this area has changed significantly in recent Minecraft versions.

iron_ingot.json(before 1.19.2)

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecraft:item/iron_ingot"
  },

  "overrides": [
    {"predicate": {"custom_model_data":1}, "model": "minecraft:item/las/meteorite"},
    {"predicate": {"custom_model_data":10}, "model": "minecraft:item/las/i030902-krowphone"}
  ]
}

iron_ingot.json(after 1.21.8)

{
  "model": {
    "type": "range_dispatch",
    "property": "custom_model_data",
    "fallback": {
      "type": "model",
      "model": "C:\\Users\\Sky_1\\Downloads\\rp\\.\\LASPack_R071030a_converted\\assets\\minecraft\\models\\item\\iron_ingot"
    },
    "entries": [
      {
        "threshold": 1,
        "model": {
          "model": "minecraft:item/las/meteorite",
          "type": "model"
        }
      },
      {
        "threshold": 10,
        "model": {
          "model": "minecraft:item/las/i030902-krowphone",
          "type": "model"
        }
      }
    ]
  }
}

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions