Skip to content

Commit

Permalink
java xt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Sep 29, 2023
1 parent 1b3482a commit cbb90f5
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 60 deletions.
32 changes: 15 additions & 17 deletions NightX.iws
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
</component>
<component name="ChangeListManager">
<list default="true" id="af093b99-5942-419c-869b-8b2d7cb4dd2a" name="変更" comment="">
<change afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/other/InfiniteReach.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/NightX.iws" beforeDir="false" afterPath="$PROJECT_DIR$/NightX.iws" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/ModuleManager.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/ModuleManager.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/TPAura.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/features/module/impl/combat/TPAura.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/render/MixinEntityRenderer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/render/MixinEntityRenderer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/visual/hud/element/elements/Arraylist.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/visual/hud/element/elements/Arraylist.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemRenderer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/injection/forge/mixins/item/MixinItemRenderer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/util/MovementUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/util/MovementUtils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/net/aspw/client/util/MovementUtilsFix.kt" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/net/aspw/client/util/MovementUtilsFix.kt" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
Expand Down Expand Up @@ -163,7 +161,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -178,7 +176,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -223,7 +221,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -238,7 +236,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down Expand Up @@ -325,7 +323,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -340,7 +338,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -355,7 +353,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -370,7 +368,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -385,7 +383,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -400,7 +398,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -415,7 +413,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand All @@ -430,7 +428,7 @@
<option name="MAIN_CLASS_NAME" value="GradleStartServer" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-master\run" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../NightX-Client\run" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import net.aspw.client.features.module.impl.visual.Animations;
import net.aspw.client.features.module.impl.visual.AntiBlind;
import net.aspw.client.util.MinecraftInstance;
import net.aspw.client.util.MovementUtils;
import net.aspw.client.util.MovementUtilsFix;
import net.aspw.client.util.timer.MSTimer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
Expand Down Expand Up @@ -214,7 +214,7 @@ public void renderItemInFirstPerson(float partialTicks) {
GlStateManager.scale(0.93F, 1.0F, 1.0F);
}

if (MovementUtils.isVisualBlocking() && f1 != 0.0F) {
if (MovementUtilsFix.INSTANCE.isVisualBlocking() && f1 != 0.0F) {
GlStateManager.scale(0.85F, 0.85F, 0.85F);
GlStateManager.translate(-0.06F, 0.003F, 0.05F);
}
Expand Down
41 changes: 0 additions & 41 deletions src/main/java/net/aspw/client/util/MovementUtils.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
package net.aspw.client.util;

import net.aspw.client.Client;
import net.aspw.client.event.MoveEvent;
import net.aspw.client.features.module.impl.combat.KillAura;
import net.aspw.client.features.module.impl.combat.TPAura;
import net.aspw.client.features.module.impl.visual.Animations;
import net.minecraft.block.Block;
import net.minecraft.block.BlockAir;
import net.minecraft.block.BlockIce;
import net.minecraft.block.BlockPackedIce;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.item.ItemSword;
import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;

import java.util.Objects;

/**
* The type Movement utils.
*/
Expand Down Expand Up @@ -110,12 +103,6 @@ public static boolean isRidingBlock() {
return !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1.8, mc.thePlayer.posZ)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1, mc.thePlayer.posZ)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 0.5, mc.thePlayer.posZ)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 1.8, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 1.8, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 1.8, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 1.8, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 1, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 1, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 1, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 1, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 0.5, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 0.5, mc.thePlayer.posZ + 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX + 0.5, mc.thePlayer.posY - 0.5, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir) || !(mc.theWorld.getBlockState(new BlockPos(mc.thePlayer.posX - 0.5, mc.thePlayer.posY - 0.5, mc.thePlayer.posZ - 0.5)).getBlock() instanceof BlockAir);
}

public static boolean isVisualBlocking() {
final KillAura killAura = Objects.requireNonNull(Client.moduleManager.getModule(KillAura.class));
final TPAura tpAura = Objects.requireNonNull(Client.moduleManager.getModule(TPAura.class));
return Animations.swingAnimValue.get().equals("1.7") && !mc.thePlayer.isEating() && !mc.thePlayer.isUsingItem() && !tpAura.isBlocking() && !mc.thePlayer.isBlocking() && (killAura.getTarget() != null && (killAura.getAutoBlockModeValue().get().equals("None") || !(mc.thePlayer.getHeldItem().getItem() instanceof ItemSword)) || killAura.getTarget() == null);
}

/**
* Accelerate.
*
Expand Down Expand Up @@ -229,34 +216,6 @@ public static double[] getXZDist(float speed, float cYaw) {
return arr;
}

/**
* Gets prediction yaw.
*
* @param x the x
* @param z the z
* @return the prediction yaw
*/
public static float getPredictionYaw(double x, double z) {
if (mc.thePlayer == null) {
lastX = -999999.0;
lastZ = -999999.0;
return 0F;
}

if (lastX == -999999.0)
lastX = mc.thePlayer.prevPosX;

if (lastZ == -999999.0)
lastZ = mc.thePlayer.prevPosZ;

float returnValue = (float) (Math.atan2(z - lastZ, x - lastX) * 180F / Math.PI);

lastX = x;
lastZ = z;

return returnValue;
}

/**
* Gets direction rotation.
*
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/net/aspw/client/util/MovementUtilsFix.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package net.aspw.client.util

import net.aspw.client.Client
import net.aspw.client.features.module.impl.combat.KillAura
import net.aspw.client.features.module.impl.combat.TPAura
import net.aspw.client.features.module.impl.visual.Animations
import net.minecraft.item.ItemSword
import net.minecraft.util.MathHelper
import java.util.*

object MovementUtilsFix : MinecraftInstance() {
val direction: Double
Expand All @@ -15,6 +21,26 @@ object MovementUtilsFix : MinecraftInstance() {
return Math.toRadians(rotationYaw.toDouble())
}

fun isVisualBlocking(): Boolean {
return Animations.swingAnimValue.get() == "1.7" && !mc.thePlayer.isEating && !mc.thePlayer.isUsingItem && !Objects.requireNonNull(
Client.moduleManager.getModule(
TPAura::class.java
)
)?.isBlocking!! && !mc.thePlayer.isBlocking && (Objects.requireNonNull(
Client.moduleManager.getModule(
KillAura::class.java
)
)?.target != null && (Objects.requireNonNull(
Client.moduleManager.getModule(
KillAura::class.java
)
)?.autoBlockModeValue?.get() == "None" || mc.thePlayer.heldItem.item !is ItemSword) || Objects.requireNonNull(
Client.moduleManager.getModule(
KillAura::class.java
)
)?.target == null)
}

private val funDirection: Double
get() {
var rotationYaw: Float = mc.thePlayer.rotationYaw
Expand Down

0 comments on commit cbb90f5

Please sign in to comment.