#problem with armor datagen in 1.21.5

1 messages · Page 1 of 1 (latest)

craggy sphinx
#

here is the game interface. as you see, the trim is showing up on the model but there is a missing texture in the result slot.

craggy sphinx
#

here is an update on a failed attemp. I thought that maybe the reason was my usage of modID for the identifier at defining the key in the library, so, I changed it to this :

Identifier id = material.assetId().getValue();
String name = Registries.ITEM.getId(armor).getPath();
RegistryKey<Registry<EquipmentAsset>> equipmentAssetKey = RegistryKey.ofRegistry(Identifier.ofVanilla("equipment_asset"));
        //RegistryKey<EquipmentAsset> key = RegistryKey.of(equipmentAssetKey, BaseHelper.identifier(modID, name));
RegistryKey<EquipmentAsset> key = RegistryKey.of(equipmentAssetKey, Identifier.ofVanilla(name));
generator.registerArmor(armor, key, id, dyeable);

But it didn't solve anything and I still get the error about trim model textures are missing!

craggy sphinx
#

maybe I found something, under the generated > assets > ultraio > models > item.... opening something like armor_amethyst_boots_amethyst_trim.json we have this

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "ultraio:item/armor_amethyst_boots",
    "layer1": "ultraio:amethyst_amethyst"
  }
}

amethyst_amethyst?

craggy sphinx
#

for comparison, this is what we have in vanilla :

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecraft:item/iron_chestplate",
    "layer1": "minecraft:trims/items/chestplate_trim_amethyst"
  }
}```
#

i think the problem is here?
Identifier id = material.assetId().getValue();

this should not use the material but get the identifier of the armor itself? but then again how to convert it to chestplate alone?