Skip to content

[Bug] JobSpawner loses lifecycle tracking after legacy world conversion due to entity replacement logic  #285

@zeng-github01

Description

@zeng-github01

Issue description:

A logic exception occurs in JobSpawner when loading legacy saves. The spawner fails to maintain the lifecycle tracking of its spawned entities because the Legacy Entity itself handles its own replacement logic.
​Internally, the Legacy Entity executes a "Self-Termination & Replacement" sequence:
​It instantiates a new Modern version of the entity.
​It calls its own setDead() method to clean itself up.
​Because JobSpawner only holds a reference to the initial Legacy instance, it detects the setDead() signal and immediately marks the task as "Finished" or "Entity Lost," failing to recognize the new Modern entity as the legitimate successor.

Versions:

  • Minecraft: 1.7.10
  • Forge:
  • CustomNPC+: 1.11.1

Can it be reproduced with just CustomNPC+? If not, list the other mods required to reproduce the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions