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(RadioSource source)
      Distribute a RadioSource along every wire connected to this socket.
      Parameters:
      source - The RadioSource to distribute
      Returns:
      Whether or not the source was distributed across any wires.
    • hasWire

      default boolean hasWire(Wire wire)
    • hasWire

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

      default void connect(Wire wire)
    • disconnect

      default void disconnect(Wire wire)
    • disconnect

      default void disconnect(UUID wire)
    • getReference

      default UUID getReference()
    • getIdentifier

      default short getIdentifier()
    • getWires

      default List<Wire> 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