mojira.dev
MC-65151

Selecting entities (mobs, villagers, armor stands, etc) using @e unreliable

Summary:
When using @e selectors to target villagers, that were previously unloaded, it fails to execute and says "That entity cannot be found".
Note: Recently the same issue happened with silverfish, might be affecting all mobs (never happened with other entities though)
Note 2: Had this happen with Armor Stands as well, fairly certain that this happens with all entities
Note 3: Having two entities with the same UUID and killing one causes same behaviour

How to reproduce:
1) Spawn a couple of villagers (e.g. spawn-egg or summon command)
2) Teleport away to unload their chunk
3) Teleport back to them
4) Try targeting them with @e (e.g. /kill @e)
5) It should give the "That entity cannot be found" error for most of them

Linked issues

Attachments

Comments 10

Note: This probably relates to MC-54842 (don't know if / how i could add that myself)

It's possible this is somehow related to MC-55654

I have done a LOT of experimenting with this because it's causing me huge headaches and was originally posting under MC-73910, which may be related.

I found that when I /summon a villager, they sometimes cause all entities in the chunk to become untargetable when the chunk is unloaded. However, if I set "NoAI: 1" in the villager then the problem doesn't seem to happen.

So other entities may just become untargetable as a side effect of a villager in the same chunk. As a workaround for me, I just set all my villagers NoAI:1 and all my entities remain targetable 🙂

I had this exact issue happen in a world with no villagers at all, only armor stands (and possibly some zombies), so it doesn't seem to be caused only by villagers.

Also, the silverfish case I had myself was with silverfish that had NoAI:1 so that doesn't seem to be the cause either.

Fairly certain it is some issue with entities not being removed properly by an unloading chunk or something.

Can't confirm with your steps to reproduce, but I have had it happen to me. Seems to be pretty arbitrary when it happens or not.

I am having the same issue for targeting armor stands. This seemed to start when adding a larger quantity... as I've been using named armor stands in chunks that unload before. It was only when adding about 30+ in a single chunk that I began to notice entity cannot be found errors. Sometimes this clears up by having the chunk reload (I can leave/join and it's targetable again). This is very frustrating – is there any known workarounds?

edit: Created a video demonstrating how to reproduce the bug: https://youtu.be/qJUnypdC6qA

I'd like to mention, since I don't think anyone mentioned this already, that the entites can be targeted again just fine if you restart a server if in multiplayer, or relog from your singleplayer world if in singleplayer - this seems to make all entities affected by the bug working again with 100% reliability.

Obviously, though, having to relog out of a map or restart a server to temporarily resolve the problem (as it can happen again even shortly after a server restart/singleplayer relog) isn't an option in many cases, what's worse is there's no automated means of avoiding/fixing or even detecting that this bug has occurred

I am also having a similar issue where I'm using armor stands as a means of placeholders of where to teleport to. I have a system where activating a switch will bring me to a specific armor stand (made unique by giving it a custom name). For some armor stands, it does not matter how far away i am from it, i can put myself 1000000 blocks away and i will still be able to testfor and find it and teleport to it, but for some, once i leave render distance, i can not testfor it nor teleport/access it. The key is that it is always the same armor stands that have this issue.

i am on minecraft 1.8.8 with java 1.8 and on mac osx 10.11.1
i play on my own, localy hosted server (run off of my mac)

So I've been spending time trying to find the cause of the issue, and I mightve found something that could be useful. While i have my server open, i keep the log up that shows how fast the server is running, and Ive noticed certain places around my world where there are spikes in avg tick times...if an armor stand is in one of these "hotspots", then i cant access it. I dont know how to interpret this, but this seems to be a pretty consistent thing. Is there also a possible reason why my server has these hotspots? (i know that redstone clocks and things like that slow the server down, and although i have a bunch of them, it doesnt seem to be consistent with the hotspots.)

Also, im willing to host anyone on the server to replicate the issue and give them something to work off of.

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.

Tobias Auerochs

(Unassigned)

Community Consensus

Minecraft 14w31a, Minecraft 1.8, Minecraft 1.8.1-pre5, Minecraft 1.8.1, Minecraft 1.8.3, Minecraft 1.8.8

Retrieved