mojira.dev
MC-269745

Advancements' conditions.location unable to parse nbt.CustomName with translate or english characters field correctly

The function(kaleidos:behave/barrel_full/place/place):
say 1

The advancement:
{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:placed_block",
      "conditions": {
        "location": [
          {
            "condition": "minecraft:location_check",
            "predicate": {
              "block": {
                "blocks": "minecraft:barrel",
                "nbt": "{CustomName:'

{\"translate\": \"item.kaleidos.base.container.barrel_half\",\"italic\":false}

'}"
              }
            }
          }
        ]
      }
    }
  },
  "rewards":

{     "function": "kaleidos:behave/barrel_full/place/place"   }

}

The gamescreen(function did NOT work)

[media]

The other advancement (Use OtherNations'Charactor as CustomName):
**
{
  "parent":"kaleidos:interactions",
  "criteria": {
    "requirement": {
      "trigger": "minecraft:placed_block",
      "conditions": {
        "location": [
          {
            "condition": "minecraft:location_check",
            "predicate": {
              "block": {
                "blocks": "minecraft:barrel",
                "nbt": "{CustomName:'

{\"text\":\"木盆\",\"italic\":false}

'}"
              }
            }
          }
        ]
      }
    }
  },
  "rewards":

{     "function": "kaleidos:behave/barrel_full/place/place"   }

}
The gamescreen(function worked)

[media]

 

 
 
 
 
 
 

Attachments

Comments 3

Please attach a minimal setup datapack to reproduce this.

Tested as an issue after the archive was upgraded to a snapshot version, and did not reappear with the same datapack in a newly created world

 
 

You have a space after the colon in translate that's breaking the check

Zai_yu_you

(Unassigned)

Unconfirmed

(Unassigned)

24w12a

Retrieved