Class ClientRadioManager
java.lang.Object
com.codinglitch.simpleradio.SimpleRadioApi
com.codinglitch.simpleradio.ClientSimpleRadioApi
com.codinglitch.simpleradio.client.ClientRadioManager
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()voidstatic voiddrawRouterConnection(RadioRouter from, RadioRouter to, @Nullable Wiring wiring, com.mojang.blaze3d.vertex.PoseStack poseStack, com.mojang.blaze3d.vertex.VertexConsumer consumer, org.joml.Vector3f camera) voidstatic voidfinalizeRouter(short mapping, short identifier) static void<T> Optional<T>Gets a config entry from a specified pathgetListener(WorldlyPosition location) getListener(UUID uuid) getListener(net.minecraft.world.entity.Entity owner) getReceiver(WorldlyPosition location) getReceiver(UUID uuid) getReceiver(net.minecraft.world.entity.Entity owner) getRouter(short identifier) getRouter(WorldlyPosition location) getRouter(net.minecraft.world.entity.Entity owner) static float[]getRouterColor(RadioRouter router) getSpeaker(WorldlyPosition location) getSpeaker(UUID uuid) getSpeaker(net.minecraft.world.entity.Entity owner) getTransmitter(WorldlyPosition location) getTransmitter(UUID uuid) getTransmitter(net.minecraft.world.entity.Entity owner) getWrapper(RadioRouter router) getWrapper(Predicate<ClientRouterWrapper> criteria) getWrapper(UUID uuid) static voidhandleListenParticle(net.minecraft.world.level.block.state.BlockState state, MicrophoneBlockEntity blockEntity) static voidhandleSpeakParticle(net.minecraft.world.level.block.state.BlockState state, SpeakerBlockEntity blockEntity) void<E extends SimpleRadioEvent>
voidstatic voidload()newRouter(WorldlyPosition position) Creates a blank Router at the specified location with a random UUID.Creates a blank Router with the specified reference.newRouter(UUID reference, WorldlyPosition position) Creates a blank Router at the specified location with the specified reference.newSource(UUID owner, WorldlyPosition location, byte[] data, float volume) <R extends Router>
voidregisterRouter(R router) <R extends Router>
voidregisterRouter(R router, @Nullable Frequency frequency) removeListener(UUID uuid) removeReceiver(UUID uuid) removeRouter(WorldlyPosition location) removeRouter(WorldlyPosition location, @Nullable String type) removeRouter(Router router) removeRouter(Predicate<Router> predicate) removeRouter(UUID reference) removeRouter(UUID reference, @Nullable String type) removeRouter(net.minecraft.world.entity.Entity owner) removeRouter(net.minecraft.world.entity.Entity owner, @Nullable String type) removeSpeaker(UUID uuid) removeTransmitter(UUID uuid) static voidrenderDebug(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource.BufferSource bufferSource, org.joml.Vector3f camera) static voidrenderRouter(RadioRouter router, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource.BufferSource bufferSource, org.joml.Vector3f camera) <T> voidSets a config entry from a specified pathstatic voidstatic voidspeakSound(UUID routerID, String soundString, float volume, float pitch, float severity, float offset, long seed) static voidtick(long gameTime) net.minecraft.core.BlockPostravelExtension(net.minecraft.core.BlockPos pos, net.minecraft.world.level.LevelAccessor level) voidMethods inherited from class com.codinglitch.simpleradio.ClientSimpleRadioApi
getInstanceMethods inherited from class com.codinglitch.simpleradio.SimpleRadioApi
getInstance, getRouterSided, getRouterSided, registerRouterSided, removeRouterSided, removeRouterSided, removeRouterSided
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ClientRadioManager
public ClientRadioManager()
-
-
Method Details
-
load
public static void load() -
getWrapper
-
getWrapper
-
getWrapper
-
info
- Specified by:
infoin classSimpleRadioApi
-
debug
- Specified by:
debugin classSimpleRadioApi
-
warn
- Specified by:
warnin classSimpleRadioApi
-
error
- Specified by:
errorin classSimpleRadioApi
-
frequencies
- Specified by:
frequenciesin classSimpleRadioApi
-
listen
- Specified by:
listenin classSimpleRadioApi
-
getConfig
Description copied from class:SimpleRadioApiGets a config entry from a specified pathTo get the soundListening entry from the router config:
ServerSimpleRadioApi.getInstance().getConfig("router.soundListening");- Specified by:
getConfigin classSimpleRadioApi- Parameters:
path- The path to the config entry- Returns:
- An optional containing the value, if found
-
setConfig
Description copied from class:SimpleRadioApiSets a config entry from a specified pathTo set the soundListening entry from the router config:
ServerSimpleRadioApi.getInstance().getConfig("router.soundListening", true);- Specified by:
setConfigin classSimpleRadioApi- Parameters:
path- The path to the config entryvalue- The value to set the config entry to
-
newRouter
Description copied from class:SimpleRadioApiCreates a blank Router with the specified reference.- Specified by:
newRouterin classSimpleRadioApi- Parameters:
reference- The reference. If you are creating a block entity with a router, this should be equivalent to a UUID you store and save.- Returns:
- The created router.
-
newRouter
Description copied from class:SimpleRadioApiCreates a blank Router at the specified location with a random UUID. Most of the time, you should instead useSimpleRadioApi.newRouter(UUID)orSimpleRadioApi.newRouter(UUID, WorldlyPosition).- Specified by:
newRouterin classSimpleRadioApi- Parameters:
position- The location of the router.- Returns:
- The created router
-
newRouter
Description copied from class:SimpleRadioApiCreates a blank Router at the specified location with the specified reference.- Specified by:
newRouterin classSimpleRadioApi- Parameters:
reference- The reference. If you are creating a block entity with a router, this should be equivalent to a UUID you store and save.position- The location of the router.- Returns:
- The created router
-
newSource
- Specified by:
newSourcein classSimpleRadioApi
-
travelExtension
public net.minecraft.core.BlockPos travelExtension(net.minecraft.core.BlockPos pos, net.minecraft.world.level.LevelAccessor level) - Specified by:
travelExtensionin classSimpleRadioApi
-
getRouters
- Specified by:
getRoutersin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getRouter
- Specified by:
getRouterin classClientSimpleRadioApi
-
getListener
- Specified by:
getListenerin classClientSimpleRadioApi
-
getListener
- Specified by:
getListenerin classClientSimpleRadioApi
-
getListener
- Specified by:
getListenerin classClientSimpleRadioApi
-
getSpeaker
- Specified by:
getSpeakerin classClientSimpleRadioApi
-
getSpeaker
- Specified by:
getSpeakerin classClientSimpleRadioApi
-
getSpeaker
- Specified by:
getSpeakerin classClientSimpleRadioApi
-
getReceiver
- Specified by:
getReceiverin classClientSimpleRadioApi
-
getReceiver
- Specified by:
getReceiverin classClientSimpleRadioApi
-
getReceiver
- Specified by:
getReceiverin classClientSimpleRadioApi
-
getTransmitter
- Specified by:
getTransmitterin classClientSimpleRadioApi
-
getTransmitter
- Specified by:
getTransmitterin classClientSimpleRadioApi
-
getTransmitter
- Specified by:
getTransmitterin classClientSimpleRadioApi
-
registerRouter
- Specified by:
registerRouterin classSimpleRadioApi
-
registerRouter
- Specified by:
registerRouterin classSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
public Router removeRouter(net.minecraft.world.entity.Entity owner, @Nullable @Nullable String type) - Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeRouter
- Specified by:
removeRouterin classClientSimpleRadioApi
-
removeListener
- Specified by:
removeListenerin classClientSimpleRadioApi
-
removeSpeaker
- Specified by:
removeSpeakerin classClientSimpleRadioApi
-
removeReceiver
- Specified by:
removeReceiverin classClientSimpleRadioApi
-
removeTransmitter
- Specified by:
removeTransmitterin classClientSimpleRadioApi
-
finalizeRouter
public static void finalizeRouter(short mapping, short identifier) -
garbageCollect
public static void garbageCollect() -
tick
public static void tick(long gameTime) -
close
public static void close() -
speakSound
-
speakSound
-
handleListenParticle
public static void handleListenParticle(net.minecraft.world.level.block.state.BlockState state, MicrophoneBlockEntity blockEntity) -
handleSpeakParticle
public static void handleSpeakParticle(net.minecraft.world.level.block.state.BlockState state, SpeakerBlockEntity blockEntity) -
renderDebug
public static void renderDebug(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource.BufferSource bufferSource, org.joml.Vector3f camera) -
getRouterColor
-
drawRouterConnection
public static void drawRouterConnection(RadioRouter from, RadioRouter to, @Nullable @Nullable Wiring wiring, com.mojang.blaze3d.vertex.PoseStack poseStack, com.mojang.blaze3d.vertex.VertexConsumer consumer, org.joml.Vector3f camera) -
renderRouter
public static void renderRouter(RadioRouter router, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource.BufferSource bufferSource, org.joml.Vector3f camera)
-