chore: refactor modules -> module

This commit is contained in:
əlemi 2023-01-30 23:36:10 +01:00
parent 5e0ec6d4aa
commit 20125f6fb5
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E
9 changed files with 34 additions and 23 deletions

View file

@ -27,10 +27,11 @@ import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import co.fantabos.bscv.modules.vision.*;
import co.fantabos.bscv.modules.motion.*;
import co.fantabos.bscv.modules.self.*;
import co.fantabos.bscv.modules.hud.*;
import co.fantabos.bscv.module.Module;
import co.fantabos.bscv.module.vision.*;
import co.fantabos.bscv.module.motion.*;
import co.fantabos.bscv.module.self.*;
import co.fantabos.bscv.module.hud.*;
// The value here should match an entry in the META-INF/mods.toml file
@Mod("bscv")

View file

@ -1,10 +1,10 @@
package co.fantabos.bscv.modules.hud;
package co.fantabos.bscv.module;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.DoubleArgumentType;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import co.fantabos.bscv.Module;
import co.fantabos.bscv.module.Module;
import co.fantabos.bscv.tools.Anchor;
import net.minecraft.command.CommandSource;
import net.minecraftforge.common.ForgeConfigSpec;

View file

@ -1,8 +1,9 @@
package co.fantabos.bscv;
package co.fantabos.bscv.module;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.ArgumentType;
import co.fantabos.bscv.BoSCoVicino;
import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraftforge.common.ForgeConfigSpec;

View file

@ -1,4 +1,4 @@
package co.fantabos.bscv.modules.hud;
package co.fantabos.bscv.module.hud;
import static co.fantabos.bscv.tools.Text.TextBuilder;
@ -10,7 +10,8 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import co.fantabos.bscv.Module;
import co.fantabos.bscv.module.HudModule;
import co.fantabos.bscv.module.Module;
public class ActiveModules extends HudModule {

View file

@ -1,10 +1,11 @@
package co.fantabos.bscv.modules.hud;
package co.fantabos.bscv.module.hud;
import static co.fantabos.bscv.tools.Text.TextBuilder;
import com.mojang.brigadier.CommandDispatcher;
import co.fantabos.bscv.BoSCoVicino;
import co.fantabos.bscv.module.HudModule;
import net.minecraft.client.Minecraft;
import net.minecraft.command.CommandSource;
import net.minecraft.util.math.vector.Vector3d;

View file

@ -1,4 +1,4 @@
package co.fantabos.bscv.modules.hud;
package co.fantabos.bscv.module.hud;
import static co.fantabos.bscv.tools.Text.TextBuilder;
@ -10,6 +10,7 @@ import java.util.stream.Collectors;
import com.mojang.brigadier.CommandDispatcher;
import co.fantabos.bscv.BoSCoVicino;
import co.fantabos.bscv.module.HudModule;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.Entity;
import net.minecraftforge.client.event.RenderGameOverlayEvent;

View file

@ -1,18 +1,22 @@
package co.fantabos.bscv.modules.motion;
package co.fantabos.bscv.module.motion;
import com.mojang.brigadier.CommandDispatcher;
import co.fantabos.bscv.BoSCoVicino;
import co.fantabos.bscv.Module;
import co.fantabos.bscv.module.QuickModule;
import net.minecraft.command.CommandSource;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
public class VanillaFlight extends Module {
public class VanillaFlight extends QuickModule {
public final ForgeConfigSpec.ConfigValue<Boolean> force;
public VanillaFlight(ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
super("VanillaFlight", Group.MOTION, builder, dispatcher);
super("VanillaFlight", Group.MOTION, -1, builder, dispatcher);
}
private boolean couldFlyBefore = false;

View file

@ -1,4 +1,4 @@
package co.fantabos.bscv.modules.self;
package co.fantabos.bscv.module.self;
import static co.fantabos.bscv.BoSCoVicino.log;
@ -11,15 +11,15 @@ import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import co.fantabos.bscv.Module;
import co.fantabos.bscv.module.QuickModule;
import co.fantabos.bscv.BoSCoVicino;
public class FastInteract extends Module {
public class FastInteract extends QuickModule {
Field delayField;
public FastInteract(ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
super("FastInteract", Group.SELF, builder, dispatcher);
super("FastInteract", Group.SELF, -1, builder, dispatcher);
}
@Override

View file

@ -1,4 +1,6 @@
package co.fantabos.bscv.modules.vision;
package co.fantabos.bscv.module.vision;
import java.awt.event.KeyEvent;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.StringArgumentType;
@ -10,15 +12,15 @@ import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import co.fantabos.bscv.Module;
import co.fantabos.bscv.module.QuickModule;
import co.fantabos.bscv.BoSCoVicino;
public class Fullbright extends Module {
public class Fullbright extends QuickModule {
private final ForgeConfigSpec.ConfigValue<String> mode;
public Fullbright(ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
super("Fullbright", Group.VISION, builder, dispatcher);
super("Fullbright", Group.VISION, KeyEvent.VK_V, builder, dispatcher);
this.mode = this.option(
"mode", "either potion or potion", "potion",