MCPcopy Create free account
hub / github.com/Hypnotic-Development/Hypnotic-Client / toggle

Method toggle

src/main/java/dev/hypnotic/module/Mod.java:113–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 }
112
113 public void toggle() {
114 enabled = !enabled;
115 mc.getSoundManager().play(PositionedSoundInstance.ambient(SoundEvents.UI_BUTTON_CLICK, enabled ? 1 : 0.8f, 1));
116 if(enabled) {
117 onEnable();
118 EventManager.INSTANCE.register(this);
119 } else {
120 onDisable();
121 EventManager.INSTANCE.unregister(this);
122 }
123 }
124
125 public void toggleSilent() {
126 enabled = !enabled;

Callers 9

buildMethod · 0.95
buildMethod · 0.45
mouseClickedMethod · 0.45
mouseClickedMethod · 0.45
mouseClickedMethod · 0.45
mouseClickedMethod · 0.45
mouseClickedMethod · 0.45
onKeyMethod · 0.45
loadMethod · 0.45

Calls 4

onEnableMethod · 0.95
onDisableMethod · 0.95
unregisterMethod · 0.80
registerMethod · 0.45

Tested by

no test coverage detected