SquidDev-CC / CCTweaks

Random additions to ComputerCraft (somewhat deprecated, use CC-Tweaked if you're on Minecraft 1.12).
MIT License
12 stars 2 forks source link

`attachToNetwork` not fired on world join #35

Closed SquidDev closed 9 years ago

SquidDev commented 9 years ago

attachToNetwork is only called when placed or peripheralEnabled is toggled for modems blocks and PartModem.

It should also be called on initial construction, otherwise peripherals never receive a network object. The easiest way would be to call attachConnectedPeripherals() after creating the modem. I feel this should probably be done within the TileEntities (onWorldJoin and setWorldObj) rather than within the base modem class.

I haven't tested but I imagine the same applies to TileCable and computers.

@ElvishJerricco: This is a trivial fix, I just want to check with you before applying it.

ElvishJerricco commented 9 years ago

Yet another thing that will hopefully be solved by the network rewrite =P