Skip to content

Commit

Permalink
ERRORING
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Apr 28, 2024
1 parent 442da07 commit 296a114
Show file tree
Hide file tree
Showing 97 changed files with 279 additions and 2,920 deletions.
8 changes: 0 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ dependencies {
exclude module: "slf4j-api"
}

include "com.viaversion:viaversion:${project.viaversion_version}"
include "com.viaversion:viabackwards:${project.viabackwards_version}"
include "com.viaversion:viarewind:${project.viarewind_version}"
include ("net.raphimc:ViaLegacy:${project.vialegacy_version}") {
exclude group: "com.google.code.gson", module: "gson"
}
include "net.raphimc:ViaLoader:${project.vialoader_version}"

include "org.slf4j:slf4j-api:${project.slf4j_version}"
include "org.yaml:snakeyaml:${project.snake_yml_version}"

Expand Down
8 changes: 1 addition & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,4 @@ mixingradle_version = ae2a80e

okhttp_version=4.9.1
snake_yml_version=2.2
slf4j_version=2.0.12

viaversion_version=4.10.1-SNAPSHOT
viabackwards_version=4.10.0
viarewind_version=3.1.0
vialoader_version=2.2.14-SNAPSHOT
vialegacy_version=2.2.23-SNAPSHOT
slf4j_version=2.0.12
8 changes: 1 addition & 7 deletions src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import net.aspw.client.event.ClientShutdownEvent
import net.aspw.client.event.EventManager
import net.aspw.client.features.api.DiscordRPC
import net.aspw.client.features.api.MacroManager
import net.aspw.client.features.api.McUpdatesHandler
import net.aspw.client.features.api.PacketManager
import net.aspw.client.features.api.inventory.EnchantItems
import net.aspw.client.features.api.inventory.ModItems
Expand All @@ -17,8 +16,6 @@ import net.aspw.client.features.module.impl.other.ThunderNotifier
import net.aspw.client.features.module.impl.visual.Interface
import net.aspw.client.features.module.impl.visual.SilentRotations
import net.aspw.client.features.module.impl.visual.Trajectories
import net.aspw.client.protocol.ProtocolBase
import net.aspw.client.protocol.ProtocolMod
import net.aspw.client.utils.*
import net.aspw.client.utils.ClassUtils.hasForge
import net.aspw.client.utils.misc.sound.TipSoundManager
Expand All @@ -30,7 +27,7 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "B109"
const val CLIENT_VERSION = "B110"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"
const val CLIENT_PROTOCOL_RANGE = "1.7.2 to 1.20.6"

Expand Down Expand Up @@ -65,8 +62,6 @@ object Launch {

lastTick = System.currentTimeMillis()

ProtocolBase.init(ProtocolMod.PLATFORM)

// Check update
APIConnecter.checkStatus()
APIConnecter.checkChangelogs()
Expand All @@ -82,7 +77,6 @@ object Launch {
// Register listeners
eventManager.registerListener(RotationUtils())
eventManager.registerListener(PacketManager())
eventManager.registerListener(McUpdatesHandler())
eventManager.registerListener(InventoryUtils())
eventManager.registerListener(InventoryHelper)
eventManager.registerListener(PacketUtils())
Expand Down
175 changes: 0 additions & 175 deletions src/main/java/net/aspw/client/features/api/McUpdatesHandler.java

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/java/net/aspw/client/features/api/PacketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
import net.aspw.client.features.module.impl.other.BrandSpoofer;
import net.aspw.client.features.module.impl.visual.Animations;
import net.aspw.client.features.module.impl.visual.SilentRotations;
import net.aspw.client.protocol.api.ProtocolFixer;
import net.aspw.client.utils.AnimationUtils;
import net.aspw.client.utils.MinecraftInstance;
import net.aspw.client.utils.RotationUtils;
import net.aspw.client.utils.timer.MSTimer;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;

import java.util.Objects;

Expand All @@ -23,8 +20,6 @@ public class PacketManager extends MinecraftInstance implements Listenable {
private static final MSTimer packetCountTimer = new MSTimer();
public static int swing;
public static boolean isVisualBlocking = false;
public static float eyeHeight;
public static float lastEyeHeight;
public static int sendPacketCounts;
public static int receivePacketCounts;
private int preSend = 0;
Expand Down Expand Up @@ -53,29 +48,6 @@ public void onRender3D(Render3DEvent event) {
public void onMotion(MotionEvent event) {
mc.leftClickCounter = 0;

float START_HEIGHT = 1.62f;
float END_HEIGHT;

lastEyeHeight = eyeHeight;

if (ProtocolFixer.newerThanOrEqualsTo1_9() && ProtocolFixer.olderThanOrEqualsTo1_13_2())
END_HEIGHT = 1.47f;
else if (ProtocolFixer.newerThanOrEqualsTo1_14())
END_HEIGHT = 1.32f;
else END_HEIGHT = 1.54f;

float delta;
if (ProtocolFixer.newerThanOrEqualsTo1_9() && ProtocolFixer.olderThanOrEqualsTo1_13_2())
delta = 0.147f;
else if (ProtocolFixer.newerThanOrEqualsTo1_14())
delta = 0.132f;
else delta = 0.154f;

if (mc.thePlayer.isSneaking())
eyeHeight = AnimationUtils.animate(END_HEIGHT, eyeHeight, 2 * delta);
else if (eyeHeight < START_HEIGHT)
eyeHeight = AnimationUtils.animate(START_HEIGHT, eyeHeight, 2 * delta);

if (!Objects.requireNonNull(Launch.moduleManager.getModule(SilentRotations.class)).getState())
Objects.requireNonNull(Launch.moduleManager.getModule(SilentRotations.class)).setState(true);
if (!Objects.requireNonNull(Launch.moduleManager.getModule(BrandSpoofer.class)).getState())
Expand Down Expand Up @@ -133,14 +105,6 @@ public void onPacket(PacketEvent event) {
preReceive = 0;
packetCountTimer.reset();
}

if (ProtocolFixer.newerThanOrEqualsTo1_10()) {
if (packet instanceof C08PacketPlayerBlockPlacement) {
((C08PacketPlayerBlockPlacement) packet).facingX = 0.5F;
((C08PacketPlayerBlockPlacement) packet).facingY = 0.5F;
((C08PacketPlayerBlockPlacement) packet).facingZ = 0.5F;
}
}
}

@Override
Expand Down
Loading

0 comments on commit 296a114

Please sign in to comment.