[MC-2018] Hostile mobs depsawn when moving through Nether portals in SMP unless playing alone Created: 03/Nov/12  Updated: 30/Dec/24  Resolved: 06/Dec/12

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2
Fix Version/s: None

Type: Bug
Reporter: Danny Barbier Assignee: Unassigned
Resolution: Works As Intended Votes: 1
Labels: None
Environment:

Windows 7, Java Version 7 Update 9


Issue Links:
Relates
relates to MC-54582 Mobs despawn if transported by portal... Resolved
Confirmation Status: Unconfirmed
Game Mode: Survival

 Description   

Due to the fact that mobs despawn when far from other players, you cannot move hostile mobs through Nether portals in SMP if there is a player online on the other side of that portal, unless that player is close enough that the mob does not despawn. Everything works fine in SSP, or if there are no other players online, or if it's a mob type that doesn't despawn (i.e. passive mobs)

What I expected to happen was...:
The hostile mob should move through the Nether portal but then wait "in limbo" on the other side, because the chunk in which the portal they'll come out of isn't loaded (which is how it works in single player)

What actually happened was...:
A mob will move through the portal on one side, arrive on the other side, see that it is too far from the other players (even though the chunk isn't loaded) and despawn instantly

Steps to Reproduce:
1. Start a SMP server
2. Have two people online, both in the Overworld, and very far apart (thousands of blocks, whatever)
3. Have one person create a Nether portal, go to the Nether, and move a hostile mob through the Nether portal back into the Overworld
4. The mob will despawn

Other tests that confirm this behaviour:

  • If the "other online person" is close to the Nether portal, the mob moves through successfully
  • If no one is online at all (or alternatively, in single player), the mob "waits in limbo" and loads successfully when the player moves through the portal
  • Passive mobs move through and do not despawn, regardless of game mode or who is online
  • Despawning works both ways (Overworld > Nether or vice-versa), so long as there is a player out of range on whatever side of the portal the hostile mob comes out of (in other words, if player 2 is in the Overworld and no one is in the Nether, and you move a hostile mob to the Nether instead of from it, the mob will be waiting for player 1 in the Nether


 Comments   
Comment by Tur genev [ 30/Dec/24 ]

Imao, the game should have the data of "why the chunk is loaded". If the chunk is loaded because there is a nearby player, hostile mobs should be able to despawn. If it is loaded only because an item entity is sent through a nearby portal, hostile mobs shouldn't be able to despawn.

Comment by Danny Barbier [ 06/Dec/12 ]

I understand, but there is a strong inconsistency in how mobs moving through nether portals is handled.

SSP: Mobs move through the portal on one side, mobs waiting to greet you on the other side
SMP (when no one else is online): Same as above
SMP (when more than one person is online): Mobs move through the portal on one side, but do not greet you on the other because they've despawned.

This isn't necessarily a flaw in coding and everything is working as intended, but it is an obvious design oversight. Am I... wrong in thinking that?

Comment by Mustek [ 06/Dec/12 ]

It's intended that hostile mobs despawn when a chunk is unloaded.

Comment by Danny Barbier [ 03/Nov/12 ]

Obviously, this negatively affects the usability of nether portals in mob farms, which (while mojang usually frowns on farming) is clearly the biggest benefit of the new functionality of mobs moving through portals. If hostile mobs can't move through portals without despawning in smp, adding that feature altogether was kind of moot, save for like, moving mooshroom cows around quicker or whatever.

Generated at Sun Jan 12 11:56:25 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.