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 Details

    • canConnect

      default boolean canConnect()
    • canConnectTo

      default boolean canConnectTo(Socket other)
    • distribute

      default boolean distribute(Source source)
      Distribute a Source along every wire connected to this socket.
      Parameters:
      source - The Source to distribute
      Returns:
      Whether or not the source was distributed across any wires.
    • hasWire

      default boolean hasWire(Wiring wire)
    • hasWire

      default boolean hasWire(UUID from, UUID to)
    • connect

      default void connect(Wiring wire)
    • disconnect

      default void disconnect(Wiring wire)
    • disconnect

      default void disconnect(UUID wire)
    • getReference

      default UUID 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

      default List<Wiring> getWires()