mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
pwease fiwx the cwash uwu
This commit is contained in:
parent
46cfb7fe5d
commit
7396c2cfc0
46 changed files with 710 additions and 11 deletions
|
@ -11,7 +11,10 @@ import net.shadow.client.feature.module.impl.combat.AutoAttack;
|
|||
import net.shadow.client.feature.module.impl.combat.AutoTrap;
|
||||
import net.shadow.client.feature.module.impl.combat.Criticals;
|
||||
import net.shadow.client.feature.module.impl.combat.FireballDeflector;
|
||||
import net.shadow.client.feature.module.impl.combat.Fling;
|
||||
import net.shadow.client.feature.module.impl.combat.Killaura;
|
||||
import net.shadow.client.feature.module.impl.combat.Reach;
|
||||
import net.shadow.client.feature.module.impl.combat.ReverseKnockback;
|
||||
import net.shadow.client.feature.module.impl.combat.ShulkerDeflector;
|
||||
import net.shadow.client.feature.module.impl.combat.TpRange;
|
||||
import net.shadow.client.feature.module.impl.combat.Velocity;
|
||||
|
@ -48,6 +51,7 @@ import net.shadow.client.feature.module.impl.misc.MinehutAdBlocker;
|
|||
import net.shadow.client.feature.module.impl.misc.NoTitles;
|
||||
import net.shadow.client.feature.module.impl.misc.PortalGUI;
|
||||
import net.shadow.client.feature.module.impl.misc.Spinner;
|
||||
import net.shadow.client.feature.module.impl.misc.SuperCrossbow;
|
||||
import net.shadow.client.feature.module.impl.misc.Test;
|
||||
import net.shadow.client.feature.module.impl.misc.Timer;
|
||||
import net.shadow.client.feature.module.impl.misc.XCarry;
|
||||
|
@ -74,6 +78,7 @@ import net.shadow.client.feature.module.impl.movement.NoJumpCooldown;
|
|||
import net.shadow.client.feature.module.impl.movement.NoLevitation;
|
||||
import net.shadow.client.feature.module.impl.movement.NoPush;
|
||||
import net.shadow.client.feature.module.impl.movement.Phase;
|
||||
import net.shadow.client.feature.module.impl.movement.Speed;
|
||||
import net.shadow.client.feature.module.impl.movement.Sprint;
|
||||
import net.shadow.client.feature.module.impl.movement.Step;
|
||||
import net.shadow.client.feature.module.impl.movement.Swing;
|
||||
|
@ -103,6 +108,7 @@ import net.shadow.client.feature.module.impl.world.AirPlace;
|
|||
import net.shadow.client.feature.module.impl.world.AnyPlacer;
|
||||
import net.shadow.client.feature.module.impl.world.AutoFish;
|
||||
import net.shadow.client.feature.module.impl.world.AutoLavacast;
|
||||
import net.shadow.client.feature.module.impl.world.AutoSign;
|
||||
import net.shadow.client.feature.module.impl.world.AutoTool;
|
||||
import net.shadow.client.feature.module.impl.world.BlockTagViewer;
|
||||
import net.shadow.client.feature.module.impl.world.Boom;
|
||||
|
@ -278,6 +284,12 @@ public class ModuleRegistry {
|
|||
vanillaModules.add(new MinehutCrash());
|
||||
vanillaModules.add(new ArmorStandCrash());
|
||||
vanillaModules.add(new LoominaCrash());
|
||||
vanillaModules.add(new Reach());
|
||||
vanillaModules.add(new Fling());
|
||||
vanillaModules.add(new AutoSign());
|
||||
vanillaModules.add(new SuperCrossbow());
|
||||
vanillaModules.add(new ReverseKnockback());
|
||||
vanillaModules.add(new Speed());
|
||||
|
||||
rebuildSharedModuleList();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.combat;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventListener;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public class Fling extends Module {
|
||||
|
||||
final DoubleSetting delay = this.config.create(new DoubleSetting.Builder(250).min(1).max(500).name("Delay").description("the delay before going back down").get());
|
||||
final DoubleSetting updist = this.config.create(new DoubleSetting.Builder(3).min(1).max(3).name("Power").description("power of the fling").get());
|
||||
|
||||
|
||||
public Fling() {
|
||||
super("Fling", "fling players", ModuleType.COMBAT);
|
||||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void sendPacket(PacketEvent event){
|
||||
if (event.getPacket() instanceof PlayerInteractItemC2SPacket) {
|
||||
if (client.player.getInventory().getMainHandStack().getItem() == Items.FISHING_ROD && (client.player.fishHook != null || !client.player.fishHook.isRemoved())) {
|
||||
client.player.setVelocity(Vec3d.ZERO);
|
||||
event.setCancelled(true);
|
||||
new Thread(() -> {
|
||||
double staticy = client.player.getY();
|
||||
for (int i = 0; i < updist.getValue(); i++) {
|
||||
staticy = staticy + 9;
|
||||
Utils.sleep(5);
|
||||
client.player.setVelocity(Vec3d.ZERO);
|
||||
client.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(client.player.getX(), staticy, client.player.getZ(), true));
|
||||
}
|
||||
Utils.sleep(delay.getValue().longValue());
|
||||
client.player.networkHandler.getConnection().send(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND));
|
||||
Utils.sleep(delay.getValue().longValue());
|
||||
for (int i = 0; i < updist.getValue(); i++) {
|
||||
staticy = staticy - 9;
|
||||
Utils.sleep(5);
|
||||
client.player.setVelocity(Vec3d.ZERO);
|
||||
client.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(client.player.getX(), staticy, client.player.getZ(), true));
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.combat;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class Reach extends Module {
|
||||
|
||||
final DoubleSetting reachDist = this.config.create(new DoubleSetting.Builder(0).min(3).max(10).name("Distance").description("how far to reach").get());
|
||||
|
||||
public Reach() {
|
||||
super("Reach", "reach stuff", ModuleType.COMBAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
public double getReachDistance(){
|
||||
return reachDist.getValue();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.combat;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventListener;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
public class ReverseKnockback extends Module {
|
||||
|
||||
public ReverseKnockback() {
|
||||
super("ReverseKnockback", "reverse the knockback you deal", ModuleType.MISC);
|
||||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
@EventListener(type=EventType.PACKET_SEND)
|
||||
void packetSend(PacketEvent event){
|
||||
if (event.getPacket() instanceof PlayerMoveC2SPacket packet) {
|
||||
if (!(packet instanceof PlayerMoveC2SPacket.LookAndOnGround || packet instanceof PlayerMoveC2SPacket.Full))
|
||||
return;
|
||||
event.setCancelled(true);
|
||||
double x = packet.getX(0);
|
||||
double y = packet.getY(0);
|
||||
double z = packet.getZ(0);
|
||||
|
||||
Packet<?> newPacket;
|
||||
if (packet instanceof PlayerMoveC2SPacket.Full) {
|
||||
newPacket = new PlayerMoveC2SPacket.Full(x, y, z, MathHelper.wrapDegrees(client.player.getYaw() + 180), 0, packet.isOnGround());
|
||||
} else {
|
||||
newPacket = new PlayerMoveC2SPacket.LookAndOnGround(MathHelper.wrapDegrees(client.player.getYaw() + 180), 0, packet.isOnGround());
|
||||
}
|
||||
|
||||
client.player.networkHandler.getConnection().send(newPacket);
|
||||
}
|
||||
if(event.getPacket() instanceof PlayerInteractEntityC2SPacket){
|
||||
client.player.networkHandler.sendPacket(new ClientCommandC2SPacket(client.player, ClientCommandC2SPacket.Mode.START_SPRINTING));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.misc;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.StringNbtReader;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class SuperCrossbow extends Module {
|
||||
|
||||
public static final String inbt = "{Enchantments:[{id:\"minecraft:quick_charge\",lvl:5s}],ChargedProjectiles:[{},{id:\"minecraft:arrow\",Count:1b},{}],Charged:1b}";
|
||||
private static ItemStack stack;
|
||||
ItemStack before = new ItemStack(Registry.ITEM.get(new Identifier("air")), 1);
|
||||
|
||||
public SuperCrossbow() {
|
||||
super("SuperCrossbow", "shoot arrows really quickly (press middle mouse)", ModuleType.MISC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
if (!getItemNameFromStack(client.player.getMainHandStack()).equals(getItemNameFromStack(stack))) {
|
||||
before = client.player.getMainHandStack();
|
||||
}
|
||||
if (client.options.pickItemKey.isPressed()) {
|
||||
client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + client.player.getInventory().selectedSlot, stack));
|
||||
client.player.networkHandler.sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND));
|
||||
client.player.networkHandler.sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.RELEASE_USE_ITEM, new BlockPos(0, 0, 0), Direction.UP));
|
||||
client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + client.player.getInventory().selectedSlot, before));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
if (stack == null) {
|
||||
stack = new ItemStack(Registry.ITEM.get(new Identifier("crossbow")), 1);
|
||||
try {
|
||||
stack.setNbt(StringNbtReader.parse(inbt));
|
||||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
private String getItemNameFromStack(ItemStack hstack) {
|
||||
String hs = hstack.getItem().getTranslationKey();
|
||||
hs = hs.replace("minecraft.", "").replace("block.", "").replace("item.", "");
|
||||
return hs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.misc;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class Unload extends Module {
|
||||
public static boolean loaded = true;
|
||||
|
||||
public Unload() {
|
||||
super("Unload", "unload the client for the most part", ModuleType.MISC);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
loaded = false;
|
||||
for(Module m : ModuleRegistry.getModules()){
|
||||
m.setEnabled(false);
|
||||
}
|
||||
Notification.create(1000, "Unload", Notification.Type.SUCCESS, "Client Unloaded!");
|
||||
this.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.movement;
|
||||
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.attribute.EntityAttributes;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class Speed extends Module {
|
||||
static float fovEffectScal = 0;
|
||||
static int ticksonground = 0;
|
||||
static int ticksjustsneaking = 0;
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<Mode>(Mode.OnGround).name("Mode").description("the way to apply speed").get());
|
||||
final DoubleSetting speed = this.config.create(new DoubleSetting.Builder(20).min(5).max(50).name("Speed").description("How fast to go").get());
|
||||
|
||||
public Speed() {
|
||||
super("Speed", "gotta go fast", ModuleType.MOVEMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
fovEffectScal = client.options.fovEffectScale;
|
||||
if (client.player == null) return;
|
||||
ClientPlayerEntity player = client.player;
|
||||
switch (mode.getValue()) {
|
||||
case OnGround:
|
||||
client.player.setSprinting(true);
|
||||
client.options.fovEffectScale = 0F;
|
||||
client.player.getAttributes().getCustomInstance(EntityAttributes.GENERIC_MOVEMENT_SPEED).setBaseValue(Float.parseFloat(speed.getValue() + "") / 50);
|
||||
break;
|
||||
|
||||
case BHop:
|
||||
client.player.airStrafingSpeed = Float.parseFloat(speed.getValue() + "") / 100;
|
||||
if (client.player.isOnGround() && client.player.forwardSpeed != 0) {
|
||||
client.player.jump();
|
||||
} else if (client.player.isOnGround() && client.player.sidewaysSpeed != 0) {
|
||||
client.player.jump();
|
||||
}
|
||||
break;
|
||||
|
||||
case LowHop:
|
||||
if (client.player.input.movementForward != 0 || client.player.input.movementSideways != 0) {
|
||||
client.player.setSprinting(true);
|
||||
|
||||
if (client.player.isOnGround()) client.player.addVelocity(0, 0.3, 0);
|
||||
|
||||
if (client.player.isOnGround()) return;
|
||||
|
||||
float sspeed = Float.parseFloat(speed.getValue() + "") / 50;
|
||||
|
||||
float yaw = client.player.getYaw();
|
||||
float forward = 1;
|
||||
|
||||
if (client.player.forwardSpeed < 0) {
|
||||
yaw += 180;
|
||||
forward = -0.5f;
|
||||
} else if (client.player.forwardSpeed > 0) forward = 0.5f;
|
||||
|
||||
if (client.player.sidewaysSpeed > 0) yaw -= 90 * forward;
|
||||
if (client.player.sidewaysSpeed < 0) yaw += 90 * forward;
|
||||
|
||||
yaw = (float) Math.toRadians(yaw);
|
||||
|
||||
client.player.setVelocity(-Math.sin(yaw) * sspeed, client.player.getVelocity().y, Math.cos(yaw) * sspeed);
|
||||
}
|
||||
break;
|
||||
|
||||
case CSGO:
|
||||
client.player.setVelocity(client.player.getVelocity().multiply(1.1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
client.options.fovEffectScale = fovEffectScal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum Mode {
|
||||
OnGround,
|
||||
BHop,
|
||||
LowHop,
|
||||
CSGO
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.world;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.StringSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
|
||||
public class AutoSign extends Module {
|
||||
|
||||
final StringSetting ss1 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 1").description("the text for line 1").get());
|
||||
final StringSetting ss2 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 2").description("the text for line 2").get());
|
||||
final StringSetting ss3 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 3").description("the text for line 3").get());
|
||||
final StringSetting ss4 = this.config.create(new StringSetting.Builder("discord.gg/moles").name("Line 4").description("the text for line 4").get());
|
||||
|
||||
public AutoSign() {
|
||||
super("AutoSign", "automatically write signs", ModuleType.WORLD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
public String[] getText(){
|
||||
return new String[]{ss1.getValue(), ss2.getValue(), ss3.getValue(), ss4.getValue()};
|
||||
}
|
||||
}
|
|
@ -10,19 +10,30 @@ import net.minecraft.network.Packet;
|
|||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
|
||||
import net.shadow.client.feature.config.DoubleSetting;
|
||||
import net.shadow.client.feature.config.EnumSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
import net.shadow.client.helper.event.Events;
|
||||
import net.shadow.client.helper.event.events.PacketEvent;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket.Action;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
|
||||
public class MassUse extends Module {
|
||||
final List<Packet<?>> dontRepeat = new ArrayList<>();
|
||||
// SliderValue uses = (SliderValue) this.config.create("Uses", 3, 1, 100, 0).description("How many times to use the item");
|
||||
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Interact).name("Mode").description("How to mass use").get());
|
||||
final DoubleSetting uses = this.config.create(new DoubleSetting.Builder(3).name("Uses").description("How many times to use the item").min(1).max(100).precision(0).get());
|
||||
|
||||
public MassUse() {
|
||||
|
@ -36,17 +47,50 @@ public class MassUse extends Module {
|
|||
dontRepeat.remove(pe.getPacket());
|
||||
return;
|
||||
}
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
PlayerInteractBlockC2SPacket pp = new PlayerInteractBlockC2SPacket(p1.getHand(), p1.getBlockHitResult());
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
dontRepeat.add(pp);
|
||||
Objects.requireNonNull(client.getNetworkHandler()).sendPacket(pp);
|
||||
switch(mode.getValue()){
|
||||
case Interact -> {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
PlayerInteractBlockC2SPacket pp = new PlayerInteractBlockC2SPacket(p1.getHand(), p1.getBlockHitResult());
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
dontRepeat.add(pp);
|
||||
Objects.requireNonNull(client.getNetworkHandler()).sendPacket(pp);
|
||||
}
|
||||
} else if (pe.getPacket() instanceof PlayerInteractItemC2SPacket p1) {
|
||||
PlayerInteractItemC2SPacket pp = new PlayerInteractItemC2SPacket(p1.getHand());
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
dontRepeat.add(pp);
|
||||
Objects.requireNonNull(client.getNetworkHandler()).sendPacket(pp);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (pe.getPacket() instanceof PlayerInteractItemC2SPacket p1) {
|
||||
PlayerInteractItemC2SPacket pp = new PlayerInteractItemC2SPacket(p1.getHand());
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
dontRepeat.add(pp);
|
||||
Objects.requireNonNull(client.getNetworkHandler()).sendPacket(pp);
|
||||
|
||||
case Block -> {
|
||||
BlockHitResult r = (BlockHitResult) client.crosshairTarget;
|
||||
BlockPos p = r.getBlockPos();
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
PlayerInteractBlockC2SPacket pp = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, r);
|
||||
dontRepeat.add(pp);
|
||||
client.player.networkHandler.sendPacket(new PlayerActionC2SPacket(Action.START_DESTROY_BLOCK, p, Direction.UP));
|
||||
client.player.networkHandler.sendPacket(new PlayerActionC2SPacket(Action.STOP_DESTROY_BLOCK, p, Direction.UP));
|
||||
client.player.networkHandler.sendPacket(pp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case Random -> {
|
||||
if (pe.getPacket() instanceof PlayerInteractBlockC2SPacket p1) {
|
||||
Random random = new Random();
|
||||
|
||||
for (int i = 0; i < uses.getValue(); i++) {
|
||||
BlockPos pos = new BlockPos(client.player.getPos()).add(
|
||||
random.nextInt(13) - 6, random.nextInt(13) - 6,
|
||||
random.nextInt(13) - 6);
|
||||
PlayerInteractBlockC2SPacket pp = Utils.Packets.generatePlace(pos);
|
||||
dontRepeat.add(pp);
|
||||
client.player.networkHandler.sendPacket(pp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -81,5 +125,11 @@ public class MassUse extends Module {
|
|||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
enum Mode {
|
||||
Interact,
|
||||
Block,
|
||||
Random
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -247,6 +247,15 @@ public class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
//---DO NOT REMOVE THIS---
|
||||
public static class Packets{
|
||||
|
||||
public static PlayerInteractBlockC2SPacket generatePlace(BlockPos pos){
|
||||
return new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, false));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Players {
|
||||
|
||||
static final Map<String, UUID> UUID_CACHE = new HashMap<>();
|
||||
|
|
|
@ -50,6 +50,7 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Redirect(method = "keyPressed", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ChatScreen;sendMessage(Ljava/lang/String;)V"))
|
||||
void shadow_interceptChatMessage(ChatScreen instance, String s) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
if (s.startsWith(p)) { // filter all messages starting with .
|
||||
ShadowMain.client.inGameHud.getChatHud().addToMessageHistory(s);
|
||||
|
@ -149,6 +150,7 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
void shadow_renderText(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
String t = chatField.getText();
|
||||
if (t.startsWith(p)) {
|
||||
|
@ -161,6 +163,7 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "keyPressed", at = @At("HEAD"), cancellable = true)
|
||||
void shadow_injectKeyPressed(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
String p = getPrefix();
|
||||
if (keyCode == GLFW.GLFW_KEY_TAB && chatField.getText().startsWith(p)) {
|
||||
autocomplete();
|
||||
|
@ -170,6 +173,7 @@ public class AChatScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = {"init()V"}, at = @At("TAIL"))
|
||||
public void onInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
chatField.setMaxLength((ModuleRegistry.getByClass(InfChatLength.class).isEnabled()) ? Integer.MAX_VALUE : 256);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ public abstract class AEntityRendererMixin<T extends Entity> {
|
|||
|
||||
@Inject(method = "renderLabelIfPresent", at = @At("HEAD"), cancellable = true)
|
||||
public void renderEntityLabel(T entity, Text text, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (entity.getCustomName() != null && entity.getCustomName().equals(Text.of("DoNotRenderThisUsernamePlease"))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ public abstract class AGenericContainerScreenMixin {
|
|||
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void preTick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (!ModuleRegistry.getByClass(InventoryWalk.class).isEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public abstract class AInGameHudMixin extends DrawableHelper {
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
public void postRender(MatrixStack matrices, float tickDelta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
AccurateFrameRateCounter.globalInstance.recordFrame();
|
||||
MSAAFramebuffer.use(MSAAFramebuffer.MAX_SAMPLES, () -> {
|
||||
for (Module module : ModuleRegistry.getModules()) {
|
||||
|
|
|
@ -19,6 +19,7 @@ public class AbstractBlockStateMixin {
|
|||
|
||||
@Inject(method = "getLuminance", at = @At("HEAD"), cancellable = true)
|
||||
public void shadow_luminateBlock(CallbackInfoReturnable<Integer> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(15);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
|||
public class AreaEffectCloudEntityMixin {
|
||||
@ModifyVariable(method = "tick", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/util/math/MathHelper;ceil(F)I"), index = 4)
|
||||
int re(int value) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return value;
|
||||
AntiCrash ac = AntiCrash.instance();
|
||||
if (ac.isEnabled() && ac.getCapParticles().getValue()) {
|
||||
int partTotal = ((ParticleManagerDuck) ShadowMain.client.particleManager).getTotalParticles();
|
||||
|
|
|
@ -28,6 +28,7 @@ public abstract class BeaconScreenMixin extends HandledScreen<BeaconScreenHandle
|
|||
@Inject(method = "init", at = @At("TAIL"))
|
||||
protected void init(CallbackInfo ci) {
|
||||
if (ModuleRegistry.getByClass(BeaconSpoofer.class).isEnabled()) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
this.addDrawableChild(new ButtonWidget(1,
|
||||
1, 100, 20, new LiteralText("Apply Custom"),
|
||||
b -> {
|
||||
|
|
|
@ -22,6 +22,7 @@ public class BlockEntityRenderDispatcherMixin {
|
|||
@Inject(method = "render(Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;)V", at = @At("HEAD"),
|
||||
cancellable = true)
|
||||
public <E extends BlockEntity> void preRender(E blockEntity, float tickDelta, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.BLOCK_ENTITY_RENDER, new BlockEntityRenderEvent(matrix, blockEntity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class BlockMixin {
|
|||
|
||||
@Inject(method = "shouldDrawSide", at = @At("HEAD"), cancellable = true)
|
||||
private static void overwriteShouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos blockPos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ public class BlockMixin {
|
|||
|
||||
@Inject(method = "isTranslucent", at = @At("HEAD"), cancellable = true)
|
||||
public void overwriteIsTranslucent(BlockState state, BlockView world, BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(XRAY.class)).isEnabled()) {
|
||||
cir.setReturnValue(!XRAY.blocks.contains(state.getBlock()));
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class CameraMixin {
|
||||
@Inject(method = "getSubmersionType", at = @At("RETURN"), cancellable = true)
|
||||
void pretendEverythingsFine(CallbackInfoReturnable<CameraSubmersionType> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (NoLiquidFog.INSTANCE != null && NoLiquidFog.INSTANCE.isEnabled() && (cir.getReturnValue() == CameraSubmersionType.WATER || cir.getReturnValue() == CameraSubmersionType.LAVA)) {
|
||||
cir.setReturnValue(CameraSubmersionType.NONE);
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ public abstract class ClickableWidgetMixin implements DoesMSAA, FastTickable {
|
|||
|
||||
@Inject(method = "renderButton", at = @At("HEAD"), cancellable = true)
|
||||
void p(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (((Object) this) instanceof TextFieldWidget) return;
|
||||
ci.cancel();
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ClientConnection1Mixin {
|
|||
|
||||
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At("HEAD"))
|
||||
public void applyProxy(Channel channel, CallbackInfo ci) {
|
||||
//skipped this one as you probably don't want your proxy falling out
|
||||
ProxyManagerScreen.Proxy currentProxy = ProxyManagerScreen.currentProxy;
|
||||
if (currentProxy != null) {
|
||||
if (currentProxy.socks4()) {
|
||||
|
|
|
@ -23,6 +23,7 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "handlePacket", at = @At("HEAD"), cancellable = true)
|
||||
private static <T extends PacketListener> void dispatchPacketGet(Packet<T> packet, PacketListener listener, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.PACKET_RECEIVE, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "exceptionCaught", at = @At("HEAD"), cancellable = true)
|
||||
public void catchException(ChannelHandlerContext context, Throwable ex, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AntiPacketKick.class).isEnabled()) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
@ -37,6 +39,7 @@ public class ClientConnectionMixin {
|
|||
|
||||
@Inject(method = "send(Lnet/minecraft/network/Packet;)V", cancellable = true, at = @At("HEAD"))
|
||||
public void dispatchPacketSend(Packet<?> packet, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.PACKET_SEND, new PacketEvent(packet))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Objects;
|
|||
public class ClientPlayerEntityMixin {
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
public void preTick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Utils.TickManager.tick();
|
||||
if (!ConfigManager.enabled) {
|
||||
ConfigManager.enableModules();
|
||||
|
@ -39,11 +40,13 @@ public class ClientPlayerEntityMixin {
|
|||
|
||||
@Redirect(method = "updateNausea", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;shouldPause()Z"))
|
||||
public boolean overwriteIsPauseScreen(Screen screen) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return screen.shouldPause();
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(PortalGUI.class)).isEnabled() || screen.shouldPause();
|
||||
}
|
||||
|
||||
@Inject(method = "pushOutOfBlocks", at = @At("HEAD"), cancellable = true)
|
||||
public void preventPushOutFromBlocks(double x, double z, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(Freecam.class)).isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class))
|
||||
.isEnabled() || Objects.requireNonNull(ModuleRegistry.getByClass(Phase.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -6,12 +6,15 @@ package net.shadow.client.mixin;
|
|||
|
||||
import net.minecraft.client.network.ClientPlayerInteractionManager;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.combat.Reach;
|
||||
import net.shadow.client.feature.module.impl.world.NoBreakDelay;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
@ -26,4 +29,18 @@ public class ClientPlayerInteractionManagerMixin {
|
|||
int cd = this.blockBreakingCooldown;
|
||||
return Objects.requireNonNull(ModuleRegistry.getByClass(NoBreakDelay.class)).isEnabled() ? 0 : cd;
|
||||
}
|
||||
|
||||
@Inject(method = {"getReachDistance()F"}, at = {@At("HEAD")}, cancellable = true)
|
||||
private void onReachDistance(CallbackInfoReturnable<Float> cir) {
|
||||
if (ModuleRegistry.getByClass(Reach.class).isEnabled()) {
|
||||
cir.setReturnValue((float)ModuleRegistry.getByClass(Reach.class).getReachDistance());
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = {"hasExtendedReach()Z"}, at = {@At("HEAD")}, cancellable = true)
|
||||
private void onExtendedReach(CallbackInfoReturnable<Boolean> cir) {
|
||||
if (ModuleRegistry.getByClass(Reach.class).isEnabled()) {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ public class CreativeInventoryScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void postInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
RoundButton nbtEdit = new RoundButton(RoundButton.STANDARD, 5, 5, 64, 20, "NBT editor", () -> {
|
||||
if (ShadowMain.client.player.getInventory().getMainHandStack().isEmpty()) {
|
||||
Utils.Logging.error("You need to hold an item!");
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class EntityModelMixin {
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
void preRender(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
// shut up retard
|
||||
//noinspection ConstantConditions
|
||||
ModuleRegistry.getByClass(ESP.class).recording = ModuleRegistry.getByClass(ESP.class)
|
||||
|
@ -28,6 +29,7 @@ public class EntityModelMixin {
|
|||
|
||||
@Inject(method = "render", at = @At("TAIL"))
|
||||
void postRender(MatrixStack matrices, VertexConsumer vertices, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ModuleRegistry.getByClass(ESP.class).recording = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public class EntityRenderDispatcherMixin {
|
|||
|
||||
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
|
||||
public <E extends Entity> void dispatchEntityRender(E entity, double x, double y, double z, float yaw, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (Events.fireEvent(EventType.ENTITY_RENDER, new EntityRenderEvent(matrices, entity))) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class GameMenuMixin extends Screen {
|
|||
|
||||
@Inject(method = "initWidgets", at = @At("RETURN"))
|
||||
void addAddons(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
addDrawableChild(new RoundButton(RoundButton.STANDARD, 5, 5, 60, 20, "Addons", () -> {
|
||||
assert client != null;
|
||||
client.setScreen(new AddonManagerScreen());
|
||||
|
|
|
@ -40,6 +40,7 @@ public class GameRendererMixin {
|
|||
|
||||
@Inject(at = @At(value = "FIELD", target = "Lnet/minecraft/client/render/GameRenderer;renderHand:Z", opcode = Opcodes.GETFIELD, ordinal = 0), method = "renderWorld")
|
||||
void dispatchWorldRender(float tickDelta, long limitTime, MatrixStack matrix, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (vb) {
|
||||
ShadowMain.client.options.bobView = true;
|
||||
vb = false;
|
||||
|
|
|
@ -29,6 +29,7 @@ public class KeyboardMixin {
|
|||
|
||||
@Inject(method = "onKey", at = @At("RETURN"))
|
||||
void postKeyPressed(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (window == this.client.getWindow()
|
||||
.getHandle() && ShadowMain.client.currentScreen == null && System.currentTimeMillis() - ShadowMain.lastScreenChange > 10) { // make sure we are in game and the screen has been there for at least 10 ms
|
||||
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
|
||||
|
@ -41,6 +42,7 @@ public class KeyboardMixin {
|
|||
|
||||
@Inject(method = "setRepeatEvents", at = @At("HEAD"), cancellable = true)
|
||||
void repeatEvents(boolean repeatEvents, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
this.repeatEvents = true;
|
||||
ci.cancel();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,9 @@ import java.util.Objects;
|
|||
public class LivingEntityMixin {
|
||||
@Inject(method = "onAttacking", at = @At("HEAD"))
|
||||
public void atomic_setLastAttacked(Entity target, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (this.equals(ShadowMain.client.player) && target instanceof LivingEntity entity) {
|
||||
|
||||
AttackManager.registerLastAttacked(entity);
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +42,7 @@ public class LivingEntityMixin {
|
|||
// }
|
||||
@Inject(method = "canWalkOnFluid", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_overwriteCanWalkOnFluid(FluidState fluidState, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ShadowMain.client.player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -54,6 +57,7 @@ public class LivingEntityMixin {
|
|||
|
||||
@Redirect(method = "travel", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z"), require = 0)
|
||||
boolean atomic_stopLevitationEffect(LivingEntity instance, StatusEffect effect) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) instance.hasStatusEffect(effect);
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(NoLevitation.class).isEnabled() && effect == StatusEffects.LEVITATION) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -63,6 +67,7 @@ public class LivingEntityMixin {
|
|||
|
||||
@Inject(method = "pushAwayFrom", at = @At("HEAD"), cancellable = true)
|
||||
public void atomic_cancelPush(Entity entity, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (this.equals(ShadowMain.client.player)) {
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(NoPush.class)).isEnabled()) {
|
||||
ci.cancel();
|
||||
|
@ -72,6 +77,7 @@ public class LivingEntityMixin {
|
|||
|
||||
@Redirect(method = "jump", at = @At(value = "INVOKE", target = "net/minecraft/entity/LivingEntity.getYaw()F"))
|
||||
private float atomic_overwriteFreelookYaw(LivingEntity instance) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return instance.getYaw();
|
||||
if (instance.equals(ShadowMain.client.player) && ModuleRegistry.getByClass(FreeLook.class).isEnabled()) {
|
||||
return ModuleRegistry.getByClass(FreeLook.class).newyaw;
|
||||
}
|
||||
|
|
|
@ -31,22 +31,26 @@ public class MinecraftClientMixin {
|
|||
|
||||
@Inject(method = "stop", at = @At("HEAD"))
|
||||
void real(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ConfigManager.saveState();
|
||||
Events.fireEvent(EventType.GAME_EXIT, new NonCancellableEvent());
|
||||
}
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
void postInit(RunArgs args, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ShadowMain.INSTANCE.postWindowInit();
|
||||
}
|
||||
|
||||
@Inject(method = "setScreen", at = @At("HEAD"))
|
||||
void preSetScreen(Screen screen, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
ShadowMain.lastScreenChange = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Redirect(method = "handleInputEvents", at = @At(value = "FIELD", opcode = Opcodes.GETFIELD, target = "Lnet/minecraft/client/MinecraftClient;itemUseCooldown:I"))
|
||||
public int replaceItemUseCooldown(MinecraftClient minecraftClient) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return this.itemUseCooldown;
|
||||
if (Objects.requireNonNull(ModuleRegistry.getByClass(FastUse.class)).isEnabled()) {
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
public class ModelPartCuboidMixin {
|
||||
@Redirect(method = "renderCuboid", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/VertexConsumer;vertex(FFFFFFFFFIIFFF)V"))
|
||||
void bruh(VertexConsumer instance, float x, float y, float z, float red, float green, float blue, float alpha, float u, float v, int overlay, int light, float normalX, float normalY, float normalZ) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
instance.vertex(x, y, z, red, green, blue, alpha, u, v, overlay, light, normalX, normalY, normalZ);
|
||||
if (ModuleRegistry.getByClass(ESP.class).recording) {
|
||||
ModuleRegistry.getByClass(ESP.class).vertexDumps.add(new double[]{x, y, z});
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
public class ModelPartMixin {
|
||||
@Inject(method = "renderCuboids", at = @At("HEAD"))
|
||||
void renderCub(MatrixStack.Entry entry, VertexConsumer vertexConsumer, int light, int overlay, float red, float green, float blue, float alpha, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(ESP.class).recording) {
|
||||
ModuleRegistry.getByClass(ESP.class).vertexDumps.add(new double[0]);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ public class MouseMixin {
|
|||
|
||||
@Inject(method = "onMouseButton", at = @At("HEAD"), cancellable = true)
|
||||
public void dispatchMouseEvent(long window, int button, int action, int mods, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (window == ShadowMain.client.getWindow().getHandle()) {
|
||||
if (Events.fireEvent(EventType.MOUSE_EVENT, new MouseEvent(button, action))) {
|
||||
ci.cancel();
|
||||
|
|
|
@ -25,6 +25,7 @@ public class MultiplayerScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void init(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
double sourceY = 32 / 2d - 20 / 2d;
|
||||
RoundButton proxies = new RoundButton(new Color(40, 40, 40), 5, sourceY, 60, 20, "Proxies", () -> ShadowMain.client.setScreen(new ProxyManagerScreen(this)));
|
||||
addDrawableChild(proxies);
|
||||
|
|
|
@ -32,6 +32,7 @@ public class ParticleManagerMixin implements ParticleManagerDuck {
|
|||
|
||||
@Inject(method = "addParticle(Lnet/minecraft/client/particle/Particle;)V", at = @At("HEAD"), cancellable = true)
|
||||
void tick(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
AntiCrash ac = AntiCrash.instance();
|
||||
if (ac.isEnabled()) {
|
||||
if (ac.getCapParticles().getValue()) {
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
public class PlayerEntityMixin {
|
||||
@Redirect(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/PlayerEntity;noClip:Z", opcode = Opcodes.PUTFIELD))
|
||||
void tickNoClip(PlayerEntity playerEntity, boolean value) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
PlayerNoClipQueryEvent q = new PlayerNoClipQueryEvent(playerEntity);
|
||||
Events.fireEvent(EventType.NOCLIP_QUERY, q);
|
||||
playerEntity.noClip = q.getNoClip();
|
||||
|
@ -31,6 +32,7 @@ public class PlayerEntityMixin {
|
|||
|
||||
@Inject(method = "getMovementSpeed", at = @At("RETURN"), cancellable = true)
|
||||
void a(CallbackInfoReturnable<Float> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Hyperspeed hs = ModuleRegistry.getByClass(Hyperspeed.class);
|
||||
if (!hs.isEnabled() || !equals(ShadowMain.client.player)) {
|
||||
return;
|
||||
|
@ -40,6 +42,7 @@ public class PlayerEntityMixin {
|
|||
|
||||
@Inject(method = "jump", at = @At("RETURN"))
|
||||
void applyLongJump(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (!this.equals(ShadowMain.client.player)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public class PlayerEntityRendererMixin {
|
|||
@Inject(method = "renderLabelIfPresent(Lnet/minecraft/client/network/AbstractClientPlayerEntity;Lnet/minecraft/text/Text;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V",
|
||||
at = @At("HEAD"), cancellable = true)
|
||||
void real(AbstractClientPlayerEntity abstractClientPlayerEntity, Text text, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
NameTags nt = ModuleRegistry.getByClass(NameTags.class);
|
||||
if (nt.isEnabled()) {
|
||||
nt.render(matrixStack, abstractClientPlayerEntity, text);
|
||||
|
|
|
@ -30,6 +30,7 @@ public class ScreenMixin {
|
|||
|
||||
@Inject(method = "renderBackgroundTexture", at = @At("HEAD"), cancellable = true)
|
||||
void real(int vOffset, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
float r = c.getRed() / 255f;
|
||||
float g = c.getGreen() / 255f;
|
||||
float b = c.getBlue() / 255f;
|
||||
|
|
|
@ -20,6 +20,7 @@ public class SelectWorldScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
void a(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
renderBackground(matrices);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ public class SharedConstantsMixin {
|
|||
|
||||
@Inject(method = "isValidChar", at = @At("HEAD"), cancellable = true)
|
||||
private static void replaceValidChar(char chr, CallbackInfoReturnable<Boolean> cir) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AllowFormatCodes.class).isEnabled() && chr == '§') {
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package net.shadow.client.mixin;
|
||||
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.screen.ingame.SignEditScreen;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.world.AutoSign;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(SignEditScreen.class)
|
||||
public class SignEditScreenMixin extends Screen {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private String[] text;
|
||||
|
||||
protected SignEditScreenMixin(Text title) {
|
||||
super(title);
|
||||
}
|
||||
|
||||
@Inject(at = {@At("HEAD")}, method = {"init()V"})
|
||||
private void onInit(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
if (ModuleRegistry.getByClass(AutoSign.class).isEnabled()) {
|
||||
text = ModuleRegistry.getByClass(AutoSign.class).getText();
|
||||
finishEditing();
|
||||
}
|
||||
}
|
||||
|
||||
@Shadow
|
||||
private void finishEditing() {
|
||||
|
||||
}
|
||||
}
|
|
@ -23,6 +23,7 @@ public class TitleScreenMixin extends Screen {
|
|||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
void real(CallbackInfo ci) {
|
||||
if(!net.shadow.client.feature.module.impl.misc.Unload.loaded) return;
|
||||
Objects.requireNonNull(client).setScreen(LoadingScreen.instance());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@
|
|||
"TitleScreenMixin",
|
||||
"WorldRendererAccessor",
|
||||
"WorldRendererMixin",
|
||||
"BeaconScreenMixin"
|
||||
"BeaconScreenMixin",
|
||||
"SignEditScreenMixin"
|
||||
],
|
||||
"client": [],
|
||||
"server": [],
|
||||
|
|
Loading…
Reference in a new issue