<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kotlin&#x2F;Java]]></title><description><![CDATA[Kotlin&#x2F;Java]]></description><link>https://forum.liquidbounce.net/category/17</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Mar 2026 08:02:54 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/category/17.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Feb 2026 12:10:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Import net.minecraft]]></title><description><![CDATA[<p dir="auto">I've modified LiquidBounce, but when I try to import net.minecraft.text.Text or something similar, it says it's missing. What's wrong? I've seen mods on Modrinth that can be built with it. I'm a beginner.</p>
]]></description><link>https://forum.liquidbounce.net/topic/8607/import-net.minecraft</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/8607/import-net.minecraft</guid><dc:creator><![CDATA[phuduong]]></dc:creator><pubDate>Mon, 02 Feb 2026 12:10:21 GMT</pubDate></item><item><title><![CDATA[How to fix my vscode?]]></title><description><![CDATA[<p dir="auto">I tried to edit liquidbouce with vscode. Unluckly, it con't resolve net.ccbluex.liquidbounce.LiquidBounce (The import net.ccbluex.liquidbounce.LiquidBounce cannot be resolved).How can i fix it?</p>
]]></description><link>https://forum.liquidbounce.net/topic/8501/how-to-fix-my-vscode</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/8501/how-to-fix-my-vscode</guid><dc:creator><![CDATA[uright]]></dc:creator><pubDate>Sun, 08 Jun 2025 02:17:40 GMT</pubDate></item><item><title><![CDATA[что делать если пишет это ?]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1737105836055-ffa70162-8be9-4312-9b59-d3a3d4d500ae-image.png" alt="ffa70162-8be9-4312-9b59-d3a3d4d500ae-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.liquidbounce.net/topic/8397/что-делать-если-пишет-это</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/8397/что-делать-если-пишет-это</guid><dc:creator><![CDATA[superpro900]]></dc:creator><pubDate>Fri, 17 Jan 2025 09:23:58 GMT</pubDate></item><item><title><![CDATA[I won&#x27;t add features How to add to the next generation of liquidbonuce]]></title><description><![CDATA[Learn programming.
]]></description><link>https://forum.liquidbounce.net/topic/8363/i-won-t-add-features-how-to-add-to-the-next-generation-of-liquidbonuce</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/8363/i-won-t-add-features-how-to-add-to-the-next-generation-of-liquidbonuce</guid><dc:creator><![CDATA[kawaiinekololis]]></dc:creator><pubDate>Fri, 22 Nov 2024 11:39:13 GMT</pubDate></item><item><title><![CDATA[imports cannot be resolved]]></title><description><![CDATA[<p dir="auto">Hello I have done all the steps to installing liquid:<br />
Clone the repository using git clone --recurse-submodules <a href="https://github.com/CCBlueX/LiquidBounce" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/CCBlueX/LiquidBounce</a>.<br />
CD into the local repository.<br />
Run ./gradlew genSources.<br />
Open the folder as a Gradle project in your preferred IDE.</p>
<p dir="auto">I import the project in Eclipse with Gradle and it sets up, after it is done I see that all the classes in /src/main/java<br />
have an error of imports (example: The import net.ccbluex.liquidbounce.features.module.modules.exploit.ModuleGhostHand cannot be resolved).</p>
<p dir="auto">Im using java 20.0.2, gradle 8.6 and eclipse 2023-12</p>
<p dir="auto">How can I fix this? Ive tried reinstalling 3 times already...<br />
If i understand correctly, the java classes are not finding the kotlin classes??</p>
]]></description><link>https://forum.liquidbounce.net/topic/7979/imports-cannot-be-resolved</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7979/imports-cannot-be-resolved</guid><dc:creator><![CDATA[LukaDimtrijevic]]></dc:creator><pubDate>Thu, 22 Feb 2024 15:16:31 GMT</pubDate></item><item><title><![CDATA[Simple KillAura]]></title><description><![CDATA[MathHelper.clamp_float(mc.thePlayer.rotationPitch, 10F, 64F) are shit, everybody should remove it
]]></description><link>https://forum.liquidbounce.net/topic/7977/simple-killaura</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7977/simple-killaura</guid><dc:creator><![CDATA[1234567890i]]></dc:creator><pubDate>Tue, 20 Feb 2024 13:33:03 GMT</pubDate></item><item><title><![CDATA[There is an error in the MixinEntity.java file.(MixinEntity.java中有个错误)]]></title><description><![CDATA[<p dir="auto">package net.ccbluex.liquidbounce.injection.forge.mixins.entity;</p>
<p dir="auto">import net.ccbluex.liquidbounce.injection.implementations.IMixinEntity;<br />
import net.ccbluex.liquidbounce.event.EventManager;<br />
import net.ccbluex.liquidbounce.event.StrafeEvent;<br />
import net.ccbluex.liquidbounce.features.module.modules.combat.HitBox;<br />
import net.ccbluex.liquidbounce.features.module.modules.exploit.NoPitchLimit;<br />
import net.ccbluex.liquidbounce.features.module.modules.movement.NoFluid;<br />
import net.minecraft.block.Block;<br />
import net.minecraft.block.material.Material;<br />
import net.minecraft.crash.CrashReportCategory;<br />
import net.minecraft.entity.Entity;<br />
import net.minecraft.util.AxisAlignedBB;<br />
import net.minecraft.util.BlockPos;<br />
import net.minecraft.util.Vec3;<br />
import net.minecraft.world.World;<br />
import net.minecraftforge.fml.relauncher.Side;<br />
import net.minecraftforge.fml.relauncher.SideOnly;<br />
import org.spongepowered.asm.mixin.Mixin;<br />
import org.spongepowered.asm.mixin.Shadow;<br />
import <a href="http://org.spongepowered.asm.mixin.injection.At" target="_blank" rel="noopener noreferrer nofollow ugc">org.spongepowered.asm.mixin.injection.At</a>;<br />
import org.spongepowered.asm.mixin.injection.Inject;<br />
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;<br />
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;</p>
<p dir="auto">import java.util.Random;<br />
import java.util.UUID;</p>
<p dir="auto">import static <a href="http://net.ccbluex.liquidbounce.utils.MinecraftInstance.mc" target="_blank" rel="noopener noreferrer nofollow ugc">net.ccbluex.liquidbounce.utils.MinecraftInstance.mc</a>;</p>
<p dir="auto">@Mixin(Entity.class)<br />
@SideOnly(Side.CLIENT)<br />
public abstract class MixinEntity implements IMixinEntity {</p>
<pre><code>@Shadow
public double posX;

@Shadow
public double posY;

@Shadow
public double posZ;

private double trueX;

public double getTrueX() {
    return trueX;
}

public void setTrueX(double x) {
    trueX = x;
}

private double trueY;

public double getTrueY() {
    return trueY;
}

public void setTrueY(double y) {
    trueY = y;
}

private double trueZ;

public double getTrueZ() {
    return trueZ;
}

public void setTrueZ(double z) {
    trueZ = z;
}

private boolean truePos;

public boolean getTruePos() {
    return truePos;
}

public void setTruePos(boolean set) {
    truePos = set;
}

@Shadow
public abstract boolean isSprinting();

@Shadow
public float rotationPitch;

@Shadow
public float rotationYaw;

@Shadow
public abstract AxisAlignedBB getEntityBoundingBox();

@Shadow
public Entity ridingEntity;

@Shadow
public double motionX;

@Shadow
public double motionY;

@Shadow
public double motionZ;

@Shadow
public boolean onGround;

@Shadow
public boolean isAirBorne;

@Shadow
public boolean noClip;

@Shadow
public World worldObj;

@Shadow
public void moveEntity(double x, double y, double z) {
}

@Shadow
public boolean isInWeb;

@Shadow
public float stepHeight;

@Shadow
public boolean isCollidedHorizontally;

@Shadow
public boolean isCollidedVertically;

@Shadow
public boolean isCollided;

@Shadow
public float distanceWalkedModified;

@Shadow
public float distanceWalkedOnStepModified;

@Shadow
public abstract boolean isInWater();

@Shadow
protected Random rand;

@Shadow
public int fireResistance;

@Shadow
protected boolean inPortal;

@Shadow
public int timeUntilPortal;

@Shadow
public float width;

@Shadow
public abstract boolean isRiding();

@Shadow
public abstract void setFire(int seconds);

@Shadow
protected abstract void dealFireDamage(int amount);

@Shadow
public abstract boolean isWet();

@Shadow
public abstract void addEntityCrashInfo(CrashReportCategory category);

@Shadow
protected abstract void doBlockCollisions();

@Shadow
protected abstract void playStepSound(BlockPos pos, Block blockIn);

@Shadow
public abstract void setEntityBoundingBox(AxisAlignedBB bb);

@Shadow
private int nextStepDistance;

@Shadow
private int fire;

@Shadow
public float prevRotationPitch;

@Shadow
public float prevRotationYaw;

@Shadow
protected abstract Vec3 getVectorForRotation(float pitch, float yaw);

@Shadow
public abstract UUID getUniqueID();

@Shadow
public abstract boolean isSneaking();

@Shadow
public abstract boolean isInsideOfMaterial(Material materialIn);

public int getNextStepDistance() {
    return nextStepDistance;
}

public void setNextStepDistance(int nextStepDistance) {
    this.nextStepDistance = nextStepDistance;
}

public int getFire() {
    return fire;
}

@Inject(method = "getCollisionBorderSize", at = @At("HEAD"), cancellable = true)
private void getCollisionBorderSize(final CallbackInfoReturnable&lt;Float&gt; callbackInfoReturnable) {
    final HitBox hitBox = HitBox.INSTANCE;

    if (hitBox.handleEvents())
        callbackInfoReturnable.setReturnValue(0.1F + hitBox.determineSize((Entity) (Object) this));
}

@Inject(method = "setAngles", at = @At("HEAD"), cancellable = true)
private void setAngles(final float yaw, final float pitch, final CallbackInfo callbackInfo) {
    if (NoPitchLimit.INSTANCE.handleEvents()) {
        callbackInfo.cancel();

        prevRotationYaw = rotationYaw;
        prevRotationPitch = rotationPitch;

        rotationYaw += yaw * 0.15f;
        rotationPitch -= pitch * 0.15f;
    }
}

@Inject(method = "moveFlying", at = @At("HEAD"), cancellable = true)
private void handleRotations(float strafe, float forward, float friction, final CallbackInfo callbackInfo) {
    //noinspection ConstantConditions
    if ((Object) this != mc.thePlayer) return;

    final StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , );
    EventManager.INSTANCE.callEvent(strafeEvent);

