I experienced a issue recently where some of my spiders mysteriously disappeared upon rollback, or when I was going to the underground where I left 10+ or so befriended spiders, only one remained.
local function DoReturn(inst) local home = inst.components.homeseeker ~= nil and inst.components.homeseeker.home or nil if home ~= nil and home.components.childspawner ~= nil and not (inst.components.follower ~= nil and inst.components.follower.leader ~= nil) then home.components.childspawner:GoHome(inst) end end local function OnEntitySleep(inst) if TheWorld.state.iscaveday then DoReturn(inst) end end
It looks like spiders go back to their homes when their entity sleeps, there is a leader check, Maybe the leader isn't set in time when the server is reset/player joins in fast enough before this function runs?
1. Tame spiders
2. Reset/rollback server, or switch shards back and forth
3. Some spiders should "mysteriously" disappear(they go back to their dens)