mojira.dev
MC-124432

Some advancements do not work when specifying NBT

some advancements trigger

  • minecraft:entity_hurt_player

  • minecraft:player_hurt_entity

  • minecraft:player_killed_entity

do not work when I custom them

example,

{
    "display": {
        "title": "damage",
        "description": "",
        "icon": {
            "item": "minecraft:writable_book"
        },
        "background": "minecraft:textures/blocks/log_spruce.png",
        "frame": "task",
        "show_toast":false,
        "announce_to_chat":false,
        "hiden":false
    },
    "criteria": {
        "damage": {
            "trigger": "minecraft:player_hurt_entity",
            "conditions": {
           	  "entity": {
           	    "nbt": "{Tags:[\"enemy\"]}"
           	 }
           }
        }
    },
    "rewards": {
        "function": "test:damageenemy"
    }
}

I cannot use nbt for conditions

Linked issues

Comments 4

I'm not sure what you mean, but currently I'm facing some issues where the entity:{} part of condition{} doesn't work for some reason.

I'll go ahead and say I confirm this bug report, even though it is unclear. Essentially, entity "nbt" cannot be used for conditions currently.

For me player_hurt_entity always triggers when specifying nbt, regardless of the entity type I set.

Forward resolving to MC-125744, because it describes the underlying problem.

takumi harada

(Unassigned)

Confirmed

Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w14b, Minecraft 18w16a

Retrieved