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

Computronics Multiperipherals incompatability #70

Closed SquidDev closed 8 years ago

SquidDev commented 8 years ago

See asiekierka/Computronics#160: just using this as a jotting pad for notes.

Peripheral errors

peripheral.call is erroring when calling isPresentRemote, though not isWireless.

Its currently erroring on the string check.

Crash on breaking network cable

Can't seem to reproduce with vanilla peripherals - need to try with RandomPeripherals.

SquidDev commented 8 years ago
java.lang.RuntimeException: You are not attached to this Computer
    at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.queueEvent(PeripheralAPI.java:221)
    at org.squiddev.cctweaks.core.network.modem.PeripheralAccess.queueEvent(PeripheralAccess.java:101)
    at me.kemal.randomp.util.ComputerUIWrapDummy.queueEvent(ComputerUIWrapDummy.java:49)
    at org.squiddev.cctweaks.core.network.modem.PeripheralAccess.attach(PeripheralAccess.java:45)
    at org.squiddev.cctweaks.core.network.modem.BasicModem.attachPeripheralUnsync(BasicModem.java:84)
    at org.squiddev.cctweaks.core.network.modem.BasicModem.attachPeripheral(BasicModem.java:76)
    at org.squiddev.cctweaks.core.network.modem.BasicModemPeripheral.attach(BasicModemPeripheral.java:126)
    at pl.asie.computronics.api.multiperipheral.WrappedMultiPeripheral.attach(WrappedMultiPeripheral.java:43)
    at pl.asie.computronics.cc.multiperipheral.MultiPeripheral.attach(MultiPeripheral.java:108)
    at me.kemal.randomp.te.TileUniversalInterface.addNeightborCache(TileUniversalInterface.java:834)
    at me.kemal.randomp.block.BlockUniversalInterface.onNeighborBlockChange(BlockUniversalInterface.java:206)
    at net.minecraft.world.World.notifyBlockOfNeighborChange(World.java:697)

And similar on attach.

This line here

SquidDev commented 8 years ago

I cannot reproduce without Computronics. Updating a block next to a universal interface causes it to fire connect and disconnect events on the network: I'll have to do some more debugging.

This line should be using IPeripheral.equals instead.

SquidDev commented 8 years ago

I said it doesn't resolve

SquidDev commented 8 years ago

I've implemented IArguments and IPeripheralWithArguments (see here).

SquidDev commented 8 years ago

Up to other devs to use the API now. Nothing should break no CCTweak's side though.