    if (strafeEvent.isCancelled()) callbackInfo.cancel();
}

@Inject(method = "isInWater", at = @At("HEAD"), cancellable = true)
private void isInWater(final CallbackInfoReturnable&lt;Boolean&gt; cir) {
    if (NoFluid.INSTANCE.handleEvents() &amp;&amp; NoFluid.INSTANCE.getWater()) {
        cir.setReturnValue(false);
    }
}

@Inject(method = "isInLava", at = @At("HEAD"), cancellable = true)
private void isInLava(final CallbackInfoReturnable&lt;Boolean&gt; cir) {
    if (NoFluid.INSTANCE.handleEvents() &amp;&amp; NoFluid.INSTANCE.getLava()) {
        cir.setReturnValue(false);
    }
}
</code></pre>
<p dir="auto">}<br />
There is an error on this line.(中这一行出错)<br />
final StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , );<br />
There were no issues during the initial build. However, when I added a new pattern later on, IDEA reported an error and I couldn't figure out the cause. Rebuilding did not solve the problem either.<br />
(刚构建时没有问题.往后我添加新模式时IDEA就报错我无法找到其中的原因.重新构建还是不行)C:\Users\XHG_Gmy\Desktop\Ghostclitent\LiquidLite\build\sources\main\java\net\ccbluex\liquidbounce\injection\forge\mixins\entity\MixinEntity.java:254: ����: �Ƿ��ı��ʽ��ʼ<br />
final StrafeEvent strafeEvent = new StrafeEvent(strafe, forward, friction, , , , , );</p>
]]></description><link>https://forum.liquidbounce.net/topic/7910/there-is-an-error-in-the-mixinentity-java-file-mixinentity-java中有个错误</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7910/there-is-an-error-in-the-mixinentity-java-file-mixinentity-java中有个错误</guid><dc:creator><![CDATA[kuntaihao]]></dc:creator><pubDate>Thu, 25 Jan 2024 04:01:10 GMT</pubDate></item><item><title><![CDATA[Source Code LiquidBounce b72]]></title><description><![CDATA[it's in intellij source code b 72 coding
]]></description><link>https://forum.liquidbounce.net/topic/7843/source-code-liquidbounce-b72</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7843/source-code-liquidbounce-b72</guid><dc:creator><![CDATA[MrFlame]]></dc:creator><pubDate>Wed, 13 Dec 2023 19:41:58 GMT</pubDate></item><item><title><![CDATA[How to package the JAVA folder and make it a jar.]]></title><description><![CDATA[<p dir="auto">How to package the JAVA folder and make it a jar.<br />
IDEA and Vscode?</p>
]]></description><link>https://forum.liquidbounce.net/topic/7825/how-to-package-the-java-folder-and-make-it-a-jar</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7825/how-to-package-the-java-folder-and-make-it-a-jar</guid><dc:creator><![CDATA[moonoon]]></dc:creator><pubDate>Sun, 26 Nov 2023 12:46:57 GMT</pubDate></item><item><title><![CDATA[[Request] How to add Оptifin to a project]]></title><description><![CDATA[@Zhao-Yun

