Skip to content

Commit

Permalink
Merge pull request #53 from SleepingPig35/master
Browse files Browse the repository at this point in the history
Make every module in the fun category it's own file
  • Loading branch information
xia-mc authored Jul 8, 2024
2 parents 90c038b + b8dded6 commit 8be8bdb
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 183 deletions.
10 changes: 5 additions & 5 deletions src/main/java/keystrokesmod/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import keystrokesmod.module.impl.client.CommandLine;
import keystrokesmod.module.impl.client.*;
import keystrokesmod.module.impl.combat.*;
import keystrokesmod.module.impl.fun.Fun;
import keystrokesmod.module.impl.fun.*;
import keystrokesmod.module.impl.minigames.*;
import keystrokesmod.module.impl.movement.*;
import keystrokesmod.module.impl.other.*;
Expand Down Expand Up @@ -150,13 +150,13 @@ public void register() {
this.addModule(murderMystery = new MurderMystery());
this.addModule(new keystrokesmod.script.Manager());
this.addModule(new SumoFences());
this.addModule(new Fun.ExtraBobbing());
this.addModule(new ExtraBobbing());
this.addModule(killAura = new KillAura());
this.addModule(new Fun.FlameTrail());
this.addModule(new Fun.SlyPort());
this.addModule(new FlameTrail());
this.addModule(new SlyPort());
this.addModule(new ItemESP());
this.addModule(new MobESP());
this.addModule(new Fun.Spin());
this.addModule(new Spin());
this.addModule(new NoRotate());
this.addModule(new FakeChat());
this.addModule(nameHider = new NameHider());
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/keystrokesmod/module/impl/fun/ExtraBobbing.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package keystrokesmod.module.impl.fun;

import keystrokesmod.module.Module;
import keystrokesmod.module.setting.impl.SliderSetting;
import net.minecraft.client.entity.EntityPlayerSP;

public class ExtraBobbing extends Module {
public SliderSetting level;
private boolean b;

public ExtraBobbing() {
super("Extra Bobbing", Module.category.fun, 0);
this.registerSetting(level = new SliderSetting("Level", 1.0D, 0.0D, 8.0D, 0.1D));
}

public void onEnable() {
this.b = mc.gameSettings.viewBobbing;
if (!this.b) {
mc.gameSettings.viewBobbing = true;
}

}

public void onDisable() {
mc.gameSettings.viewBobbing = this.b;
}

public void onUpdate() {
if (!mc.gameSettings.viewBobbing) {
mc.gameSettings.viewBobbing = true;
}

if (mc.thePlayer.movementInput.moveForward != 0.0F || mc.thePlayer.movementInput.moveStrafe != 0.0F) {
EntityPlayerSP var10000 = mc.thePlayer;
var10000.cameraYaw = (float) ((double) var10000.cameraYaw + level.getInput() / 2.0D);
}
}
}
22 changes: 22 additions & 0 deletions src/main/java/keystrokesmod/module/impl/fun/FlameTrail.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package keystrokesmod.module.impl.fun;

import keystrokesmod.module.Module;
import keystrokesmod.module.setting.impl.SliderSetting;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Vec3;

public class FlameTrail extends Module {
public SliderSetting a;

public FlameTrail() {
super("Flame Trail", Module.category.fun, 0);
}

public void onUpdate() {
Vec3 vec = mc.thePlayer.getLookVec();
double x = mc.thePlayer.posX - vec.xCoord * 2.0D;
double y = mc.thePlayer.posY + ((double) mc.thePlayer.getEyeHeight() - 0.2D);
double z = mc.thePlayer.posZ - vec.zCoord * 2.0D;
mc.thePlayer.worldObj.spawnParticle(EnumParticleTypes.FLAME, x, y, z, 0.0D, 0.0D, 0.0D, new int[]{0});
}
}
178 changes: 0 additions & 178 deletions src/main/java/keystrokesmod/module/impl/fun/Fun.java

This file was deleted.

88 changes: 88 additions & 0 deletions src/main/java/keystrokesmod/module/impl/fun/SlyPort.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
package keystrokesmod.module.impl.fun;

import keystrokesmod.module.Module;
import keystrokesmod.module.impl.world.AntiBot;
import keystrokesmod.module.setting.impl.ButtonSetting;
import keystrokesmod.module.setting.impl.DescriptionSetting;
import keystrokesmod.module.setting.impl.SliderSetting;
import keystrokesmod.utility.Utils;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;

import java.util.Iterator;

public class SlyPort extends Module {
public DescriptionSetting f;
public SliderSetting r;
public ButtonSetting b;
public ButtonSetting playersOnly;
public ButtonSetting e;
private boolean s = false;

public SlyPort() {
super("SlyPort", Module.category.fun, 0);
this.registerSetting(f = new DescriptionSetting("Teleport behind enemies."));
this.registerSetting(r = new SliderSetting("Range", 6.0D, 2.0D, 15.0D, 1.0D));
this.registerSetting(e = new ButtonSetting("Aim", true));
this.registerSetting(b = new ButtonSetting("Play sound", true));
this.registerSetting(playersOnly = new ButtonSetting("Players only", true));
}

public void onEnable() {
Entity en = this.ge();
if (en != null) {
this.tp(en);
}

this.disable();
}

private void tp(Entity en) {
if (b.isToggled()) {
mc.thePlayer.playSound("mob.endermen.portal", 1.0F, 1.0F);
}

Vec3 vec = en.getLookVec();
double x = en.posX - vec.xCoord * 2.5D;
double z = en.posZ - vec.zCoord * 2.5D;
mc.thePlayer.setPosition(x, mc.thePlayer.posY, z);
if (e.isToggled()) {
Utils.aim(en, 0.0F, false);
}

}

private Entity ge() {
Entity en = null;
double r = Math.pow(this.r.getInput(), 2.0D);
double dist = r + 1.0D;
Iterator var6 = mc.theWorld.loadedEntityList.iterator();

while (true) {
Entity ent;
do {
do {
do {
do {
if (!var6.hasNext()) {
return en;
}

ent = (Entity) var6.next();
} while (ent == mc.thePlayer);
} while (!(ent instanceof EntityLivingBase));
} while (((EntityLivingBase) ent).deathTime != 0);
} while (this.playersOnly.isToggled() && !(ent instanceof EntityPlayer));

if (!AntiBot.isBot(ent)) {
double d = mc.thePlayer.getDistanceSqToEntity(ent);
if (!(d > r) && !(dist < d)) {
dist = d;
en = ent;
}
}
}
}
}
Loading

0 comments on commit 8be8bdb

Please sign in to comment.