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(Wire wire) default voiddisconnect(UUID wire) default booleandistribute(RadioSource source) Distribute aRadioSourcealong every wire connected to this socket.default shortdefault UUIDOverride this to expose a given router to wires.getWires()default booleandefault booleanstatic voidshortAt(net.minecraft.server.level.ServerLevel level, org.joml.Vector3f location) default void
-
Method Details
-
canConnect
default boolean canConnect() -
canConnectTo
-
distribute
Distribute aRadioSourcealong every wire connected to this socket.- Parameters:
source- TheRadioSourceto distribute- Returns:
- Whether or not the source was distributed across any wires.
-
hasWire
-
hasWire
-
connect
-
disconnect
-
disconnect
-
getReference
-
getIdentifier
default short getIdentifier() -
getWires
-
shortCircuit
default void shortCircuit() -
shortAt
static void shortAt(net.minecraft.server.level.ServerLevel level, org.joml.Vector3f location) -
getRouter
RadioRouter 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
-