Simple Voice Chat

Simple Voice Chat

337k Downloads

No audio for EntityAudioChannel

Closed this issue · 3 comments

commented

Confirmation

  • I have read the wiki

Bug description

When creating an EntityAudioChannel using the ServerVoiceApi no audio can be heard when using UUID.randomUUID() as channelId.
Using entity.getUUID() as channelId works though.

Minecraft version

1.21.1

Mod/Plugin version

1.21.1-2.5.30

Mod/Plugin loader and version

NeoForge 21.1.92

Steps to reproduce

Use the following code:

var channel = vcApi.createEntityAudioChannel(UUID.randomUUID(), vcApi.fromEntity(entity));
var player = vcApi.createAudioPlayer(channel, vcApi.createEncoder(OpusEncoderMode.AUDIO), () -> {
    // Return some audio here
});
player.startPlaying();

Expected behavior

Audio from the entity should be heard even when specifying as channelId UUID.randomUUID().

Log files

https://gist.github.com/sshcrack/35245141d9af3b738d88a4f248edda06

Screenshots

No response

commented

UUID.randomUUID() не привязан ни к каким игровым объектам, поэтому клиент может не знать, как обработать этот канал.

commented
commented

yup that works