summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
author alemi <me@alemi.dev>2023-02-27 23:25:07 +0100
committer alemi <me@alemi.dev>2023-02-27 23:26:08 +0100
commitacf78a429a495920b4f8a287d30d230d829a19cf (patch)
tree077ce888368e35a16f597ea58158e8310f3c9505 /src/main/java
parent5b14b18d62c1bb6e5add71e32b570cb99208a80b (diff)
fix: proper namespacing of settings commands
ugly botch because I forgot about this, TODO!
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/ftbsc/bscv/modules/HudModule.java8
-rw-r--r--src/main/java/ftbsc/bscv/modules/defense/Aura.java4
-rw-r--r--src/main/java/ftbsc/bscv/modules/hud/EntityList.java2
-rw-r--r--src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java8
-rw-r--r--src/main/java/ftbsc/bscv/modules/motion/BoatFly.java12
-rw-r--r--src/main/java/ftbsc/bscv/modules/motion/VanillaFlight.java10
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/AntiHunger.java4
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/AutoDisconnect.java2
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/AutoFish.java4
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/AutoTool.java2
-rw-r--r--src/main/java/ftbsc/bscv/modules/self/Freecam.java6
-rw-r--r--src/main/java/ftbsc/bscv/tools/Setting.java4
12 files changed, 33 insertions, 33 deletions
diff --git a/src/main/java/ftbsc/bscv/modules/HudModule.java b/src/main/java/ftbsc/bscv/modules/HudModule.java
index 8c559fb..4a893fb 100644
--- a/src/main/java/ftbsc/bscv/modules/HudModule.java
+++ b/src/main/java/ftbsc/bscv/modules/HudModule.java
@@ -22,25 +22,25 @@ public abstract class HudModule extends Module {
.name("x")
.comment("horizontal offset")
.fallback(0)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.y = Setting.Number.builder()
.name("y")
.comment("vertical offset")
.fallback(0)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.scale = Setting.Decimal.builder()
.name("scale")
.comment("scale of element")
.fallback(1.0)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.anchor = Setting.Switch.builder(Anchor.class)
.name("anchor")
.comment("origin point for coordinates")
.fallback(Anchor.TOPLEFT)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
protected boolean shouldHide() {
diff --git a/src/main/java/ftbsc/bscv/modules/defense/Aura.java b/src/main/java/ftbsc/bscv/modules/defense/Aura.java
index 4ed4850..0976f22 100644
--- a/src/main/java/ftbsc/bscv/modules/defense/Aura.java
+++ b/src/main/java/ftbsc/bscv/modules/defense/Aura.java
@@ -27,7 +27,7 @@ public class Aura extends QuickModule implements ICommons {
.fallback(5.)
.name("reach")
.comment("aura attack reach")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.strenght = Setting.Decimal.builder()
.min(0.)
@@ -35,7 +35,7 @@ public class Aura extends QuickModule implements ICommons {
.name("strenght")
.comment("minimum strenght required for attack")
.fallback(1.)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/hud/EntityList.java b/src/main/java/ftbsc/bscv/modules/hud/EntityList.java
index b3386fc..ae58ce1 100644
--- a/src/main/java/ftbsc/bscv/modules/hud/EntityList.java
+++ b/src/main/java/ftbsc/bscv/modules/hud/EntityList.java
@@ -33,7 +33,7 @@ public class EntityList extends HudModule implements ICommons {
.name("search")
.comment("highlight names containing this text")
.fallback("")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java
index 7a610a3..934a1d8 100644
--- a/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java
+++ b/src/main/java/ftbsc/bscv/modules/hud/InfoDisplay.java
@@ -51,25 +51,25 @@ public class InfoDisplay extends HudModule implements ICommons {
.name("logo")
.comment("show logo at top of list")
.fallback(true)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.speed = Setting.Bool.builder()
.name("speed")
.comment("show speed meter")
.fallback(true)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.time = Setting.Bool.builder()
.name("time")
.comment("show world time")
.fallback(true)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.hide_effects = Setting.Bool.builder()
.name("hide-effects")
.comment("hide effect icons on top right corner")
.fallback(false)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/motion/BoatFly.java b/src/main/java/ftbsc/bscv/modules/motion/BoatFly.java
index 6597611..ecd1206 100644
--- a/src/main/java/ftbsc/bscv/modules/motion/BoatFly.java
+++ b/src/main/java/ftbsc/bscv/modules/motion/BoatFly.java
@@ -33,38 +33,38 @@ public class BoatFly extends Module implements ICommons {
.fallback(1.)
.name("speed")
.comment("magnitude of boat movement")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.rise = Setting.Decimal.builder()
.min(0.)
.fallback(0.5)
.name("rise")
.comment("vertical speed")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.gravity = Setting.Bool.builder()
.fallback(true)
.name("gravity")
.comment("toggle boat gravity")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.rotation = Setting.Bool.builder()
.fallback(true)
.name("rotation")
.comment("rotate boat with player")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.sprint = Setting.Bool.builder()
.fallback(true)
.name("sprint")
.comment("halve boat speed while not sprinting")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.drift = Setting.Bool.builder()
.fallback(false)
.name("drift")
.comment("allow boat drifting")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/motion/VanillaFlight.java b/src/main/java/ftbsc/bscv/modules/motion/VanillaFlight.java
index 425ba47..7938601 100644
--- a/src/main/java/ftbsc/bscv/modules/motion/VanillaFlight.java
+++ b/src/main/java/ftbsc/bscv/modules/motion/VanillaFlight.java
@@ -32,27 +32,27 @@ public class VanillaFlight extends QuickModule implements ICommons {
.name("force")
.comment("force enable flight on user")
.fallback(false)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.speed = Setting.Decimal.builder()
.min(0.)
.fallback(0.05)
.name("speed")
.comment("flight speed to set")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.antikick = Setting.Bool.builder()
.fallback(false)
.name("antikick")
.comment("prevent vanilla flight kick by descending")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.antikick_magnitude = Setting.Decimal.builder()
.min(0.)
.fallback(1.)
.name("magnitude")
.comment("magnitude of antikick push")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.antikick_cycle = Setting.Number.builder()
.min(0)
@@ -60,7 +60,7 @@ public class VanillaFlight extends QuickModule implements ICommons {
.fallback(0)
.name("cycle")
.comment("how often to run antikick routine")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
private boolean couldFlyBefore = false;
diff --git a/src/main/java/ftbsc/bscv/modules/self/AntiHunger.java b/src/main/java/ftbsc/bscv/modules/self/AntiHunger.java
index 1978d6e..f511e1e 100644
--- a/src/main/java/ftbsc/bscv/modules/self/AntiHunger.java
+++ b/src/main/java/ftbsc/bscv/modules/self/AntiHunger.java
@@ -25,13 +25,13 @@ public class AntiHunger extends Module implements ICommons {
.fallback(true)
.name("sprint")
.comment("mask sprint toggle packets")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.hover = Setting.Bool.builder()
.name("hover")
.comment("mark as not on-ground while walking")
.fallback(true)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/self/AutoDisconnect.java b/src/main/java/ftbsc/bscv/modules/self/AutoDisconnect.java
index 6010523..81b9f66 100644
--- a/src/main/java/ftbsc/bscv/modules/self/AutoDisconnect.java
+++ b/src/main/java/ftbsc/bscv/modules/self/AutoDisconnect.java
@@ -24,7 +24,7 @@ public class AutoDisconnect extends Module implements ICommons {
.fallback(10.)
.name("threshold")
.comment("hp below which connection should be closed")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/self/AutoFish.java b/src/main/java/ftbsc/bscv/modules/self/AutoFish.java
index 9b8dbdc..900cbd0 100644
--- a/src/main/java/ftbsc/bscv/modules/self/AutoFish.java
+++ b/src/main/java/ftbsc/bscv/modules/self/AutoFish.java
@@ -27,13 +27,13 @@ public class AutoFish extends Module implements ICommons {
.name("recast")
.comment("automatically recast hook after fishing")
.fallback(false)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.delay = Setting.Number.builder()
.fallback(2500)
.name("delay")
.comment("how long in ms to wait before recasting hook")
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/modules/self/AutoTool.java b/src/main/java/ftbsc/bscv/modules/self/AutoTool.java
index 4abd8e7..3f0c2ab 100644
--- a/src/main/java/ftbsc/bscv/modules/self/AutoTool.java
+++ b/src/main/java/ftbsc/bscv/modules/self/AutoTool.java
@@ -28,7 +28,7 @@ public class AutoTool extends Module implements ICommons {
.name("limit")
.comment("durability limit for tools, set to 0 to destroy them")
.fallback(1)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
private boolean itemIsTooDamaged(ItemStack item) {
diff --git a/src/main/java/ftbsc/bscv/modules/self/Freecam.java b/src/main/java/ftbsc/bscv/modules/self/Freecam.java
index 78312d3..fd22d9d 100644
--- a/src/main/java/ftbsc/bscv/modules/self/Freecam.java
+++ b/src/main/java/ftbsc/bscv/modules/self/Freecam.java
@@ -36,19 +36,19 @@ public class Freecam extends QuickModule implements ICommons {
.name("log")
.comment("log canceled packets")
.fallback(false)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.speed = Setting.Decimal.builder()
.name("speed")
.comment("flight speed in freecam")
.fallback(0.05)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
this.drift = Setting.Bool.builder()
.name("drift")
.comment("allow inertia drift in freecam")
.fallback(true)
- .build(builder, dispatcher);
+ .build(this.name, builder, dispatcher);
}
@SubscribeEvent
diff --git a/src/main/java/ftbsc/bscv/tools/Setting.java b/src/main/java/ftbsc/bscv/tools/Setting.java
index 7531e81..21f5501 100644
--- a/src/main/java/ftbsc/bscv/tools/Setting.java
+++ b/src/main/java/ftbsc/bscv/tools/Setting.java
@@ -50,11 +50,11 @@ public abstract class Setting<T> {
abstract Class<T> clazz();
- public ForgeConfigSpec.ConfigValue<T> build(ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
+ public ForgeConfigSpec.ConfigValue<T> build(String scope, ForgeConfigSpec.Builder builder, CommandDispatcher<CommandSource> dispatcher) {
ForgeConfigSpec.ConfigValue<T> conf = this.value(builder);
dispatcher.register(
- Commands.literal(this.name.get().toLowerCase())
+ Commands.literal(scope.toLowerCase())
.then(
Commands.literal(this.name.get())
.then(