mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-15 03:14:54 -05:00
pushin p
This commit is contained in:
parent
f82f58447e
commit
a4c8ca5ba5
5 changed files with 25 additions and 1 deletions
|
@ -12,6 +12,8 @@ import net.shadow.client.feature.config.DoubleSetting;
|
|||
import net.shadow.client.feature.config.ModuleConfig;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
public abstract class Module {
|
||||
|
||||
protected static final MinecraftClient client = ShadowMain.client;
|
||||
|
@ -32,7 +34,11 @@ public abstract class Module {
|
|||
this.keybind = this.config.create(new DoubleSetting.Builder(-1).name("Keybind").description("The keybind to toggle the module with").min(-1).max(65535).precision(0).get());
|
||||
this.keybind.showIf(() -> false);
|
||||
this.debuggerEnabled = this.config.create(new BooleanSetting.Builder(false).name("Debugger").description("Shows a lot of funky visuals describing whats going on").get());
|
||||
this.toasts = this.config.create(new BooleanSetting.Builder(true).name("Toasts").description("Whether to show enabled / disabled toasts").get());
|
||||
boolean hasAnnotation = false;
|
||||
for (Annotation declaredAnnotation : this.getClass().getDeclaredAnnotations()) {
|
||||
if (declaredAnnotation.annotationType() == NoNotificationDefault.class) hasAnnotation = true;
|
||||
}
|
||||
this.toasts = this.config.create(new BooleanSetting.Builder(!hasAnnotation).name("Toasts").description("Whether to show enabled / disabled toasts").get());
|
||||
}
|
||||
|
||||
protected boolean isDebuggerEnabled() {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface NoNotificationDefault {
|
||||
}
|
|
@ -11,7 +11,9 @@ import net.shadow.client.feature.config.DoubleSetting;
|
|||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.feature.module.NoNotificationDefault;
|
||||
|
||||
@NoNotificationDefault
|
||||
public class Boost extends Module {
|
||||
|
||||
final DoubleSetting strength = this.config.create(new DoubleSetting.Builder(3).name("Strength").description("How much to boost you with").min(0.1).max(10).precision(1).get());
|
||||
|
|
|
@ -9,7 +9,9 @@ import net.shadow.client.ShadowMain;
|
|||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.feature.module.NoNotificationDefault;
|
||||
|
||||
@NoNotificationDefault
|
||||
public class ClickGUI extends Module {
|
||||
public final DoubleSetting radius = this.config.create(new DoubleSetting.Builder(5).name("Round radius").precision(1).min(0).max(10).description("How round the clickgui is").get());
|
||||
int t = 2;
|
||||
|
|
|
@ -8,7 +8,9 @@ import net.minecraft.client.util.math.MatrixStack;
|
|||
import net.shadow.client.feature.gui.screen.QuickSelectScreen;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.feature.module.NoNotificationDefault;
|
||||
|
||||
@NoNotificationDefault
|
||||
public class Spotlight extends Module {
|
||||
public Spotlight() {
|
||||
super("Spotlight", "Opens the spotlight menu", ModuleType.RENDER);
|
||||
|
|
Loading…
Reference in a new issue