Skip to content

Commit

Permalink
the crazy doin
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 3, 2024
1 parent c42308a commit f1c383d
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 9 deletions.
17 changes: 12 additions & 5 deletions src/main/java/net/aspw/client/features/api/PacketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ public void onRender3D(Render3DEvent event) {
if (mc.gameSettings.keyBindAttack.isKeyDown() && mc.leftClickCounter == 0 && mc.theWorld.getBlockState(mc.objectMouseOver.getBlockPos()).getBlock().getMaterial() != Material.air)
Launch.eventManager.callEvent(new ClickBlockEvent(mc.objectMouseOver.getBlockPos(), mc.objectMouseOver.sideHit));

if (RotationUtils.targetRotation != null && Objects.requireNonNull(Launch.moduleManager.getModule(SilentRotations.class)).getState()) {
mc.thePlayer.prevRenderArmYaw = RotationUtils.targetRotation.getYaw();
mc.thePlayer.prevRenderArmPitch = RotationUtils.targetRotation.getPitch();
mc.thePlayer.renderArmYaw = RotationUtils.targetRotation.getYaw();
mc.thePlayer.renderArmPitch = RotationUtils.targetRotation.getPitch();
if (Objects.requireNonNull(Launch.moduleManager.getModule(SilentRotations.class)).getState()) {
if (RotationUtils.targetRotation != null) {
mc.thePlayer.prevRenderArmYaw = RotationUtils.targetRotation.getYaw();
mc.thePlayer.prevRenderArmPitch = RotationUtils.targetRotation.getPitch();
mc.thePlayer.renderArmYaw = RotationUtils.targetRotation.getYaw();
mc.thePlayer.renderArmPitch = RotationUtils.targetRotation.getPitch();
} else {
mc.thePlayer.prevRenderArmYaw = RotationUtils.prevCameraArmYaw;
mc.thePlayer.prevRenderArmPitch = RotationUtils.prevCameraArmPitch;
mc.thePlayer.renderArmYaw = RotationUtils.cameraArmYaw;
mc.thePlayer.renderArmPitch = RotationUtils.cameraArmPitch;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class LegitScaffold : Module() {
}

private val tickTimer = TickTimer()
private var lastSlot = 0
var lastSlot = 0

override fun onEnable() {
lastSlot = mc.thePlayer.inventory.currentItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class Scaffold : Module() {

// Auto block slot
private var slot = 0
private var lastSlot = 0
var lastSlot = 0

private var delay: Long = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class SilentRotations : Module() {
if (mc.thePlayer == null || RotationUtils.targetRotation == null) {
if (rotating)
rotating = false

mc.thePlayer.prevRotationYaw = RotationUtils.prevCameraYaw
mc.thePlayer.prevRotationPitch = RotationUtils.prevCameraPitch
mc.thePlayer.rotationYaw = RotationUtils.cameraYaw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ public void updateEntityActionState() {
this.prevRenderArmPitch = this.renderArmPitch;
this.renderArmPitch = (float) ((double) this.renderArmPitch + (double) (this.rotationPitch - this.renderArmPitch) * 0.5D);
this.renderArmYaw = (float) ((double) this.renderArmYaw + (double) (this.rotationYaw - this.renderArmYaw) * 0.5D);

RotationUtils.prevCameraArmYaw = RotationUtils.cameraArmYaw;
RotationUtils.prevCameraArmPitch = RotationUtils.cameraArmPitch;
RotationUtils.cameraArmPitch = (float) ((double) RotationUtils.cameraArmPitch + (double) (RotationUtils.cameraPitch - RotationUtils.cameraArmPitch) * 0.5D);
RotationUtils.cameraArmYaw = (float) ((double) RotationUtils.cameraArmYaw + (double) (RotationUtils.cameraYaw - RotationUtils.cameraArmYaw) * 0.5D);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import net.aspw.client.features.module.impl.combat.KillAura;
import net.aspw.client.features.module.impl.combat.KillAuraRecode;
import net.aspw.client.features.module.impl.combat.TPAura;
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.Animations;
import net.aspw.client.features.module.impl.visual.VisualAbilities;
import net.aspw.client.utils.TimerUtils;
Expand Down Expand Up @@ -737,6 +739,20 @@ public void renderItemInFirstPerson(final float partialTicks) {
GlStateManager.scale(Animations.scale.get() + 1, Animations.scale.get() + 1, Animations.scale.get() + 1);
}
} else {
if (Objects.requireNonNull(Launch.moduleManager.getModule(Scaffold.class)).getState()) {
if (this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(Scaffold.class)).getLastSlot()) == null && !abstractclientplayer.isInvisible()) {
if (Animations.cancelEquip.get() && !Animations.blockingOnly.get())
this.renderPlayerArm(abstractclientplayer, 0.0F, f1);
else this.renderPlayerArm(abstractclientplayer, f, f1);
}
} else if (Objects.requireNonNull(Launch.moduleManager.getModule(LegitScaffold.class)).getState()) {
if (this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(LegitScaffold.class)).getLastSlot()) == null && !abstractclientplayer.isInvisible()) {
if (Animations.cancelEquip.get() && !Animations.blockingOnly.get())
this.renderPlayerArm(abstractclientplayer, 0.0F, f1);
else this.renderPlayerArm(abstractclientplayer, f, f1);
}
}

if (Animations.swingAnimValue.get().equals("1.7")) {
if (f1 != 0.0F) {
GlStateManager.scale(0.85F, 0.85F, 0.85F);
Expand Down Expand Up @@ -774,9 +790,14 @@ public void renderItemInFirstPerson(final float partialTicks) {
GlStateManager.scale(Animations.scale.get() + 1, Animations.scale.get() + 1, Animations.scale.get() + 1);
}

this.renderItem(abstractclientplayer, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON);
if (Objects.requireNonNull(Launch.moduleManager.getModule(Scaffold.class)).getState() && this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(Scaffold.class)).getLastSlot()) != null)
this.renderItem(abstractclientplayer, this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(Scaffold.class)).getLastSlot()), ItemCameraTransforms.TransformType.FIRST_PERSON);
else if (Objects.requireNonNull(Launch.moduleManager.getModule(LegitScaffold.class)).getState() && this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(LegitScaffold.class)).getLastSlot()) != null)
this.renderItem(abstractclientplayer, this.mc.thePlayer.inventory.getStackInSlot(Objects.requireNonNull(Launch.moduleManager.getModule(LegitScaffold.class)).getLastSlot()), ItemCameraTransforms.TransformType.FIRST_PERSON);
else
this.renderItem(abstractclientplayer, this.itemToRender, ItemCameraTransforms.TransformType.FIRST_PERSON);
} else if (!abstractclientplayer.isInvisible()) {
if (Animations.cancelEquip.get())
if (Animations.cancelEquip.get() && !Animations.blockingOnly.get())
this.renderPlayerArm(abstractclientplayer, 0.0F, f1);
else this.renderPlayerArm(abstractclientplayer, f, f1);
}
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/net/aspw/client/utils/RotationUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ class RotationUtils : MinecraftInstance(), Listenable {
@JvmField
var prevCameraPitch = 0f

@JvmField
var cameraArmYaw = 0f

@JvmField
var cameraArmPitch = 0f

@JvmField
var prevCameraArmYaw = 0f

@JvmField
var prevCameraArmPitch = 0f

@JvmStatic
fun overrideMouse(): Boolean {
if (mc.inGameHasFocus && Display.isActive()) {
Expand Down

0 comments on commit f1c383d

Please sign in to comment.