mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-02 22:17:10 +00:00
Merge pull request #22 from henkelmax/master
Fix Simple Voice Chat disconnect symbol showing in replays
This commit is contained in:
2 files changed
+25
No files matched your search
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package com.moulberry.flashback.mixin.compat.voice_chat;
|
||||||
|
|
||||||
|
import com.moulberry.flashback.Flashback;
|
||||||
|
import com.moulberry.mixinconstraints.annotations.IfModLoaded;
|
||||||
|
import de.maxhenkel.voicechat.voice.client.ClientPlayerStateManager;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Pseudo;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@IfModLoaded("voicechat")
|
||||||
|
@Pseudo
|
||||||
|
@Mixin(value = ClientPlayerStateManager.class, remap = false)
|
||||||
|
public class MixinVoiceChatClientPlayerStateManager {
|
||||||
|
|
||||||
|
@Inject(method = "isPlayerDisconnected", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void isPlayerDisconnected(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
if (Flashback.isInReplay()) {
|
||||||
|
cir.setReturnValue(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
"compat.voice_chat.MixinVoiceChatClientVoicechat",
|
"compat.voice_chat.MixinVoiceChatClientVoicechat",
|
||||||
"compat.voice_chat.MixinVoiceChatRenderEvents",
|
"compat.voice_chat.MixinVoiceChatRenderEvents",
|
||||||
"compat.voice_chat.MixinVoiceChatSoundManager",
|
"compat.voice_chat.MixinVoiceChatSoundManager",
|
||||||
|
"compat.voice_chat.MixinVoiceChatClientPlayerStateManager",
|
||||||
"playback.MixinAttributeInstance",
|
"playback.MixinAttributeInstance",
|
||||||
"playback.MixinBoat",
|
"playback.MixinBoat",
|
||||||
"playback.MixinChunkHolder",
|
"playback.MixinChunkHolder",
|
||||||
|
|||||||
Reference in new issue
Block a user