Skip to content

Commit

Permalink
B124
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 22, 2024
1 parent ae40b6b commit b48025f
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "Beta-B124"
const val CLIENT_VERSION = "B124"
const val CLIENT_CHAT = "§7[§5N§di§3g§bh§6t§aX§7] [§eInfo§7] §r"

var isStarting = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import net.aspw.client.event.Render3DEvent
import net.aspw.client.features.module.Module
import net.aspw.client.features.module.ModuleCategory
import net.aspw.client.features.module.ModuleInfo
import net.aspw.client.utils.PlayerUtils
import net.aspw.client.utils.PredictUtils
import net.aspw.client.utils.render.RenderUtils
import net.aspw.client.value.IntegerValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ class Scaffold : Module() {
}
}

if (autoJumpValue.get().equals("hypixelkeepy", true) && mc.thePlayer.fallDistance >= 0.00001 && mc.thePlayer.fallDistance < 1.4)
if (autoJumpValue.get()
.equals("hypixelkeepy", true) && mc.thePlayer.fallDistance >= 0.00001 && mc.thePlayer.fallDistance < 1.4
)
KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode)

if (customSpeedValue.get()) MovementUtils.strafe(customMoveSpeedValue.get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ class Interface : Module() {
if (module.array && (module.state || module.slide != 0F)) {
val displayString = getModName(module)

val width = if (cFontValue.get()) FontLoaders.SF20.getStringWidth(displayString) else Fonts.minecraftFont.getStringWidth(displayString)
val width =
if (cFontValue.get()) FontLoaders.SF20.getStringWidth(displayString) else Fonts.minecraftFont.getStringWidth(
displayString
)

if (module.state) {
if (module.slide < width) {
Expand Down Expand Up @@ -134,15 +137,33 @@ class Interface : Module() {
counter[0] = counter[0] - 1

if (cFontValue.get())
FontLoaders.SF20.drawStringWithShadow(displayString, xPos.toDouble(), module.arrayY + textY.toDouble(), RenderUtils.skyRainbow(index * 50, 0.6f, 1f).rgb)
else Fonts.minecraftFont.drawStringWithShadow(displayString, xPos, module.arrayY + textY, RenderUtils.skyRainbow(index * 50, 0.6f, 1f).rgb)
FontLoaders.SF20.drawStringWithShadow(
displayString,
xPos.toDouble(),
module.arrayY + textY.toDouble(),
RenderUtils.skyRainbow(index * 50, 0.6f, 1f).rgb
)
else Fonts.minecraftFont.drawStringWithShadow(
displayString,
xPos,
module.arrayY + textY,
RenderUtils.skyRainbow(index * 50, 0.6f, 1f).rgb
)
}
GlStateManager.resetColor()
modules = Launch.moduleManager.modules
.filter { it.array && it.slide > 0 }
.sortedBy { if (cFontValue.get()) -FontLoaders.SF20.getStringWidth(getModName(it)) else -Fonts.minecraftFont.getStringWidth(getModName(it)) }
.sortedBy {
if (cFontValue.get()) -FontLoaders.SF20.getStringWidth(getModName(it)) else -Fonts.minecraftFont.getStringWidth(
getModName(it)
)
}
sortedModules =
Launch.moduleManager.modules.sortedBy { if (cFontValue.get()) -FontLoaders.SF20.getStringWidth(getModName(it)) else -Fonts.minecraftFont.getStringWidth(getModName(it)) }.toList()
Launch.moduleManager.modules.sortedBy {
if (cFontValue.get()) -FontLoaders.SF20.getStringWidth(
getModName(it)
) else -Fonts.minecraftFont.getStringWidth(getModName(it))
}.toList()
}

if (targetHudValue.get()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.aspw.client.injection.forge.mixins.block;

import net.aspw.client.utils.PlayerUtils;
import net.aspw.client.utils.PredictUtils;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package net.aspw.client.injection.forge.mixins.block;

import net.aspw.client.utils.PlayerUtils;
import net.aspw.client.utils.PredictUtils;
import net.minecraft.client.multiplayer.WorldClient;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
package net.aspw.client.injection.forge.mixins.entity;

import kotlin.Pair;
import net.aspw.client.Launch;
import net.aspw.client.features.module.impl.visual.Cape;
import net.aspw.client.features.module.impl.visual.Interface;
import net.aspw.client.utils.APIConnecter;
import net.aspw.client.utils.MinecraftInstance;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.util.ResourceLocation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.awt.image.BufferedImage;
import java.util.*;
import java.util.Objects;

@Mixin(AbstractClientPlayer.class)
public abstract class MixinAbstractClientPlayer extends MixinEntityPlayer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.aspw.client.features.module.impl.movement.Flight;
import net.aspw.client.utils.EntityUtils;
import net.aspw.client.utils.MinecraftInstance;
import net.aspw.client.utils.PlayerUtils;
import net.aspw.client.utils.PredictUtils;
import net.minecraft.block.Block;
import net.minecraft.command.ICommandSender;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.aspw.client.event.PacketEvent;
import net.aspw.client.features.module.impl.combat.BackTrack;
import net.aspw.client.utils.PacketUtils;
import net.aspw.client.utils.PlayerUtils;
import net.aspw.client.utils.PredictUtils;
import net.minecraft.network.INetHandler;
import net.minecraft.network.NetworkManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,19 @@
package net.aspw.client.injection.forge.mixins.render;

import kotlin.Pair;
import net.aspw.client.Launch;
import net.aspw.client.features.module.impl.player.Freecam;
import net.aspw.client.features.module.impl.player.ReverseFreecam;
import net.aspw.client.utils.APIConnecter;
import net.aspw.client.utils.MinecraftInstance;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.layers.LayerCape;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.struct.InjectorGroupInfo;
import scala.collection.mutable.MutableList;

import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

@Mixin(LayerCape.class)
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/net/aspw/client/utils/APIConnecter.kt
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package net.aspw.client.utils

import net.aspw.client.Launch
import net.minecraft.client.Minecraft
import net.minecraft.client.renderer.texture.DynamicTexture
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.util.ResourceLocation
import okhttp3.OkHttpClient
import okhttp3.Request
import java.awt.image.BufferedImage
import java.io.IOException
import java.net.URL
import java.util.UUID
import javax.imageio.ImageIO
import javax.net.ssl.SSLContext
import javax.net.ssl.TrustManager
Expand Down Expand Up @@ -74,7 +71,15 @@ object APIConnecter {
val cape = i.split(":")[1]
tlsAuthConnectionFixes()
gotCapes = ImageIO.read(URL(URLComponent.DONORS + cape))
donorCapeLocations.add(Pair(uuid, MinecraftInstance.mc.textureManager.getDynamicTextureLocation(Launch.CLIENT_FOLDER, DynamicTexture(gotCapes))))
donorCapeLocations.add(
Pair(
uuid,
MinecraftInstance.mc.textureManager.getDynamicTextureLocation(
Launch.CLIENT_FOLDER,
DynamicTexture(gotCapes)
)
)
)
}
canConnect = true
ClientUtils.getLogger().info("Loaded Donor Capes")
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/net/aspw/client/utils/PlayerUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import net.aspw.client.features.module.impl.player.AutoTool
import net.aspw.client.features.module.impl.player.LegitScaffold
import net.aspw.client.features.module.impl.player.Scaffold
import net.aspw.client.features.module.impl.visual.Interface
import net.minecraft.client.entity.EntityPlayerSP
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.item.ItemStack
import net.minecraft.stats.StatFileWriter
import net.minecraft.util.MovementInputFromOptions
import net.minecraft.util.Vec3
import java.util.*

object PlayerUtils {

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/aspw/client/utils/PredictUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
import net.minecraft.stats.StatFileWriter;
import net.minecraft.util.MovementInputFromOptions;
import net.minecraft.util.Vec3;
import scala.collection.mutable.MutableList;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class PredictUtils extends MinecraftInstance {

Expand Down

0 comments on commit b48025f

Please sign in to comment.