1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-31 21:52:59 +00:00

Add peripheral_hub type for wired-modem-like peripherals (#1193)

This allows other mods to create wired-modem alike blocks, which expose
peripherals on the wired network, without having to reimplement the main
modem interface.

This is not currently documented, but a peripheral_hub should provide
the following methods:

 - isPresentRemote
 - getTypeRemote
 - hasTypeRemote
 - getMethodsRemote
 - callRemote
This commit is contained in:
Jonathan Coates
2022-10-29 16:03:05 +01:00
committed by GitHub
parent 97387556fe
commit 1e88d37004
2 changed files with 13 additions and 16 deletions

View File

@@ -72,6 +72,13 @@ public abstract class WiredModemPeripheral extends ModemPeripheral implements IW
protected abstract WiredModemLocalPeripheral getLocalPeripheral();
//endregion
@Nonnull
@Override
public Set<String> getAdditionalTypes()
{
return Collections.singleton( "peripheral_hub" );
}
//region Peripheral methods
/**