Files
CC-Tweaked/projects
Jonathan Coates 6f16cd6b0e Reset pocket computer if family changes
When we upgrade a normal pocket computer to an advanced one, we need to
create a new ServerComputer instance (and destroy the old one).

On 1.20.1 the ComputerUpgradeRecipe does not preserve the
instance/session ID on the resulting stack. When the item is next
ticked, we create a new computer, with the old computer no longer being
kept alive and eventually dying.

On 1.21.1 we copy all components, *including* the the current computer
reference. This means a new computer is never created and so we continue
to use the old one (with the wrong family). We could exclude the
computer component from the recipe (and so have the same behaviour as
1.20.1), but by adding a hook in onCraftedBy we can destroy the old
computer immediately, ensuring it no longer continues to run.

Fixes #2479.
2026-07-12 16:30:46 +01:00
..
2026-04-25 18:22:06 +01:00
2025-01-09 20:47:51 +00:00
2026-06-15 20:33:55 +01:00
2023-10-28 17:58:11 +01:00