Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-271030

Predicates require both pattern and material for trim component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.20.5 Release Candidate 2
    • None
    • Unconfirmed
    • Creative
    • Data Packs

      Using only a pattern or a material for the trim item component in a predicate returns No key pattern in MapLike or more specifically:

      [00:19:39] [Worker-Main-58/ERROR]: Couldn't parse element predicates:spells:boots/trim_material_diamond - Not a json array: {"condition":"minecraft:entity_properties","entity":"this","predicate":{"equipment":{"feet":{"components":{"minecraft:trim":{"material":"minecraft:diamond"}}}}}}; No key pattern in MapLike[{"material":"minecraft:diamond"}] missed input: {"minecraft:trim":{"material":"minecraft:diamond"}}

       

      While trims can only occur as a pattern + material, testing for only one of these is totally valid. For now I had to fallback to matching nbt in a target selector to archive this.
      Ideally there would be a way to check pattern and material of the trim item component independently via predicates.

            Unassigned Unassigned
            40_2 40_2
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: