OpenPeripheral comes with the @Env parameter. This takes a variables that gives the name of the argument. For instance ComputerCraftEnv adds access to the computer, context, etc...
It might be possible add additional processing via ASM to allow us to get AdapterPeripheral to implement INetworkedPeripheral. However, as a peripheral can be attached to multiple networks, we probably want to have a custom implementation of INetworkAccess that proxies to multiple networks. This obviously gives limited capbilities - we can't track disconect events - though we could also add a custom interface INetworkedAdapter that provides similar capabilities to INetworkedPeripheral through something like this.
We also need to use ASM injection so the peripheral proxy implements INetworkedPeripheral.
Sadly it looks like an INetworkedAdapter will not be possible, though it doesn't matter too much as you can still use @Env(IPeripheralEnvironments.ARG_NETWORK) INetworkedAccess.
Open peripheral support for #17
OpenPeripheral comes with the
@Env
parameter. This takes a variables that gives the name of the argument. For instanceComputerCraftEnv
adds access to the computer, context, etc...It might be possible add additional processing via ASM to allow us to get
AdapterPeripheral
to implementINetworkedPeripheral
. However, as a peripheral can be attached to multiple networks, we probably want to have a custom implementation ofINetworkAccess
that proxies to multiple networks. This obviously gives limited capbilities - we can't track disconect events - though we could also add a custom interfaceINetworkedAdapter
that provides similar capabilities toINetworkedPeripheral
through something like this.We also need to use ASM injection so the peripheral proxy implements INetworkedPeripheral.