Class ChannelAccess

java.lang.Object
net.minecraft.client.sounds.ChannelAccess

public class ChannelAccess extends Object
The ChannelAccess class provides access to channels for playing audio data using a given library and executor.
  • Field Details

  • Constructor Details

    • ChannelAccess

      public ChannelAccess(Library pLibrary, Executor pExecutor)
  • Method Details

    • createHandle

      public CompletableFuture<ChannelAccess.ChannelHandle> createHandle(Library.Pool pSystemMode)
      Creates a new channel handle for the specified system mode and returns a CompletableFuture that completes with the handle when it is created.

      Parameters:
      pSystemMode - systemMode the system mode to create the channel handle for
      Returns:
      a CompletableFuture that completes with the channel handle when it is created, or null if it cannot be created
    • executeOnChannels

      public void executeOnChannels(Consumer<Stream<Channel>> pSourceStreamConsumer)
      Parameters:
      pSourceStreamConsumer - the consumer to execute on the stream of channels
    • scheduleTick

      public void scheduleTick()
    • clear

      public void clear()