File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed
src/main/java/meow/emily/patootie Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change 16
16
import net .labymod .utils .ModColor ;
17
17
import net .minecraft .client .network .NetworkPlayerInfo ;
18
18
import net .minecraft .entity .player .EntityPlayer ;
19
- import net .minecraftforge .fml .common .eventhandler .SubscribeEvent ;
20
- import net .minecraftforge .fml .common .gameevent .TickEvent ;
21
19
22
20
import java .util .*;
23
21
import java .util .logging .Logger ;
@@ -65,7 +63,7 @@ public void onEnable() {
65
63
System .out .println (PREFIX + "Starting..." );
66
64
}
67
65
68
- @ SubscribeEvent
66
+ /* @SubscribeEvent
69
67
public void onTick(TickEvent.ClientTickEvent event) {
70
68
if (!voiceexist) {
71
69
for (LabyModAddon addon : AddonLoader.getAddons()) {
@@ -83,7 +81,7 @@ public void onTick(TickEvent.ClientTickEvent event) {
83
81
}
84
82
}
85
83
}
86
- }
84
+ } */
87
85
88
86
private UserActionEntry createBlacklistEntry () {
89
87
return new UserActionEntry (
@@ -282,15 +280,19 @@ public boolean isConfigMessage() {
282
280
return this .configMessage ;
283
281
}
284
282
285
- public boolean isVoiceexist () {
286
- return voiceexist ;
287
- }
288
-
289
283
public boolean isMuted () {
290
284
return muted ;
291
285
}
292
286
293
287
public void setMuted (boolean muted ) {
294
288
this .muted = muted ;
295
289
}
290
+
291
+ public boolean isVoiceexist () {
292
+ return voiceexist ;
293
+ }
294
+
295
+ public void setVoiceexist (boolean voiceexist ) {
296
+ this .voiceexist = voiceexist ;
297
+ }
296
298
}
Original file line number Diff line number Diff line change 5
5
import meow .emily .patootie .util .Utils ;
6
6
import net .labymod .addon .AddonLoader ;
7
7
import net .labymod .addons .voicechat .VoiceChat ;
8
+ import net .labymod .api .LabyModAddon ;
8
9
import net .labymod .main .LabyMod ;
9
10
import net .minecraft .client .Minecraft ;
10
11
import net .minecraft .entity .player .EntityPlayer ;
11
12
import net .minecraftforge .client .event .RenderPlayerEvent ;
12
13
import net .minecraftforge .fml .common .eventhandler .SubscribeEvent ;
13
14
import net .minecraftforge .fml .common .gameevent .InputEvent ;
15
+ import net .minecraftforge .fml .common .gameevent .TickEvent ;
14
16
import org .lwjgl .input .Keyboard ;
15
17
16
18
import java .util .List ;
@@ -24,6 +26,20 @@ public class PlayerEventHandler {
24
26
// UUID VoiceChat 1.8
25
27
private final UUID VcUuid8 = UUID .fromString ("43152d5b-ca80-4b29-8f48-39fd63e48dee" );
26
28
29
+ @ SubscribeEvent
30
+ public void onTick (TickEvent .ClientTickEvent event ) {
31
+ Emily instance = Emily .getInstance ();
32
+ if (!instance .isVoiceexist ()) {
33
+ LabyModAddon addon = AddonLoader .getAddonByUUID (UUID .fromString (String .valueOf (vcUuid12 )));
34
+ if (addon instanceof VoiceChat && addon .about .name .equals ("VoiceChat" )) {
35
+ VoiceChat voiceChat = (VoiceChat ) addon ;
36
+ instance .setVoiceexist (true );
37
+ } else {
38
+ instance .setVoiceexist (false );
39
+ }
40
+ }
41
+ }
42
+
27
43
@ SubscribeEvent
28
44
public void onPrePlayerRender (RenderPlayerEvent .Pre e ) {
29
45
Emily instance = Emily .getInstance ();
You can’t perform that action at this time.
0 commit comments