Skip to content

Commit

Permalink
Implemented new settings builders in AntiKnockback
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonk9043 committed Sep 21, 2024
1 parent 2ae2e14 commit 75fb318
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/main/java/net/aoba/module/modules/combat/AntiKnockback.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,25 @@

public class AntiKnockback extends Module implements ReceivePacketListener {

private FloatSetting horizontal;
private FloatSetting vertical;
private FloatSetting horizontal = FloatSetting.builder()
.id("antiknockback_horizontal")
.displayName("Horizontal")
.description("Horizontal Velocity")
.defaultValue(0f)
.minValue(0f)
.maxValue(1f)
.step(0.01f)
.build();

private FloatSetting vertical= FloatSetting.builder()
.id("antiknockback_vertical")
.displayName("Vertical")
.description("Vertical Velocity")
.defaultValue(0f)
.minValue(0f)
.maxValue(1f)
.step(0.01f)
.build();

public AntiKnockback() {
super(KeybindSetting.builder().id("key.antiknockback").displayName("AntiKnockback Key").defaultValue(InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0)).build());
Expand All @@ -49,9 +66,6 @@ public AntiKnockback() {
this.setCategory(Category.of("Combat"));
this.setDescription("Prevents knockback.");

horizontal = new FloatSetting("killaura_horizontal", "Horizontal", "Horizontal Velocity", 0f, 0f, 1f, 0.01f);
vertical = new FloatSetting("killaura_vertical", "Vertical", "Vertical Velocity", 0f, 0f, 1f, 0.01f);

this.addSetting(horizontal);
this.addSetting(vertical);
}
Expand Down

0 comments on commit 75fb318

Please sign in to comment.