mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-08 18:54:44 +00:00
26.2添加Voicechat
This commit is contained in:
1 parent
2d05101aa9
commit
981d051dc8
5 files changed
+70
-70
No files matched your search
@@ -12,7 +12,7 @@ dependencies {
|
||||
implementation("net.fabricmc.fabric-api:fabric-api:0.152.1+26.2")
|
||||
|
||||
// compileOnly("icyllis.modernui:ModernUI-Fabric:26.1.2-3.13.0.4")
|
||||
// compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
+32
-32
@@ -1,32 +1,32 @@
|
||||
//package com.coloryr.allmusic.client.others;
|
||||
//
|
||||
//import com.coloryr.allmusic.client.core.AllMusicCore;
|
||||
//import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||
//import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||
//import de.maxhenkel.voicechat.api.events.EventRegistration;
|
||||
//
|
||||
//public class VoiceChat implements VoicechatPlugin {
|
||||
// @Override
|
||||
// public String getPluginId() {
|
||||
// return "allmusic";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void registerEvents(EventRegistration registration) {
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play);
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play);
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play);
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.EntitySound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.LocationalSound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.StaticSound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//}
|
||||
package com.coloryr.allmusic.client.others;
|
||||
|
||||
import com.coloryr.allmusic.client.core.AllMusicCore;
|
||||
import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||
import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||
import de.maxhenkel.voicechat.api.events.EventRegistration;
|
||||
|
||||
public class VoiceChat implements VoicechatPlugin {
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "allmusic";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerEvents(EventRegistration registration) {
|
||||
registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play);
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.EntitySound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.LocationalSound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.StaticSound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ dependencies {
|
||||
neoForge("net.neoforged:neoforge:26.2.0.1-beta")
|
||||
|
||||
// compileOnly("icyllis.modernui:ModernUI-NeoForge:26.1.2-3.13.0.4")
|
||||
// compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
+34
-34
@@ -1,34 +1,34 @@
|
||||
//package com.coloryr.allmusic.client.others;
|
||||
//
|
||||
//import com.coloryr.allmusic.client.core.AllMusicCore;
|
||||
//import de.maxhenkel.voicechat.api.ForgeVoicechatPlugin;
|
||||
//import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||
//import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||
//import de.maxhenkel.voicechat.api.events.EventRegistration;
|
||||
//
|
||||
//@ForgeVoicechatPlugin
|
||||
//public class VoiceChat implements VoicechatPlugin {
|
||||
// @Override
|
||||
// public String getPluginId() {
|
||||
// return "allmusic";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void registerEvents(EventRegistration registration) {
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play);
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play);
|
||||
// registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play);
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.EntitySound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.LocationalSound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//
|
||||
// public void play(ClientReceiveSoundEvent.StaticSound event) {
|
||||
// AllMusicCore.chat();
|
||||
// }
|
||||
//}
|
||||
package com.coloryr.allmusic.client.others;
|
||||
|
||||
import com.coloryr.allmusic.client.core.AllMusicCore;
|
||||
import de.maxhenkel.voicechat.api.ForgeVoicechatPlugin;
|
||||
import de.maxhenkel.voicechat.api.VoicechatPlugin;
|
||||
import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent;
|
||||
import de.maxhenkel.voicechat.api.events.EventRegistration;
|
||||
|
||||
@ForgeVoicechatPlugin
|
||||
public class VoiceChat implements VoicechatPlugin {
|
||||
@Override
|
||||
public String getPluginId() {
|
||||
return "allmusic";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerEvents(EventRegistration registration) {
|
||||
registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play);
|
||||
registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play);
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.EntitySound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.LocationalSound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
|
||||
public void play(ClientReceiveSoundEvent.StaticSound event) {
|
||||
AllMusicCore.chat();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -30,8 +30,8 @@ include(":server:fabric_1_21_11")
|
||||
include(":server:fabric_26_1")
|
||||
include(":server:fabric_26_2")
|
||||
|
||||
//include(":server:forge_1_7_10")
|
||||
//include(":server:forge_1_12_2")
|
||||
include(":server:forge_1_7_10")
|
||||
include(":server:forge_1_12_2")
|
||||
include(":server:forge_1_16_5")
|
||||
include(":server:forge_1_20_1")
|
||||
|
||||
|
||||
Reference in new issue
Block a user