Interface Socket
- All Known Implementing Classes:
AuditoryBlockEntity,CatalyzingBlockEntity,InsulatorBlockEntity,MicrophoneBlockEntity,RadioBlockEntity,RadioListener,RadioReceiver,RadioRouter,RadioSpeaker,RadioTransmitter,ReceiverBlockEntity,SpeakerBlockEntity,TransmitterBlockEntity
public interface Socket
A wire-connecting object.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandefault booleancanConnectTo(Socket other) default voiddefault voiddisconnect(Wiring wire) default voiddisconnect(UUID wire) default booleandistribute(Message message) Distribute aMessagealong every wire connected to this socket.default shortdefault UUIDOverride this to expose a given router to wires.getWires()default booleandefault booleandefault void
-
Method Details
-
canConnect
default boolean canConnect() -
canConnectTo
-
distribute
Distribute aMessagealong every wire connected to this socket.- Parameters:
message- TheMessageto distribute- Returns:
- Whether or not the message was distributed across any wires.
-
hasWire
-
hasWire
-
connect
-
disconnect
-
disconnect
-
getReference
-
getIdentifier
default short getIdentifier() -
shortCircuit
default void shortCircuit() -
getRouter
Router getRouter()Override this to expose a given router to wires.
Allows blocks with more than one router to choose which of their routers wires will connect to.- Returns:
- The router to be exposed
-
getWires
-