mojira.dev
MC-232406

functions triggered by "load" function tag can't found any entities while the world is starting

The bug

While the world is starting, functions that are triggered by #load can't find any entities by using the target selector, this didn't happen in Minecraft 1.16.5.

How to reproduce

  1. Create a world without any other entities (because the function will print all entities' names).

  2. Install the data pack attached to this report.

  3. Run the following command to summon an armor stand tagged as "bug_reproduce.dummy" at your location:

    /summon minecraft:armor_stand ~ ~ ~ {Tags:["bug_reproduce.dummy"]}
  4. Reload data pack(s)

    /reload

    → ✔  The tagged armor stand has been killed, and the server print all entities' names.

    [14:02:27] [Server thread/INFO]: [Server] [bug_reproduce] start
    [14:02:27] [Server thread/INFO]: [Server] Found: bill96012, Armor Stand <end>
    [14:02:27] [Server thread/INFO]: [Server] killed bug_reproduce.dummy
    [14:02:27] [Server thread/INFO]: [Server] [bug_reproduce] end
  5. Summon tagged armor stand again(step 3), then quit to title.

  6. Re-enter the world.
    → ❌  The tagged armor stand is still alive, and the server didn't find any entities to print.

    [14:02:33] [Server thread/INFO]: [Server] [bug_reproduce] start
    [14:02:33] [Server thread/INFO]: [Server] Found: <end>
    [14:02:33] [Server thread/INFO]: [Server] [bug_reproduce] end

    → ✔  In Minecraft 1.16.5, it works as step 4 does.

Data pack

#minecraft:load

load.json

{
    "values":[
        "bug_reproduce:test1"
    ]
}

bug_reproduce:test1

test1.mcfunction

say [bug_reproduce] start

scoreboard objectives add test dummy

say Found: @e <end>

execute store result score #killed_dummy test run kill @e[tag=bug_reproduce.dummy]
execute if score #killed_dummy test matches 1.. run say killed bug_reproduce.dummy

say [bug_reproduce] end

Linked issues

Attachments

Comments 2

Thank you for your report!
We're tracking this issue in MC-227930, so this ticket is being resolved and linked as a duplicate.

That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

bill96012

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved