ItemMeta#setItemModel Does Not Update Armor Textures

    • Type: Bug
    • Resolution: Invalid
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Java 21; Base spigot-1.21.4.jar from BuildTools

    • 4457-Spigot-73860e0-f0c8dd3
    • Yes

      When using ItemMeta#setItemModel, it only updates the item's textures and not the armor's textures (if it is armor).

       

      For example:

      public ItemStack getBaseItem() {
          ItemStack item = new ItemStack(Material.DIAMOND_HELMET);
          ItemMeta meta = item.getItemMeta();
          assert meta != null;
          meta.setItemModel(new NamespacedKey("oni", "oni_1_mask"));
          meta.setUnbreakable(true);
          item.setItemMeta(meta);
          return item;
      } 

      results in the item being retextured, but not the armor when worn.

       

      However, running this command: 

      /minecraft:give @s diamond_helmet[item_model="oni:oni_1_helmet",minecraft:equippable={slot:"head"}] 

      does retexture both the item and the helmet.

       

      I should expect ItemMeta#setItemModel to perform the same thing. I have attached screenshots of both scenarios.

            Assignee:
            Unassigned
            Reporter:
            Austin Dart
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: