1. TheGreatJ

    TheGreatJ Plugin Developer

    So right now I am having an issue with my JPipes plugin where after a restart, the pipes connected to a quarry or pump jack disappear.

    What I found:
    When I load the plugin and search for the StorageContainers on the MiningQuarry using "BaseNetworkable.serverEntities.Find(id)", It returns null. And this only happens after a full restart.

    I found that the MiningQuarry has SpawnChildEntities() which spawns it's fuelstorage and hopper StorageContainers. So if there was a hook for when the server loads the childprefabs, then I can load my plugin on it instead of OnServerInitialized().
     
  2. TheGreatJ

    TheGreatJ Plugin Developer

    Update: It seems like the net.ID of the ChildPrefabs on the Quarry and Pump are regenerated after restart. So I'll just get the parent by it's net.ID then find the child prefabs from there.
     
  3. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    I don't think there is a real need for this, OnServerInitialized is generally a good place to handle things like this.