Interface Router

All Known Subinterfaces:
Listener, Receiver, Speaker, Transmitter
All Known Implementing Classes:
RadioListener, RadioReceiver, RadioRouter, RadioSpeaker, RadioTransmitter

public interface Router
  • Method Details

    • getReference

      UUID getReference()
    • getIdentifier

      short getIdentifier()
    • getFrequency

      @Nullable @Nullable Frequency getFrequency()
    • isClientSide

      Boolean isClientSide()
    • getLocation

      WorldlyPosition getLocation()
    • tryAddRouter

      Router tryAddRouter(Router router)
    • addRouter

      Router addRouter(Router router)
    • getPosition

      @Nullable @Nullable WorldlyPosition getPosition()
    • getOwner

      @Nullable @Nullable net.minecraft.world.entity.Entity getOwner()
    • getRouter

      Router getRouter(UUID id)
    • getRouters

      List<Router> getRouters()
    • getConnectionPosition

      net.minecraft.world.phys.Vec3 getConnectionPosition()
    • getWires

      List<Wiring> getWires()
    • isActive

      boolean isActive()
    • isValid

      boolean isValid()
    • getConnectionOffset

      net.minecraft.world.phys.Vec3 getConnectionOffset()
    • getLink

      Class<?> getLink()
    • getVelocity

      org.joml.Vector3f getVelocity()
    • getActivity

      float getActivity()
    • getActivityTime

      int getActivityTime()
    • getRedstoneMappedActivity

      int getRedstoneMappedActivity()
    • getRotation

      org.joml.Quaternionf getRotation()
    • allowDistribution

      void allowDistribution()
    • setOwner

      void setOwner(net.minecraft.world.entity.Entity owner)
    • setActive

      void setActive(boolean active)
    • setLink

      void setLink(Class<?> link)
    • setConnectionOffset

      void setConnectionOffset(net.minecraft.world.phys.Vec3 connectionOffset)
    • setPosition

      void setPosition(WorldlyPosition position)
    • setRotation

      void setRotation(org.joml.Quaternionf position)
    • setRoutingCriteria

      void setRoutingCriteria(BiPredicate<Source,Router> criteria)
    • setAcceptingCriteria

      void setAcceptingCriteria(Predicate<Source> criteria)
    • distanceTo

      double distanceTo(Router other)
    • route

      void route(Source source)
    • accept

      void accept(Source source)
    • send

      void send(WorldlyPosition at, UUID sender, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> soundHolder, float volume, float pitch, long seed)
    • send

      void send(WorldlyPosition at, UUID sender, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> soundHolder, float volume, float pitch, float offset, long seed)
    • send

      Source send(WorldlyPosition at, UUID sender, short[] data, float volume)
      Builds a Source and sends it to this router.
      Parameters:
      at - The location to send it from.
      sender - The sender of the audio.
      data - The data to send, in raw PCM format.
      volume - The overall volume of the audio.
    • send

      Source send(WorldlyPosition at, short[] data, float volume)
    • send

      Source send(UUID sender, short[] data, float volume)
    • send

      Source send(short[] data, float volume)
    • send

      Source send(WorldlyPosition at, UUID sender, byte[] data, float volume)
      Builds a Source and sends it to this router.
      Parameters:
      at - The location to send it from.
      sender - The sender of the audio.
      data - The data to send, in Opus-encoded format.
      volume - The overall volume of the audio.
    • send

      Source send(WorldlyPosition at, byte[] data, float volume)
    • send

      Source send(UUID sender, byte[] data, float volume)
    • send

      Source send(byte[] data, float volume)
    • validate

      boolean validate()
    • invalidate

      void invalidate()