U threw optifine to the wrong folder.
U can't use optifine in intelij idea unless u somehow remake it to not crash.
Run ur liquidbounce without intelij idea when u finish making what u want.

]]></description><link>https://forum.liquidbounce.net/topic/7810/request-how-to-add-оptifin-to-a-project</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7810/request-how-to-add-оptifin-to-a-project</guid><dc:creator><![CDATA[WaterFlex Gaming]]></dc:creator><pubDate>Wed, 15 Nov 2023 10:24:16 GMT</pubDate></item><item><title><![CDATA[How do I fix these errors?]]></title><description><![CDATA[@mems Lad's lost in time, just wait for him to come back. He's Brazilian, my trick always works for them.
]]></description><link>https://forum.liquidbounce.net/topic/7782/how-do-i-fix-these-errors</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7782/how-do-i-fix-these-errors</guid><dc:creator><![CDATA[Gabriel]]></dc:creator><pubDate>Sat, 21 Oct 2023 16:55:18 GMT</pubDate></item><item><title><![CDATA[Please tutrorial src LiquidX Idea]]></title><description><![CDATA[@qeekD We didn't make LiquidX, stop asking.
]]></description><link>https://forum.liquidbounce.net/topic/7748/please-tutrorial-src-liquidx-idea</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7748/please-tutrorial-src-liquidx-idea</guid><dc:creator><![CDATA[Gabriel]]></dc:creator><pubDate>Mon, 25 Sep 2023 16:25:20 GMT</pubDate></item><item><title><![CDATA[Who can make a video how to run src LiquidX]]></title><description><![CDATA[@qeekD Spamming does not help, stop doing this…
]]></description><link>https://forum.liquidbounce.net/topic/7749/who-can-make-a-video-how-to-run-src-liquidx</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7749/who-can-make-a-video-how-to-run-src-liquidx</guid><dc:creator><![CDATA[Gabriel]]></dc:creator><pubDate>Mon, 25 Sep 2023 16:23:00 GMT</pubDate></item><item><title><![CDATA[how to build liquidbounce in Eclipse]]></title><description><![CDATA[@Gabriel nah, just execute the same commands as with intellij installation and then open the folder with eclipse
]]></description><link>https://forum.liquidbounce.net/topic/7728/how-to-build-liquidbounce-in-eclipse</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7728/how-to-build-liquidbounce-in-eclipse</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Sat, 16 Sep 2023 13:47:24 GMT</pubDate></item><item><title><![CDATA[Reflector ReflectionHelper]]></title><description><![CDATA[@Zhao-Yun ?
]]></description><link>https://forum.liquidbounce.net/topic/7726/reflector-reflectionhelper</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7726/reflector-reflectionhelper</guid><dc:creator><![CDATA[Zhao Yun]]></dc:creator><pubDate>Sat, 16 Sep 2023 11:45:59 GMT</pubDate></item><item><title><![CDATA[Draw MainMenu]]></title><description><![CDATA[@mike-melony
Minecraft.getMinecraft().getTextureManager().bindTexture();
Gui.drawScaledCustomSizeModalRect();
]]></description><link>https://forum.liquidbounce.net/topic/7719/draw-mainmenu</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7719/draw-mainmenu</guid><dc:creator><![CDATA[Plumer Man]]></dc:creator><pubDate>Sat, 09 Sep 2023 11:20:04 GMT</pubDate></item><item><title><![CDATA[[TUTORIAL] How to add a basic speed mode]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/1608/support-how-to-make-a-basic-speed-mode">[SUPPORT] How to make a basic speed mode?</a><br />
Since this post, I have gotten way better at coding, and can explain some things about how to make speed modes. Ok, so first, you have to choose which folder you're going to use, or if you're going to make a new one.<br />
For an example, I'm going to choose to make it in the “other” folder, since that's really used anyway. I'm going to name the file “Strafe” with the Kotlin file extension, so it's going to be “Strafe.kt”.<br />
Here's how the file's going to start:</p>
<pre><code>/*
 * LiquidBounce Hacked Client
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
 * https://github.com/CCBlueX/LiquidBounce/
 */
