I have a realm that my sons and their friends play on. I sometimes go into spectator mode to monitor what the kids are doing, to make sure there's no griefing. Just recently, I think I accidentally killed someone from spectator mode.
I have two bases. At one, I have a bunch of tamed wolves. Usually, I've left them sitting, but yesterday I wanted to bring a few over to my other base. So I "unsat" them, jumped into a boat, and went off to my second base. None of the dogs showed up at my second base. I figured they had drowned. Sad.
So, a day or so later, I'm messing around at my second base, and suddenly my dogs pop up around me. Oh, well that teleport took a long time :-) I let the dogs roam around with me.
A little while later, I thought I'd spectate over another player just to monitor his actions for a few minutes, just to make sure he's not doing mischief. I go into spectator mode and tp over to him. I hover high above him as he is roaming around my other base. He's doing nothing wrong, and as night falls, he runs outside the safety of the base walls and starts picking fights with zombies. The fighting goes sour for him, and he retreats into a small house outside the base walls for safety. I fly down to inside the house with him. He can't see me, of course, but I see him just jumping around and swinging his sword at nothing, wasting time till morning.
Then I notice a couple of wolves in the house with him. He has wolves? I hadn't noticed them before this moment. I fly back up above the house and look around. Then the other player is killed by the wolves. Wha? I fly back down inside the house. Sure enough, all his stuff is lying on the floor among the two wolves. The player rage quits, leaving all his stuff. (He's 10 years old. Sometimes they do things like that.)
Well I continue to fly around the area a bit and I notice the wolves outside the house. Now how did they get outside? Then a thought hit me: are these my wolves? So I test by flying low to the ground, (still in spectator), and sure enough, the wolves follow me.
OK, so now I feel really bad. I change to creative mode, collect all his dropped stuff and place it in a chest in the house.
I thought spectator mode had absolutely no affect on anything. But apparently tamed wolves will still follow you, and if they are struck by another player, they will fight back.
Surely I'm not the first to discover this, but now I wonder what other quirks of spectator mode do I need to be mindful of while monitoring my realm?
So, a day or so later, I'm messing around at my second base, and suddenly my dogs pop up around me. Oh, well that teleport took a long time :-) I let the dogs roam around with me.
My guess would be that you got far enough away from the wolves while boating (since they can't teleport when there's no nearby ground) that the chunks they were in was unloaded. Then later someone else wandered close enough to load those chunks again, so they teleported to you then.
Interesting. I don't know if this is an issue that can easily be solved. I guess it's best to sit all you animals before going into Spectator from now on.
Code-wise, it should be solvable easily enough. I'd personally probably make the "get owner entity" method (func_180492_cm() in MCP v9.10) return null if the found entity is in spectator mode, which if I understand things right should make the AI and everything else act just like the owner is offline.
I have a realm that my sons and their friends play on. I sometimes go into spectator mode to monitor what the kids are doing, to make sure there's no griefing. Just recently, I think I accidentally killed someone from spectator mode.
I have two bases. At one, I have a bunch of tamed wolves. Usually, I've left them sitting, but yesterday I wanted to bring a few over to my other base. So I "unsat" them, jumped into a boat, and went off to my second base. None of the dogs showed up at my second base. I figured they had drowned. Sad.
So, a day or so later, I'm messing around at my second base, and suddenly my dogs pop up around me. Oh, well that teleport took a long time :-) I let the dogs roam around with me.
A little while later, I thought I'd spectate over another player just to monitor his actions for a few minutes, just to make sure he's not doing mischief. I go into spectator mode and tp over to him. I hover high above him as he is roaming around my other base. He's doing nothing wrong, and as night falls, he runs outside the safety of the base walls and starts picking fights with zombies. The fighting goes sour for him, and he retreats into a small house outside the base walls for safety. I fly down to inside the house with him. He can't see me, of course, but I see him just jumping around and swinging his sword at nothing, wasting time till morning.
Then I notice a couple of wolves in the house with him. He has wolves? I hadn't noticed them before this moment. I fly back up above the house and look around. Then the other player is killed by the wolves. Wha? I fly back down inside the house. Sure enough, all his stuff is lying on the floor among the two wolves. The player rage quits, leaving all his stuff. (He's 10 years old. Sometimes they do things like that.)
Well I continue to fly around the area a bit and I notice the wolves outside the house. Now how did they get outside? Then a thought hit me: are these my wolves? So I test by flying low to the ground, (still in spectator), and sure enough, the wolves follow me.
OK, so now I feel really bad. I change to creative mode, collect all his dropped stuff and place it in a chest in the house.
I thought spectator mode had absolutely no affect on anything. But apparently tamed wolves will still follow you, and if they are struck by another player, they will fight back.
Surely I'm not the first to discover this, but now I wonder what other quirks of spectator mode do I need to be mindful of while monitoring my realm?
Bullgrit
I confirmed, and reported it for you at MC-79313.
My guess would be that you got far enough away from the wolves while boating (since they can't teleport when there's no nearby ground) that the chunks they were in was unloaded. Then later someone else wandered close enough to load those chunks again, so they teleported to you then.
Code-wise, it should be solvable easily enough. I'd personally probably make the "get owner entity" method (func_180492_cm() in MCP v9.10) return null if the found entity is in spectator mode, which if I understand things right should make the AI and everything else act just like the owner is offline.