Moderator note
To keep hostile mobs in spectator mode, rename them with a name tag (renaming the spawner eggs does not work!)
Hijacking my own ticket: I definitely agree with the several people who have commented below: I'd like this to be changed back! Fun overrides this nit picky way I was suggesting of being consistent.
What I expected: I had reasoned that since the presence of a spectator does not trigger the spawning of mobs, that likewise the presence of a spectator would be insufficient reason for mobs such as skeletons and zombies to hang around in the absence of other players.
What I saw: Mobs that typically would despawn when a player moves out of their radius, were hanging around indefinitely as if my presence was preventing them from despawning.
It seems convenient on the one hand that a spectator can camp out inside an enderman for instance and spy on people who might come along, with that cool shader, or something, but on the other hand it ends up being a giveaway to other players that the otherwise-despawning mob must contain a spectator.
Linked issues
relates to 2
Comments 14
Nathan, I don't think it needs to be like that. What if I want to teleport a hostile creature to a player, when the player would be in spectator mode so it won't push the entity? And I want to test it on a singleplayer world? How would I do it? You should do that it will only despawn if the player is in a server, and if he is on a singleplayer world, then mobs won't despawn.
alon, if you tp it with a fast clock, pushing won't be a problem, a spectator now counts as no player that's simply how it works now
Let me put my personal feedback on this.
Spectators are meant to have no impact on the world, other players and other stuff. In competitive Minecraft, keeping mobs alive can actually provide a disadvantage in comparison to others. So the fact that monsters do despawn is a good thing.
That is true, Mustek, and I totally agree when it comes to competitive minecraft, but this ticket and its change affected only single player minecraft.
In the beginning, i was actually unaware that multiplayer was already functioning with disappearing mobs. I was just extrapolating from my single player creative mode testing, and thought that they weren't. Bad extrapolation on my part. If I had known mobs were already disappearing in multiplayer, I wouldn't have suggested any change.
I agree that it has to be changed, but not completely back.
change it for single player, so that the mobs will stay.
but don't for multiplayer, so it will not effect other players
I think that the best solution would be creating a game rule to toggle if spectators count as players in terms of mob spawning/despawning. It's a bit of a hassle to name EVERY single mob if you don't want any to despawn.
The good news is that this will be reverted to its "fun side" in 14w28b (MC-61080).
This was only partially true; mobs would not despawn if the only players online were spectators. If there were any normal players on then the mobs would despawn.
I've changed it so that mobs will despawn even if everybody is a spectator, to be consistent.