</code></pre>
<p dir="auto">Now, I'm going to set the  package used, by adding this:</p>
<pre><code>package net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.other
</code></pre>
<p dir="auto">Now, we want to get the proper imports (to be able to add the stuff), so, we're going to have to add those imports (you only have to add the ones you're going to use).</p>
<pre><code>import net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.SpeedMode // To register the speed mode
import net.ccbluex.liquidbounce.utils.MovementUtils.isMoving // To check if the player is moving
import net.ccbluex.liquidbounce.utils.MovementUtils.strafe // To make the player strafe
</code></pre>
<p dir="auto">Great, now that we have done that, let's register the speed mode properly; for the example, I'm going to name it “Strafe”, as the file name suggests.</p>
<pre><code>object Strafe : SpeedMode("Strafe")
</code></pre>
<p dir="auto">Now, we have to add the {} at the start and end of the file (DO NOT FORGET THIS).<br />
Since you have done that by now, I'm going to show you the rest of the code, with code commentary.</p>
<pre><code>    override fun onUpdate() {
        if (mc.thePlayer == null) {
            return
        }
        if (mc.thePlayer.onGround &amp;&amp; isMoving) {
            mc.thePlayer.jump()
        }
        strafe()
    }
</code></pre>
<p dir="auto">The full file should look like this:</p>
<pre><code>/*
 * LiquidBounce Hacked Client
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
 * https://github.com/CCBlueX/LiquidBounce/
 */
package net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.other

import net.ccbluex.liquidbounce.features.module.modules.movement.speedmodes.SpeedMode // To register the speed mode
import net.ccbluex.liquidbounce.utils.MovementUtils.isMoving // To check if the player is moving
import net.ccbluex.liquidbounce.utils.MovementUtils.strafe // To make the player strafe

object Strafe : SpeedMode("Strafe") {
    override fun onUpdate() {
        if (mc.thePlayer == null) {
            return
        }
        if (mc.thePlayer.onGround &amp;&amp; isMoving) {
            mc.thePlayer.jump()
        }
        strafe()
    }
}
</code></pre>
<p dir="auto">Now, we have to make the speed mode actually show on Speed. Therefore, we have to access Speed.kt, and add this to line 54: <code>, Strafe</code></p>
<p dir="auto">Now, you are good to go! You have made a speed mode.</p>
]]></description><link>https://forum.liquidbounce.net/topic/7698/tutorial-how-to-add-a-basic-speed-mode</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7698/tutorial-how-to-add-a-basic-speed-mode</guid><dc:creator><![CDATA[Gabriel]]></dc:creator><pubDate>Wed, 23 Aug 2023 16:32:47 GMT</pubDate></item><item><title><![CDATA[My custom lb]]></title><description><![CDATA[@As_pw skid from a skid 
]]></description><link>https://forum.liquidbounce.net/topic/7691/my-custom-lb</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7691/my-custom-lb</guid><dc:creator><![CDATA[Plumer Man]]></dc:creator><pubDate>Fri, 18 Aug 2023 02:25:30 GMT</pubDate></item><item><title><![CDATA[My nextgen is not working]]></title><description><![CDATA[@kawaiinekololis  it didn't work
]]></description><link>https://forum.liquidbounce.net/topic/7664/my-nextgen-is-not-working</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7664/my-nextgen-is-not-working</guid><dc:creator><![CDATA[Emirksi]]></dc:creator><pubDate>Tue, 25 Jul 2023 21:39:40 GMT</pubDate></item><item><title><![CDATA[A targetsrafe you don&#x27;t need to skid FDP. You only need to copy this to your LB src.]]></title><description><![CDATA[<p dir="auto"><strong>Follow me and you can get a targetstrafe like this. <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=2d2252001bf" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></strong></p>
<p dir="auto"><img src="/assets/uploads/files/1690177684813-t_jw6f-x-0y7u0-eumu803.png" alt="$T_JW6F@X}0Y7U0)EUMU803.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1690177725249-fco-s-i01wd1ow-jp-gff.png" alt="FCO~S@I01WD1OW}@}JP%GFF.png" class=" img-fluid img-markdown" /></p>
<p dir="auto"><strong>TargetStrafe.kt</strong></p>
<pre><code>/*
 * A targetstrafe based on Liquidbounce b72 src
 */
package net.ccbluex.liquidbounce.features.module.modules.movement

import net.ccbluex.liquidbounce.LiquidBounce
import net.ccbluex.liquidbounce.event.*
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.features.module.modules.combat.KillAura
import net.ccbluex.liquidbounce.features.module.modules.combat.Velocity
import net.ccbluex.liquidbounce.utils.RotationUtils
import net.ccbluex.liquidbounce.utils.extensions.getDistanceToEntityBox
import net.ccbluex.liquidbounce.value.BoolValue
import net.ccbluex.liquidbounce.value.FloatValue
import net.ccbluex.liquidbounce.value.IntegerValue
import net.ccbluex.liquidbounce.value.ListValue
import net.minecraft.client.Minecraft
import net.minecraft.entity.Entity
import net.minecraft.util.AxisAlignedBB
import org.lwjgl.input.Keyboard
import org.lwjgl.opengl.GL11
import java.awt.Color
import kotlin.math.cos
import kotlin.math.sin

@ModuleInfo(name = "TargetStrafe", description = "Targetstrafe.", category = ModuleCategory.MOVEMENT)
class TargetStrafe : Module() {

    private val godModValue = BoolValue("AutoThirdPersonView", false)
    private val render = ListValue("Render", arrayOf("Circle","Novoline","Pentagon","Pentagram","Heptagonal","Peaceful","Exhi","Off"),"Other")
    private val thicknessValue = FloatValue("Thickness", 2F, 1F, 5F)
    private val radiusValue = FloatValue("Radius", 2.0F, 1.0F, 5.0F)
    private val modeValue = ListValue("KeyMode", arrayOf("Jump", "None"), "None")
    private val radiusMode = ListValue("radiusMode", arrayOf("TrueRadius", "Simple"), "Simple")
    private val side = IntegerValue("ExhiSide",3,3,20)
    private val exhiRect = BoolValue("ExhiRect",false)
    private val onlySpeed = BoolValue("OnlySpeed",false)
    private val damage = BoolValue("DamageStrafe", true)
    private val killAura = LiquidBounce.moduleManager.getModule(KillAura::class.java) as KillAura
    private val speed = LiquidBounce.moduleManager.getModule(Speed::class.java) as Speed
    private val fly = LiquidBounce.moduleManager.getModule(Fly::class.java) as Fly
    var consts = 0
    var lastDist = 0.0
    var silent = false


    @EventTarget
    fun onRender3D(event: Render3DEvent) {

        if (render.get()=="Circle") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            if(speed.state) {
                GL11.glPushMatrix()
                GL11.glDisable(3553)
                GL11.glEnable(2848)
                GL11.glEnable(2881)
                GL11.glEnable(2832)
                GL11.glEnable(3042)
                GL11.glBlendFunc(770, 771)
                GL11.glHint(3154, 4354)
                GL11.glHint(3155, 4354)
                GL11.glHint(3153, 4354)
                GL11.glDisable(2929)
                GL11.glDepthMask(false)
                GL11.glLineWidth(1.0f)
                GL11.glBegin(3)
                val x =
                    target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
                val y =
                    target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
                val z =
                    target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
                for (i in 0..359) {
                    val rainbow = Color(
                        Color.HSBtoRGB(
                            ((mc.thePlayer.ticksExisted / 70.0 + Math.sin(i / 50.0 * 1.75)) % 1.0f).toFloat(),
                            0.7f,
                            1.0f
                        )
                    )
                    GL11.glColor3f(rainbow.red / 255.0f, rainbow.green / 255.0f, rainbow.blue / 255.0f)
                    GL11.glVertex3d(
                        x + radiusValue.get() * Math.cos(i * 6.283185307179586 / 45.0),
                        y,
                        z + radiusValue.get() * Math.sin(i * 6.283185307179586 / 45.0)
                    )
                }
                GL11.glEnd()
                GL11.glDepthMask(true)
                GL11.glEnable(2929)
                GL11.glDisable(2848)
                GL11.glDisable(2881)
                GL11.glEnable(2832)
                GL11.glEnable(3553)
                GL11.glPopMatrix()
            }
        }else if(render.get()=="Pentagon") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(3.5f)
            for (i in 0..360 step 36) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() - 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() - 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 36) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() + 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() + 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 36) {
                GL11.glColor3f(1f,1f,1f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + radiusValue.get() * sin(i * 6.283185307179586 / 45.0)
                )
            }
            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if(render.get()=="Exhi") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ

            if (exhiRect.get()) {
                GL11.glLineWidth(1f)
                for (i in 0..360 step 360 / side.get()) {
                    GL11.glColor3f(0f, 0f, 0f)
                    GL11.glVertex3d(
                        x + (radiusValue.get() + 0.00075) * cos(i * 3.141592653589793 / 180.0),
                        y,
                        z + (radiusValue.get() + 0.00075) * sin(i * 3.141592653589793 / 180.0)
                    )
                }

                for (i in 0..360 step 360 / side.get()) {
                    GL11.glColor3f(0f, 0f, 0f)
                    GL11.glVertex3d(
                        x + (radiusValue.get() - 0.00075) * cos(i * 3.141592653589793 / 180.0),
                        y,
                        z + (radiusValue.get() - 0.00075) * sin(i * 3.141592653589793 / 180.0)
                    )
                }
            }

            GL11.glLineWidth(thicknessValue.get())

            for (i in 0..360 step 360/side.get()) {
                if (canStrafe){
                    GL11.glColor3f(Color.YELLOW.red.toFloat(),Color.YELLOW.green.toFloat(),Color.YELLOW.blue.toFloat())
                }else{
                    GL11.glColor3f(1f,1f,1f)
                }
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 3.141592653589793 / 180.0),
                    y,
                    z + radiusValue.get() * sin(i * 3.141592653589793 / 180.0)
                )
            }

            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if (render.get()=="Pentagram"){
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(3.5f)
            for (i in 0..360 step 360/5) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() - 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() - 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 360/5) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() + 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() + 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 360/5) {
                GL11.glColor3f(1f,1f,1f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + radiusValue.get() * sin(i * 6.283185307179586 / 45.0)
                )
            }
            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if(render.get()=="Pentagon") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(3.5f)
            for (i in 0..360 step 36) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() - 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() - 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 36) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() + 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() + 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 36) {
                GL11.glColor3f(1f,1f,1f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + radiusValue.get() * sin(i * 6.283185307179586 / 45.0)
                )
            }
            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if(render.get()=="Heptagonal") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(3.5f)
            for (i in 0..360 step 360/7) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() - 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() - 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 360/7) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() + 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() + 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360 step 360/7) {
                GL11.glColor3f(1f,1f,1f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + radiusValue.get() * sin(i * 6.283185307179586 / 45.0)
                )
            }
            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if(render.get()=="Novoline") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(3.5f)
            for (i in 0..360) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() - 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() - 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360) {
                GL11.glColor3f(0f,0f,0f)
                GL11.glVertex3d(
                    x + (radiusValue.get() + 0.0075f) * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + (radiusValue.get() + 0.0075f) * sin(i * 6.283185307179586 / 45.0)
                )
            }
            for (i in 0..360) {
                GL11.glColor3f(1f,1f,1f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 6.283185307179586 / 45.0),
                    y,
                    z + radiusValue.get() * sin(i * 6.283185307179586 / 45.0)
                )
            }
            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }else if(render.get()=="Peaceful") {
            if (killAura.target == null) return
            val target = (LiquidBounce.moduleManager[KillAura::class.java] as KillAura).target!!
            GL11.glPushMatrix()
            GL11.glDisable(3553)
            GL11.glEnable(2848)
            GL11.glEnable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3042)
            GL11.glBlendFunc(770, 771)
            GL11.glHint(3154, 4354)
            GL11.glHint(3155, 4354)
            GL11.glHint(3153, 4354)
            GL11.glDisable(2929)
            GL11.glDepthMask(false)
            GL11.glBegin(3)
            val x = target.lastTickPosX + (target.posX - target.lastTickPosX) * event.partialTicks - mc.renderManager.viewerPosX
            val y = target.lastTickPosY + (target.posY - target.lastTickPosY) * event.partialTicks - mc.renderManager.viewerPosY
            val z = target.lastTickPosZ + (target.posZ - target.lastTickPosZ) * event.partialTicks - mc.renderManager.viewerPosZ
            GL11.glLineWidth(1f)
            for (i in 0..360 step 90) {
                val rainbow = Color(
                    Color.HSBtoRGB(
                        ((mc.thePlayer.ticksExisted / 70.0 + Math.sin(i / 50.0 * 1.75)) % 1.0f).toFloat(),
                        0.7f,
                        1.0f
                    )
                )
                GL11.glColor3f(rainbow.red / 255.0f, rainbow.green / 255.0f, rainbow.blue / 255.0f)
                GL11.glVertex3d(
                    x + radiusValue.get() * cos(i * 3.141592653589793 / 180.0),
                    y,
                    z + radiusValue.get() * sin(i * 3.141592653589793 / 180.0)
                )
            }

            GL11.glEnd()
            GL11.glDepthMask(true)
            GL11.glEnable(2929)
            GL11.glDisable(2848)
            GL11.glDisable(2881)
            GL11.glEnable(2832)
            GL11.glEnable(3553)
            GL11.glPopMatrix()
        }

        GL11.glColor3f(1f,1f,1f)
    }
    var direction = 0

    @EventTarget
    fun movestrafe(event: MoveEvent) {
        if (mc.thePlayer.isCollidedHorizontally || checkVoid()) direction = if (direction == 1) -1 else 1
        if (mc.gameSettings.keyBindLeft.isKeyDown) {
            direction = 1
        }
        if (mc.gameSettings.keyBindRight.isKeyDown) {
            direction = -1
        }
        if (!isVoid(0, 0) &amp;&amp; canStrafe) {
            silent = true
            val strafe = RotationUtils.getRotations(killAura.target)
            setSpeed(event,Math.sqrt(Math.pow(event.x, 2.0) + Math.pow(event.z, 2.0)), strafe[0], radiusValue.get(), 1.0)
        }else{
            silent = false
        }

        if (!killAura.state)
            silent = false

        if (!godModValue.get())
            return
        mc.gameSettings.thirdPersonView = if (canStrafe) 3 else 0
    }

    @EventTarget
    fun onStrafe(event: StrafeEvent){
        if (silent &amp;&amp; killAura.state) {
            silent(event)
        }
    }

    val keyMode: Boolean
        get() = when (modeValue.get().toLowerCase()) {
            "jump" -&gt; mc.gameSettings.keyBindJump.isKeyDown &amp;&amp; mc.thePlayer.movementInput.moveStrafe == 0f
            "none" -&gt; mc.thePlayer.movementInput.moveStrafe == 0f || mc.thePlayer.movementInput.moveForward == 0f
            else -&gt; false
        }

    val velocity = Velocity()
    val canStrafe: Boolean
        get() = (killAura.state &amp;&amp; (if (onlySpeed.get()) speed.state else true || fly.state) &amp;&amp; killAura.target != null &amp;&amp; !mc.thePlayer.isSneaking
                &amp;&amp; keyMode &amp;&amp; damagestate())

    val cansize: Float
        get() = when {
            radiusMode.get().toLowerCase() == "simple" -&gt;
                45f / mc.thePlayer!!.getDistance(killAura.target!!.posX, mc.thePlayer!!.posY, killAura.target!!.posZ).toFloat()
            else -&gt; 45f
        }
    val Enemydistance: Double
        get() = mc.thePlayer!!.getDistance(killAura.target!!.posX, mc.thePlayer!!.posY, killAura.target!!.posZ)

    val algorithm: Float
        get() = Math.max(Enemydistance - radiusValue.get(), Enemydistance - (Enemydistance - radiusValue.get() / (radiusValue.get() * 2))).toFloat()


    fun setSpeed(moveEvent: MoveEvent, moveSpeed: Double, pseudoYaw: Float, pseudoStrafe: Float,
                 pseudoForward: Double) {
        var yaw = pseudoYaw
        var forward = pseudoForward
        var strafe = pseudoStrafe
        var strafe2 = 0f

        check()

        when {
            modeValue.get().toLowerCase() == "jump" -&gt;
                strafe = consts.toFloat()//pseudoStrafe * Minecraft.getMinecraft().thePlayer.movementInput.moveStrafe * consts
            modeValue.get().toLowerCase() == "none" -&gt;
                strafe = consts.toFloat()
        }

        if (forward != 0.0) {
            if (strafe &gt; 0.0) {
                if (radiusMode.get().toLowerCase() == "trueradius")
                    yaw += (if (forward &gt; 0.0) -cansize else cansize)
                strafe2 += (if (forward &gt; 0.0) -45 / algorithm else 45 / algorithm)
            } else if (strafe &lt; 0.0) {
                if (radiusMode.get().toLowerCase() == "trueradius")
                    yaw += (if (forward &gt; 0.0) cansize else -cansize)
                strafe2 += (if (forward &gt; 0.0) 45 / algorithm else -45 / algorithm)
            }
            strafe = 0.0f
            if (forward &gt; 0.0)
                forward = 1.0
            else if (forward &lt; 0.0)
                forward = -1.0

        }
        if (strafe &gt; 0.0)
            strafe = 1.0f
        else if (strafe &lt; 0.0)
            strafe = -1.0f


        val mx = Math.cos(Math.toRadians(yaw + 90.0 + strafe2))
        val mz = Math.sin(Math.toRadians(yaw + 90.0 + strafe2))
        moveEvent.x = forward * moveSpeed * mx + strafe * moveSpeed * mz
        moveEvent.z = forward * moveSpeed * mz - strafe * moveSpeed * mx
    }

    private fun check() {
        if (mc.thePlayer!!.isCollidedHorizontally || checkVoid()) {
            if (consts &lt; 2) consts += 1
            else {
                consts = -1
            }
        }
        when (consts) {
            0 -&gt; {
                consts = 1
            }
            2 -&gt; {
                consts = -1
            }
        }
    }

    private fun checkVoid(): Boolean {
        for (x in -1..0) {
            for (z in -1..0) {
                if (isVoid(x, z)) {
                    return true
                }
            }
        }
        return false
    }

    private fun isVoid(X: Int, Z: Int): Boolean {
        val fly = LiquidBounce.moduleManager.getModule(Fly::class.java) as Fly
        if (fly.state) {
            return false
        }
        if (mc.thePlayer!!.posY &lt; 0.0) {
            return true
        }
        var off = 0
        while (off &lt; mc.thePlayer!!.posY.toInt() + 2) {
            val bb: AxisAlignedBB = mc.thePlayer!!.entityBoundingBox.offset(X.toDouble(), (-off).toDouble(), Z.toDouble())
            if (mc.theWorld!!.getCollidingBoundingBoxes(mc.thePlayer as Entity, bb).isEmpty()) {
                off += 2
                continue
            }
            return false
            off += 2
        }
        return true
    }

    private fun silent(event: StrafeEvent){
        killAura.update()
    }

    private fun damagestate() : Boolean{
        return if(damage.get()) mc.thePlayer.hurtTime &gt; 0 else true
    }

}</code></pre>
]]></description><link>https://forum.liquidbounce.net/topic/7662/a-targetsrafe-you-don-t-need-to-skid-fdp-you-only-need-to-copy-this-to-your-lb-src</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7662/a-targetsrafe-you-don-t-need-to-skid-fdp-you-only-need-to-copy-this-to-your-lb-src</guid><dc:creator><![CDATA[Lo1qSk1der]]></dc:creator><pubDate>Mon, 24 Jul 2023 05:52:27 GMT</pubDate></item><item><title><![CDATA[Probelm Editing Sourcecode from LB Legacy]]></title><description><![CDATA[@nowayay you welcome
]]></description><link>https://forum.liquidbounce.net/topic/7657/probelm-editing-sourcecode-from-lb-legacy</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7657/probelm-editing-sourcecode-from-lb-legacy</guid><dc:creator><![CDATA[IFUMLN]]></dc:creator><pubDate>Mon, 17 Jul 2023 17:31:19 GMT</pubDate></item><item><title><![CDATA[[SHOWCASE] Rate my Astolfo ClickGUI]]></title><description><![CDATA[@Parker-Dooley I don't know which one it is, and I don't have the download.
]]></description><link>https://forum.liquidbounce.net/topic/7572/showcase-rate-my-astolfo-clickgui</link><guid isPermaLink="true">https://forum.liquidbounce.net/topic/7572/showcase-rate-my-astolfo-clickgui</guid><dc:creator><![CDATA[Gabriel]]></dc:creator><pubDate>Wed, 19 Apr 2023 12:11:46 GMT</pubDate></item></channel></rss>