From 1ee3734bd1d382ef22f4990d60f6f0d2ac770767 Mon Sep 17 00:00:00 2001 From: majorsopa <73245063+majorsopa@users.noreply.github.com> Date: Fri, 11 Jun 2021 17:10:32 -0400 Subject: [PATCH 1/3] fix nuker crash --- .../frostburn/module/modules/misc/Nuker.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/evaan/frostburn/module/modules/misc/Nuker.java b/src/main/java/com/evaan/frostburn/module/modules/misc/Nuker.java index 05966d9..5f25d7b 100644 --- a/src/main/java/com/evaan/frostburn/module/modules/misc/Nuker.java +++ b/src/main/java/com/evaan/frostburn/module/modules/misc/Nuker.java @@ -79,16 +79,19 @@ public void onUpdate() { } } - if (faceBlock.getValue()) { - mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, Vec3d.of(blocks.get(0))); - } - Iterator blocksIter = blocks.iterator(); - for (int j = 0; j < blocks.size(); j++) { - if (j < blocksToMine.getValue() && blocksIter.hasNext()) { - breakBlock(blocksIter.next()); - } else { - break; + if (blocks.size() > 0) { + if (faceBlock.getValue()) { + mc.player.lookAt(EntityAnchorArgumentType.EntityAnchor.EYES, Vec3d.of(blocks.get(0))); + } + + Iterator blocksIter = blocks.iterator(); + for (int j = 0; j < blocks.size(); j++) { + if (j < blocksToMine.getValue() && blocksIter.hasNext()) { + breakBlock(blocksIter.next()); + } else { + break; + } } } From 53356dc10f1df4f1a1b116ce7c1fb933c91427f2 Mon Sep 17 00:00:00 2001 From: majorsopa <73245063+majorsopa@users.noreply.github.com> Date: Fri, 11 Jun 2021 17:10:39 -0400 Subject: [PATCH 2/3] add fly --- .../evaan/frostburn/module/ModuleManager.java | 6 ++-- .../module/modules/movement/Fly.java | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java diff --git a/src/main/java/com/evaan/frostburn/module/ModuleManager.java b/src/main/java/com/evaan/frostburn/module/ModuleManager.java index bd3d9c9..8151e45 100644 --- a/src/main/java/com/evaan/frostburn/module/ModuleManager.java +++ b/src/main/java/com/evaan/frostburn/module/ModuleManager.java @@ -2,10 +2,7 @@ import com.evaan.frostburn.module.modules.combat.*; import com.evaan.frostburn.module.modules.misc.*; -import com.evaan.frostburn.module.modules.movement.Jesus; -import com.evaan.frostburn.module.modules.movement.NoFall; -import com.evaan.frostburn.module.modules.movement.SafeWalk; -import com.evaan.frostburn.module.modules.movement.Sprint; +import com.evaan.frostburn.module.modules.movement.*; import com.evaan.frostburn.module.modules.render.*; import java.util.ArrayList; @@ -50,6 +47,7 @@ public static void init() { modules.add(new CleanChat()); modules.add(new MiddleClick()); modules.add(new ImGuiMod()); + modules.add(new Fly()); modules.sort(Comparator.comparing(object -> object.name)); //sort the modules alphabetically } diff --git a/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java b/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java new file mode 100644 index 0000000..42f63af --- /dev/null +++ b/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java @@ -0,0 +1,29 @@ +package com.evaan.frostburn.module.modules.movement; + +import com.evaan.frostburn.module.Module; +import net.minecraft.entity.player.PlayerAbilities; + +public class Fly extends Module { + public Fly() {super("Fly", Module.Category.MOVEMENT);} + + @Override + public void onUpdate() { + assert mc.player != null; + + PlayerAbilities abilities = mc.player.getAbilities(); + abilities.flying = true; + + mc.player.sendAbilitiesUpdate(); + } + + @Override + public void onDisable() { + assert mc.player != null; + + PlayerAbilities abilities = mc.player.getAbilities(); + abilities.flying = false; + + mc.player.sendAbilitiesUpdate(); + + } +} From 754003f102d608299955b36f7974d9cf833db749 Mon Sep 17 00:00:00 2001 From: majorsopa <73245063+majorsopa@users.noreply.github.com> Date: Fri, 11 Jun 2021 18:00:05 -0400 Subject: [PATCH 3/3] add fly settings --- .../frostburn/module/modules/movement/Fly.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java b/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java index 42f63af..da5f855 100644 --- a/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java +++ b/src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java @@ -1,11 +1,22 @@ package com.evaan.frostburn.module.modules.movement; import com.evaan.frostburn.module.Module; +import com.evaan.frostburn.util.Setting; import net.minecraft.entity.player.PlayerAbilities; public class Fly extends Module { public Fly() {super("Fly", Module.Category.MOVEMENT);} + Setting speed = register( + new Setting( + "Speed", + this, + 100f, + 1f, + 500f + ) + ); + @Override public void onUpdate() { assert mc.player != null; @@ -13,6 +24,8 @@ public void onUpdate() { PlayerAbilities abilities = mc.player.getAbilities(); abilities.flying = true; + abilities.setFlySpeed(speed.getValue() / 5000); + mc.player.sendAbilitiesUpdate(); }