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

Horse Age=0 when function run as reward for trigger minecraft:bred_animals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.14.4
    • None
    • Windows 10 personal 64 bit. Java build 1.8.0_221-b11
    • Unconfirmed
    • Creative
    • (Unassigned)

      This bug is easier to describe by replicating.

      First create a function for a datapack:

      [code]

      tag @e[type=horse, limit=3,sort=nearest] add nearest
      execute as @e[tag=nearest] run tellraw @a {"text":"name: ","extra":[

      {"color":"blue","nbt":"CustomName", "entity":"@s"}

      ]}
      execute as @e[tag=nearest] run tellraw @a {"text":"age: ","extra":[

      {"color":"blue","nbt":"Age", "entity":"@s"}

      ]}
      tag @e remove nearest

      [/code]

      note, the tags and first "execute" line were just used to make sure the target selector wasn't acting up

      add the function in the rewards for an advancement with a trigger minecraft:bred_animals

      when you manually run the function it properly reports the names and ages of the 3 nearest animals but when you breed 2 horses, it properly displays the names of the 3 nearest horses (the function is being called and has properly selected/tagged the three nearest horses) but the ages are all 0.

            Unassigned Unassigned
            drkreeper Colin Andrews
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: