mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 22:16:01 +00:00
Support latest version of SimpleVoiceChat
This commit is contained in:
1 parent
1e1393f2c6
commit
809c4df917
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:sodium:RncWhTxD")
|
||||||
modCompileOnly("maven.modrinth:iris:kuOV4Ece")
|
modCompileOnly("maven.modrinth:iris:kuOV4Ece")
|
||||||
modCompileOnly("maven.modrinth:bobby:2cuVyTav")
|
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:replaymod:NtlpUQgI")
|
||||||
modCompileOnly("maven.modrinth:modmenu:xhN1IvHi")
|
modCompileOnly("maven.modrinth:modmenu:xhN1IvHi")
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -1,18 +1,17 @@
|
|||||||
package com.moulberry.flashback.compat.simple_voice_chat;
|
package com.moulberry.flashback.compat.simple_voice_chat;
|
||||||
|
|
||||||
import com.moulberry.flashback.action.ActionLevelChunkCached;
|
|
||||||
import com.moulberry.flashback.action.ActionRegistry;
|
import com.moulberry.flashback.action.ActionRegistry;
|
||||||
import de.maxhenkel.voicechat.api.VoicechatApi;
|
import de.maxhenkel.voicechat.api.VoicechatApi;
|
||||||
import de.maxhenkel.voicechat.api.VoicechatClientApi;
|
import de.maxhenkel.voicechat.api.VoicechatClientApi;
|
||||||
import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||||
import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||||
import de.maxhenkel.voicechat.api.events.ClientSoundEvent;
|
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.api.events.EventRegistration;
|
||||||
import de.maxhenkel.voicechat.plugins.impl.VoicechatClientApiImpl;
|
|
||||||
|
|
||||||
public class SimpleVoiceChatPlugin implements VoicechatPlugin {
|
public class SimpleVoiceChatPlugin implements VoicechatPlugin {
|
||||||
|
|
||||||
public static VoicechatClientApi CLIENT_API = VoicechatClientApiImpl.instance();
|
public static VoicechatClientApi CLIENT_API;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPluginId() {
|
public String getPluginId() {
|
||||||
@@ -26,9 +25,14 @@ public class SimpleVoiceChatPlugin implements VoicechatPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerEvents(EventRegistration registration) {
|
public void registerEvents(EventRegistration registration) {
|
||||||
|
registration.registerEvent(ClientVoicechatInitializationEvent.class, this::onClientInitialized);
|
||||||
registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, SimpleVoiceChatRecorder::onReceiveEntitySound);
|
registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, SimpleVoiceChatRecorder::onReceiveEntitySound);
|
||||||
registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, SimpleVoiceChatRecorder::onReceiveLocationalSound);
|
registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, SimpleVoiceChatRecorder::onReceiveLocationalSound);
|
||||||
registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, SimpleVoiceChatRecorder::onReceiveStaticSound);
|
registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, SimpleVoiceChatRecorder::onReceiveStaticSound);
|
||||||
registration.registerEvent(ClientSoundEvent.class, SimpleVoiceChatRecorder::onSendSound);
|
registration.registerEvent(ClientSoundEvent.class, SimpleVoiceChatRecorder::onSendSound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onClientInitialized(ClientVoicechatInitializationEvent event) {
|
||||||
|
CLIENT_API = event.getVoicechat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user