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

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.14.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10 personal 64 bit. Java build 1.8.0_221-b11
    • Confirmation Status:
      Unconfirmed
    • Game Mode:
      Creative
    • Category:
      (Unassigned)

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: