Skip to content

Commit

Permalink
Update Kotlin and detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
opZywl committed Nov 17, 2023
1 parent 6ae5d3a commit 281c462
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 25 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
maven { url = "https://jitpack.io/" }
}

version = "5.4.0"
version = "5.5.0"
group = "org.unlegitmc.fdp"
archivesBaseName = "FDPClient"

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs=-Xmx3g
#org.gradle.daemon=false

kotlin_version = 1.6.10
detekt_version = 1.19.0
kotlin_version = 1.9.0-RC
detekt_version = 1.22.0-RC1
forgeVersion=1.8.9-11.15.1.2318-1.8.9
forgegradle_version = f2c5bb338e
mixingradle_version = ae2a80e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class AACv3Longjump : LongJumpMode("AACv3") {
EnumFacing.EAST -> x = +value
EnumFacing.SOUTH -> z = +value
EnumFacing.WEST -> x = -value
EnumFacing.DOWN -> TODO()
EnumFacing.UP -> TODO()
}

mc.thePlayer.setPosition(mc.thePlayer.posX + x, mc.thePlayer.posY, mc.thePlayer.posZ + z)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,13 @@ object Fucker : Module() {
FDPClient.hud.addNotification(Notification(name,"Found first ${getBlockName(targetID)} block at ${nearestBlock!!.x.toInt()} ${nearestBlock!!.y.toInt()} ${nearestBlock!!.z.toInt()}", NotifyType.SUCCESS))
}
if (targetID == 26 && firstPos != null && firstPosBed == null) { // bed
when (true) {
getBlock(firstPos!!.east()) != null && Block.getIdFromBlock(getBlock(firstPos!!.east())!!) == 26 -> firstPosBed = firstPos!!.east()
getBlock(firstPos!!.west()) != null && Block.getIdFromBlock(getBlock(firstPos!!.west())!!) == 26 -> firstPosBed = firstPos!!.west()
getBlock(firstPos!!.south()) != null && Block.getIdFromBlock(getBlock(firstPos!!.south())!!) == 26 -> firstPosBed = firstPos!!.south()
getBlock(firstPos!!.north()) != null && Block.getIdFromBlock(getBlock(firstPos!!.north())!!) == 26 -> firstPosBed = firstPos!!.north()
firstPosBed = when (true) {
(getBlock(firstPos!!.east()) != null && Block.getIdFromBlock(getBlock(firstPos!!.east())!!) == 26) -> firstPos!!.east()
(getBlock(firstPos!!.west()) != null && Block.getIdFromBlock(getBlock(firstPos!!.west())!!) == 26) -> firstPos!!.west()
(getBlock(firstPos!!.south()) != null && Block.getIdFromBlock(getBlock(firstPos!!.south())!!) == 26) -> firstPos!!.south()
(getBlock(firstPos!!.north()) != null && Block.getIdFromBlock(getBlock(firstPos!!.north())!!) == 26) -> firstPos!!.north()
true -> TODO()
false -> TODO()
}
if (firstPosBed != null)
FDPClient.hud.addNotification(Notification(name,"Found second Bed block at ${firstPosBed!!.x.toInt()} ${firstPosBed!!.y.toInt()} ${firstPosBed!!.z.toInt()}", NotifyType.SUCCESS))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,9 @@ protected void mouseReleased(int mouseX, int mouseY, int state) {
searchElement.handleMouseRelease(mouseX, mouseY, state, 230, 50, width - 260, height - 80, categoryElements);
if (!searchElement.isTyping())
for (CategoryElement ce : categoryElements) {
if (ce.getFocused())
ce.handleMouseRelease(mouseX, mouseY, state, 230, 50, width - 260, height - 80);
if (ce.getFocused()) {
ce.handleMouseRelease(mouseX, mouseY, state, 230, 50, width - 260, height - 80);
}
}
super.mouseReleased(mouseX, mouseY, state);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components
package net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components

import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.extensions.animLinear
import net.ccbluex.liquidbounce.utils.render.BlendUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components
package net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components

import net.ccbluex.liquidbounce.ui.client.gui.newVer.ColorManager
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.extensions.animSmooth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components
package net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components

import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.extensions.animLinear
import net.ccbluex.liquidbounce.utils.render.BlendUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module

import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.ui.client.gui.newVer.ColorManager
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components.ToggleSwitch
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components.ToggleSwitch
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.ValueElement
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.impl.BooleanElement
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.impl.ListElement
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.impl

import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components.Checkbox
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components.Checkbox
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.ValueElement
import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.MouseUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.impl

import net.ccbluex.liquidbounce.ui.client.gui.newVer.ColorManager
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components.Slider
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components.Slider
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.ValueElement
import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.MouseUtils
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.impl

import net.ccbluex.liquidbounce.ui.client.gui.newVer.ColorManager
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.components.Slider
import net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.newVer.element.components.Slider
import net.ccbluex.liquidbounce.ui.client.gui.newVer.element.module.value.ValueElement
import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.MouseUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

public class AnimationUtil {
public static float fastmax(float a, float b) {
return (a >= b) ? a : b;
return Math.max(a, b);
}

public static float fastmin(float a, float b) {
return (a <= b) ? a : b;
return Math.min(a, b);
}

public static float moveUD(final float current, final float end, final float smoothSpeed, final float minSpeed) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.ccbluex.liquidbounce.ui.client.gui.clickgui.style.styles.novoline;


import net.ccbluex.liquidbounce.features.module.Module;
import net.ccbluex.liquidbounce.ui.client.gui.ClickGUIModule;
import net.ccbluex.liquidbounce.ui.font.Fonts;
Expand Down Expand Up @@ -51,7 +50,7 @@ public void render(int mouseX, int mouseY) {
y2 += 15;
}
if (index != 0) {
int FPS = Minecraft.getMinecraft().getDebugFPS() == 0 ? 1 : Minecraft.getMinecraft().getDebugFPS();
int FPS = Minecraft.getDebugFPS() == 0 ? 1 : Minecraft.getDebugFPS();
Button b2 = parent.buttons.get(index - 1);
y = b2.y + 15 + animationsize;
if (b2.expand) {
Expand Down Expand Up @@ -104,7 +103,7 @@ private int hudcolorwithalpha() {
//if(HUD.Breathinglamp.get()){

Color Ranbow = new Color(Color.HSBtoRGB(
(float) ((double) Minecraft.getMinecraft().thePlayer.ticksExisted / 50.0 + Math.sin((double) 50 / 50.0 * 1.6))
(float) ((double) Minecraft.getMinecraft().thePlayer.ticksExisted / 50.0 + Math.sin(1.6))
% 1.0f,
0.5f, 1.0f));
return cheat.getState() ? Ranbow.getRGB() : new Color(40,40,40).getRGB();
Expand All @@ -114,7 +113,7 @@ private int hudcolorwithalpha() {
}

private void smoothalphas() {
int FPS = Minecraft.getMinecraft().getDebugFPS() == 0 ? 1 : Minecraft.getMinecraft().getDebugFPS();
int FPS = Minecraft.getDebugFPS() == 0 ? 1 : Minecraft.getDebugFPS();
if (cheat.getState()) {
smoothalpha = (int) AnimationUtil.moveUD(smoothalpha, 255, processFPS(FPS, 1000, 0.013F), processFPS(FPS, 1000, 0.011F));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.awt.*;
import java.util.ArrayList;


public class Window {
public final ModuleCategory category;
public final ArrayList<Button> buttons = Lists.newArrayList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ class Notification(
RenderUtils.drawRoundedCornerRect(4F, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
RenderUtils.drawRoundedCornerRect(5F, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
}

FadeState.END -> TODO()
}
} else {
RenderUtils.drawRoundedCornerRect(0F + 3f, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
Expand All @@ -255,7 +257,7 @@ class Notification(
return false
}

if (style.equals("FDP")) {
if (style == "FDP") {

if (blurRadius != 0f) {
BlurUtils.draw(4 + (x + transX).toFloat() * scale, (y + transY).toFloat() * scale, (width * scale), (27f - 5f) * scale, blurRadius)
Expand All @@ -279,6 +281,8 @@ class Notification(
RenderUtils.drawRoundedCornerRect(4F, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
RenderUtils.drawRoundedCornerRect(5F, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
}

FadeState.END -> TODO()
}
} else {
RenderUtils.drawRoundedCornerRect(0F + 3f, 0F, width.toFloat() + 5f, 27f - 5f, 2f, colors.rgb)
Expand Down

0 comments on commit 281c462

Please sign in to comment.