mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Support latest version of SimpleVoiceChat
This commit is contained in:
1 parent
a5f3ff2513
commit
7a6a3845a9
2 files changed
+8
-4
No files matched your search
+1
-1
@@ -69,7 +69,7 @@ dependencies {
|
||||
modCompileOnly("maven.modrinth:sodium:RncWhTxD")
|
||||
modCompileOnly("maven.modrinth:iris:kuOV4Ece")
|
||||
modCompileOnly("maven.modrinth:bobby:2cuVyTav")
|
||||
modCompileOnly("maven.modrinth:simple-voice-chat:95BK1U8I")
|
||||
modCompileOnly("maven.modrinth:simple-voice-chat:4Zzq92HE")
|
||||
modCompileOnly("maven.modrinth:replaymod:NtlpUQgI")
|
||||
modCompileOnly("maven.modrinth:modmenu:xhN1IvHi")
|
||||
|
||||
|
||||
+7
-3
@@ -1,18 +1,17 @@
|
||||
package com.moulberry.flashback.compat.simple_voice_chat;
|
||||
|
||||
import com.moulberry.flashback.action.ActionLevelChunkCached;
|
||||
import com.moulberry.flashback.action.ActionRegistry;
|
||||
import de.maxhenkel.voicechat.api.VoicechatApi;
|
||||
import de.maxhenkel.voicechat.api.VoicechatClientApi;
|
||||
import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||
import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||
import de.maxhenkel.voicechat.api.events.ClientSoundEvent;
|
||||
import de.maxhenkel.voicechat.api.events.ClientVoicechatInitializationEvent;
|
||||
import de.maxhenkel.voicechat.api.events.EventRegistration;
|
||||
import de.maxhenkel.voicechat.plugins.impl.VoicechatClientApiImpl;
|
||||
|
||||
public class SimpleVoiceChatPlugin implements VoicechatPlugin {
|
||||
|
||||
public static VoicechatClientApi CLIENT_API = VoicechatClientApiImpl.instance();
|
||||
public static VoicechatClientApi CLIENT_API;
|
||||
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
@@ -26,9 +25,14 @@ public class SimpleVoiceChatPlugin implements VoicechatPlugin {
|
||||
|
||||
@Override
|
||||
public void registerEvents(EventRegistration registration) {
|
||||
registration.registerEvent(ClientVoicechatInitializationEvent.class, this::onClientInitialized);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, SimpleVoiceChatRecorder::onReceiveEntitySound);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, SimpleVoiceChatRecorder::onReceiveLocationalSound);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, SimpleVoiceChatRecorder::onReceiveStaticSound);
|
||||
registration.registerEvent(ClientSoundEvent.class, SimpleVoiceChatRecorder::onSendSound);
|
||||
}
|
||||
|
||||
private void onClientInitialized(ClientVoicechatInitializationEvent event) {
|
||||
CLIENT_API = event.getVoicechat();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user