Interface Router
- All Known Subinterfaces:
Listener,Receiver,Speaker,Transmitter
- All Known Implementing Classes:
RadioListener,RadioReceiver,RadioRouter,RadioSpeaker,RadioTransmitter
public interface Router
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddoubledistanceTo(Router other) floatintnet.minecraft.world.phys.Vec3net.minecraft.world.phys.Vec3@Nullable FrequencyshortClass<?> getLink()@Nullable net.minecraft.world.entity.EntitygetOwner()@Nullable WorldlyPositionintorg.joml.Quaternionforg.joml.Vector3fgetWires()voidbooleanisActive()booleanisValid()voidsend(byte[] data, float volume) send(short[] data, float volume) send(WorldlyPosition at, byte[] data, float volume) send(WorldlyPosition at, short[] data, float volume) send(WorldlyPosition at, UUID sender, byte[] data, float volume) Builds aSourceand sends it to this router.send(WorldlyPosition at, UUID sender, short[] data, float volume) Builds aSourceand sends it to this router.voidsend(WorldlyPosition at, UUID sender, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> soundHolder, float volume, float pitch, float offset, long seed) voidsend(WorldlyPosition at, UUID sender, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> soundHolder, float volume, float pitch, long seed) voidsetAcceptingCriteria(Predicate<Source> criteria) voidsetActive(boolean active) voidsetConnectionOffset(net.minecraft.world.phys.Vec3 connectionOffset) voidvoidsetOwner(net.minecraft.world.entity.Entity owner) voidsetPosition(WorldlyPosition position) voidsetRotation(org.joml.Quaternionf position) voidsetRoutingCriteria(BiPredicate<Source, Router> criteria) tryAddRouter(Router router) booleanvalidate()
-
Method Details
-
getReference
UUID getReference() -
getIdentifier
short getIdentifier() -
getFrequency
-
isClientSide
Boolean isClientSide() -
getLocation
WorldlyPosition getLocation() -
tryAddRouter
-
addRouter
-
getPosition
-
getOwner
@Nullable @Nullable net.minecraft.world.entity.Entity getOwner() -
getRouter
-
getRouters
-
getConnectionPosition
net.minecraft.world.phys.Vec3 getConnectionPosition() -
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
-
setConnectionOffset
void setConnectionOffset(net.minecraft.world.phys.Vec3 connectionOffset) -
setPosition
-
setRotation
void setRotation(org.joml.Quaternionf position) -
setRoutingCriteria
-
setAcceptingCriteria
-
distanceTo
-
route
-
accept
-
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
Builds aSourceand 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
-
send
-
send
-
send
Builds aSourceand 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
-
send
-
send
-
validate
boolean validate() -
invalidate
void invalidate()
-