mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
fix bug 2
This commit is contained in:
parent
704f59f60f
commit
9bd46acf83
32 changed files with 62 additions and 159 deletions
|
@ -9,6 +9,7 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.exception.CommandException;
|
||||
|
||||
@SuppressWarnings("ClassCanBeRecord")
|
||||
public class PlayerFromNameArgumentParser implements ArgumentParser<PlayerEntity> {
|
||||
final boolean ignoreCase;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.shadow.client.feature.command.exception.CommandException;
|
|||
|
||||
public class StringArgumentParser implements ArgumentParser<String> {
|
||||
@Override
|
||||
public String parse(String argument) throws CommandException {
|
||||
public String parse(String argument) {
|
||||
return argument;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class Config extends Command {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) throws CommandException {
|
||||
public void onExecute(String[] args) {
|
||||
// validateArgumentsLength(args, 1);
|
||||
if (args.length == 0) {
|
||||
message("Syntax: .config (module) <key> <value>");
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.command.impl;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtList;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Open extends Command {
|
||||
private static final ItemStack[] ITEMS = new ItemStack[27];
|
||||
|
||||
public Open() {
|
||||
super("Open", "Open contianers", "open");
|
||||
}
|
||||
|
||||
private static void getItemsInContainerItem(ItemStack itemStack) {
|
||||
Arrays.fill(Open.ITEMS, ItemStack.EMPTY);
|
||||
NbtCompound nbt = itemStack.getNbt();
|
||||
|
||||
if (nbt != null && nbt.contains("ShadowItemTag")) {
|
||||
NbtCompound nbt2 = nbt.getCompound("ShadowItemTag");
|
||||
if (nbt2.contains("Items")) {
|
||||
NbtList nbt3 = (NbtList) nbt2.get("Items");
|
||||
for (int i = 0; i < nbt3.size(); i++) {
|
||||
ShadowMain.client.player.networkHandler.sendPacket(
|
||||
new CreativeInventoryActionC2SPacket(nbt3.getCompound(i).getByte("Slot") + 9, ItemStack.fromNbt(nbt3.getCompound(i))));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nbt != null && nbt.contains("BlockEntityTag")) {
|
||||
NbtCompound nbt2 = nbt.getCompound("BlockEntityTag");
|
||||
if (nbt2.contains("Items")) {
|
||||
NbtList nbt3 = (NbtList) nbt2.get("Items");
|
||||
for (int i = 0; i < nbt3.size(); i++) {
|
||||
ShadowMain.client.player.networkHandler.sendPacket(
|
||||
new CreativeInventoryActionC2SPacket(nbt3.getCompound(i).getByte("Slot") + 9, ItemStack.fromNbt(nbt3.getCompound(i))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) {
|
||||
success("Done!");
|
||||
getItemsInContainerItem(ShadowMain.client.player.getMainHandStack());
|
||||
}
|
||||
|
||||
}
|
|
@ -66,7 +66,8 @@ public class Taco extends Command {
|
|||
} catch (Exception ignored) {
|
||||
|
||||
}
|
||||
if (!gifPath.exists()) gifPath.mkdir();
|
||||
if (!gifPath.exists()) //noinspection ResultOfMethodCallIgnored
|
||||
gifPath.mkdir();
|
||||
try {
|
||||
if (!storage.isFile()) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
|
@ -95,7 +96,7 @@ public class Taco extends Command {
|
|||
}
|
||||
}
|
||||
|
||||
static void initFrames() throws Exception {
|
||||
static void initFrames() {
|
||||
checkGifPath();
|
||||
for (Frame frame : frames) {
|
||||
ShadowMain.client.getTextureManager().destroyTexture(frame.getI());
|
||||
|
|
|
@ -18,6 +18,6 @@ public class Template extends Command {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) throws CommandException {
|
||||
public void onExecute(String[] args) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public abstract class SettingBase<V> {
|
|||
*/
|
||||
V value;
|
||||
|
||||
Consumer<V> onChanged;
|
||||
final Consumer<V> onChanged;
|
||||
|
||||
/**
|
||||
* Constructs a new Setting
|
||||
|
|
|
@ -184,21 +184,6 @@ public class ParticleRenderer {
|
|||
stack.push();
|
||||
double radToUse = pk * circleRad;
|
||||
Renderer.R2D.renderCircle(stack, Renderer.Util.lerp(theme.getAccent(), DYING, pk), x - radToUse / 2d, y - radToUse / 2d, radToUse, 30);
|
||||
// double maxDist = 100;
|
||||
// for (Particle particle : others.stream().filter(particle -> particle != this).toList()) {
|
||||
// double px = particle.x;
|
||||
// double py = particle.y;
|
||||
// double dist = Math.sqrt(Math.pow((px - this.x), 2) + Math.pow((py - this.y), 2));
|
||||
// if (dist < maxDist) {
|
||||
// long sd1 = Math.min(particle.origLife - particle.life, fadeTime);
|
||||
// long ed1 = Math.min(particle.life, fadeTime);
|
||||
// long do1 = Math.min(sd1, ed1);
|
||||
// double pk1 = (do1 / (double) fadeTime);
|
||||
// double p = 1 - (dist / maxDist);
|
||||
// p = Math.min(p, Math.min(pk1, pk));
|
||||
// Renderer.R2D.renderLine(stack, Renderer.Util.lerp(theme.getAccent(), DYING, p), this.x, this.y, px, py);
|
||||
// }
|
||||
// }
|
||||
stack.pop();
|
||||
}
|
||||
|
||||
|
|
|
@ -153,9 +153,6 @@ public class NotificationRenderer {
|
|||
double notificationWidth = texPadding + iconDimensions + texPadding + Math.max(minWidth, contentWidth) + texPadding; // take padding for the icon into account as well
|
||||
double notificationX = notification.posX = bottomRightStartX - notificationWidth;
|
||||
double notificationY = bottomRightStartY - notificationHeight - yOffset;
|
||||
// notification.renderPosX = notification.posX = bottomRightStartX-notificationWidth;
|
||||
// notification.posY = bottomRightStartY-notificationHeight-yOffset;
|
||||
// if (notification.renderPosY < 0) notification.renderPosY = notification.posY;
|
||||
double interpolatedAnimProgress = Transitions.easeOutExpo(notification.animationProgress);
|
||||
Renderer.R2D.renderRoundedQuad(ms, new Color(20, 20, 20, (int) Math.min(255, 255 * interpolatedAnimProgress)), notificationX, notificationY, notificationX + notificationWidth, notificationY + notificationHeight, 5, 20);
|
||||
RenderSystem.setShaderTexture(0, notification.type.getI());
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ConsoleScreen extends ClientScreen implements FastTickable {
|
|||
private static ConsoleScreen instance;
|
||||
final Color background = new Color(0, 0, 0, 120);
|
||||
final List<LogEntry> logs = new ArrayList<>();
|
||||
ClientScreen parent = null;
|
||||
final ClientScreen parent = null;
|
||||
RoundTextFieldWidget command;
|
||||
double scroll = 0;
|
||||
double smoothScroll = 0;
|
||||
|
|
|
@ -37,6 +37,7 @@ public class Option<T> {
|
|||
getValueRef().set(value);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void accept(Object o) {
|
||||
getValueRef().set((T) o);
|
||||
}
|
||||
|
|
|
@ -113,8 +113,7 @@ public class AutoTrap extends Module {
|
|||
int slot = -1;
|
||||
for (int i = 0; i < 9; i++) {
|
||||
ItemStack real = ShadowMain.client.player.getInventory().getStack(i);
|
||||
if (real.getItem() instanceof BlockItem bi && Block.isShapeFullCube(bi.getBlock()
|
||||
.getOutlineShape(bi.getBlock().getDefaultState(), ShadowMain.client.world, new BlockPos(0, 0, 0), ShapeContext.absent()))) {
|
||||
if (real.getItem() instanceof BlockItem bi && Block.isShapeFullCube(bi.getBlock().getDefaultState().getOutlineShape(ShadowMain.client.world, new BlockPos(0, 0, 0), ShapeContext.absent()))) {
|
||||
slot = i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AnimationCrash extends Module {
|
|||
for (int i = 0; i < power.getValue(); i++) {
|
||||
Objects.requireNonNull(ShadowMain.client.player.networkHandler).sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND));
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
} catch (NullPointerException ignored) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ public class AutoFireball extends Module {
|
|||
|
||||
final DoubleSetting radius = this.config.create(new DoubleSetting.Builder(15).max(100).min(10).name("Radius").description("The radius to search in").get());
|
||||
final Block[] blocks = new Block[]{Blocks.COBBLESTONE, Blocks.GLASS, Blocks.GLASS_PANE, Blocks.OAK_DOOR, Blocks.IRON_DOOR, Blocks.BRICKS, Blocks.OAK_PLANKS, Blocks.DARK_OAK_PLANKS, Blocks.WHITE_WOOL, Blocks.BLACK_WOOL, Blocks.BARREL, Blocks.CHEST, Blocks.CRAFTING_TABLE, Blocks.FURNACE};
|
||||
BlockPos walkman = new BlockPos(0, 0, 0);
|
||||
List<BlockPos> targets = new ArrayList<>();
|
||||
final BlockPos walkman = new BlockPos(0, 0, 0);
|
||||
final List<BlockPos> targets = new ArrayList<>();
|
||||
|
||||
public AutoFireball() {
|
||||
super("AutoFireball", "auto nuke shit using fireballs", ModuleType.MISC);
|
||||
|
|
|
@ -35,11 +35,13 @@ public class AntiCrash extends Module {
|
|||
.description("Prevents an abnormal sized velocity packet from going through")
|
||||
.get());
|
||||
@Getter
|
||||
final
|
||||
BooleanSetting capParticles = this.config.create(new BooleanSetting.Builder(true)
|
||||
.name("Cap particles")
|
||||
.description("Prevents too many particles from being rendered")
|
||||
.get());
|
||||
@Getter
|
||||
final
|
||||
DoubleSetting particleMax = this.config.create(new DoubleSetting.Builder(1000)
|
||||
.name("Particle max")
|
||||
.description("How many particles to allow at once")
|
||||
|
@ -48,11 +50,13 @@ public class AntiCrash extends Module {
|
|||
.precision(0)
|
||||
.get());
|
||||
@Getter
|
||||
final
|
||||
BooleanSetting capNames = this.config.create(new BooleanSetting.Builder(true)
|
||||
.name("Cap entity names")
|
||||
.description("Cap the max size an entity name can be")
|
||||
.get());
|
||||
@Getter
|
||||
final
|
||||
DoubleSetting nameMax = this.config.create(new DoubleSetting.Builder(64)
|
||||
.name("Name max")
|
||||
.description("How long a name should be allowed to be")
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.shadow.client.feature.module.ModuleType;
|
|||
|
||||
public class ClientSettings extends Module {
|
||||
@Getter
|
||||
final
|
||||
StringSetting ss = this.config.create(new StringSetting.Builder(">")
|
||||
.name("Prefix")
|
||||
.description("The prefix to use for commands")
|
||||
|
|
|
@ -20,26 +20,22 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
|
||||
public class DiscordRPC extends Module {
|
||||
static ExecutorService offThreadExec = Executors.newFixedThreadPool(1);
|
||||
static final ExecutorService offThreadExec = Executors.newFixedThreadPool(1);
|
||||
Timer rpcUpdate = new Timer();
|
||||
long updateRequested = 0;
|
||||
boolean updateOutstanding = false;
|
||||
StringSetting details = this.config.create(
|
||||
final StringSetting details = this.config.create(
|
||||
new StringSetting.Builder("Using Shadow V2")
|
||||
.name("Title")
|
||||
.description("What to put as the title of the rpc")
|
||||
.onChanged(s -> {
|
||||
update();
|
||||
})
|
||||
.onChanged(s -> update())
|
||||
.get()
|
||||
);
|
||||
StringSetting state = this.config.create(
|
||||
final StringSetting state = this.config.create(
|
||||
new StringSetting.Builder("Obliterating minecraft")
|
||||
.name("Description")
|
||||
.description("What to put as the description of the rpc")
|
||||
.onChanged(s -> {
|
||||
update();
|
||||
})
|
||||
.onChanged(s -> update())
|
||||
.get()
|
||||
);
|
||||
long startTime;
|
||||
|
|
|
@ -39,7 +39,7 @@ public class Test extends Module {
|
|||
});
|
||||
}
|
||||
|
||||
Timer timer = new Timer();
|
||||
final Timer timer = new Timer();
|
||||
@Override
|
||||
public void tick() {
|
||||
if (timer.hasExpired(500)) {
|
||||
|
|
|
@ -66,8 +66,6 @@ public class BlockHighlighting extends Module {
|
|||
Color outline = new Color(50, 50, 50, 255);
|
||||
Color fill = new Color(20, 20, 20, 100);
|
||||
Renderer.R3D.renderEdged(stack, start, len, fill, outline);
|
||||
// Renderer.R3D.renderFilled(start,len,fill,stack);
|
||||
// Renderer.R3D.renderOutline(start,len,outline,stack);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.function.BooleanSupplier;
|
|||
|
||||
public class TabGui extends Module {
|
||||
@Getter
|
||||
final
|
||||
Stack<TabPane> tabStack = new Stack<>();
|
||||
|
||||
public TabGui() {
|
||||
|
|
|
@ -34,7 +34,7 @@ public class Nuker extends Module {
|
|||
}
|
||||
return piss;
|
||||
});
|
||||
EnumSetting<Mode> modeSetting = this.config.create(new EnumSetting.Builder<>(Mode.Interaction)
|
||||
final EnumSetting<Mode> modeSetting = this.config.create(new EnumSetting.Builder<>(Mode.Interaction)
|
||||
.name("Mode")
|
||||
.description("How to break block")
|
||||
.get());
|
||||
|
@ -60,43 +60,37 @@ public class Nuker extends Module {
|
|||
@Override
|
||||
public void tick() {
|
||||
switch (modeSetting.getValue()) {
|
||||
case Packet -> {
|
||||
iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
Block b = bs.getBlock();
|
||||
if (b == Blocks.WATER || b == Blocks.LAVA) return;
|
||||
case Packet -> iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
Block b = bs.getBlock();
|
||||
if (b == Blocks.WATER || b == Blocks.LAVA) return;
|
||||
// BlockHitResult bhr = new BlockHitResult(vec3d, Direction.DOWN,bp,false);
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(bp), new Vec3d(1, 1, 1), 1000);
|
||||
// client.getNetworkHandler().sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND,bhr));
|
||||
});
|
||||
case Griefing -> iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
if (instantBreaks.contains(bs.getBlock())) {
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(bp), new Vec3d(1, 1, 1), 1000);
|
||||
// client.getNetworkHandler().sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND,bhr));
|
||||
});
|
||||
}
|
||||
case Griefing -> {
|
||||
iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
if (instantBreaks.contains(bs.getBlock())) {
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, bp, Direction.DOWN));
|
||||
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(bp), new Vec3d(1, 1, 1), 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
case Interaction -> {
|
||||
iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
Block b = bs.getBlock();
|
||||
if (b == Blocks.WATER || b == Blocks.LAVA) return;
|
||||
client.interactionManager.attackBlock(bp, Direction.DOWN);
|
||||
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(bp), new Vec3d(1, 1, 1), 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
case Interaction -> iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
|
||||
BlockPos bp = new BlockPos(vec3d);
|
||||
BlockState bs = client.world.getBlockState(bp);
|
||||
if (bs.isAir()) return;
|
||||
Block b = bs.getBlock();
|
||||
if (b == Blocks.WATER || b == Blocks.LAVA) return;
|
||||
client.interactionManager.attackBlock(bp, Direction.DOWN);
|
||||
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(bp), new Vec3d(1, 1, 1), 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
|
||||
public class AccurateFrameRateCounter {
|
||||
public static final AccurateFrameRateCounter globalInstance = new AccurateFrameRateCounter();
|
||||
List<Long> records = new ArrayList<>();
|
||||
final List<Long> records = new ArrayList<>();
|
||||
|
||||
public void recordFrame() {
|
||||
long c = System.currentTimeMillis();
|
||||
|
|
|
@ -83,6 +83,7 @@ public class Rotations {
|
|||
FreeLook fl = ModuleRegistry.getByClass(FreeLook.class);
|
||||
double required = Math.toDegrees(Math.atan2(delZ, delX)) - 90, delta, add, speed;
|
||||
double sqrt1 = Math.sqrt(delX * delX + delZ * delZ);
|
||||
double degTan = -Math.toDegrees(Math.atan2(delY, sqrt1));
|
||||
if (fl.isEnabled()) {
|
||||
// setting yaw
|
||||
|
||||
|
@ -95,7 +96,7 @@ public class Rotations {
|
|||
fl.newyaw = (fl.newyaw + (float) add);
|
||||
|
||||
// setting pitch
|
||||
required = -Math.toDegrees(Math.atan2(delY, sqrt1));
|
||||
required = degTan;
|
||||
delta = MathHelper.wrapDegrees(required - fl.newpitch);
|
||||
speed = Math.abs(delta / laziness);
|
||||
add = speed * (delta >= 0 ? 1 : -1);
|
||||
|
@ -114,7 +115,7 @@ public class Rotations {
|
|||
ShadowMain.client.player.setYaw(ShadowMain.client.player.getYaw() + (float) add);
|
||||
|
||||
// setting pitch
|
||||
required = -Math.toDegrees(Math.atan2(delY, sqrt1));
|
||||
required = degTan;
|
||||
delta = MathHelper.wrapDegrees(required - ShadowMain.client.player.getPitch());
|
||||
speed = Math.abs(delta / laziness);
|
||||
add = speed * (delta >= 0 ? 1 : -1);
|
||||
|
|
|
@ -11,7 +11,7 @@ public interface FontAdapter {
|
|||
|
||||
void drawString(MatrixStack matrices, String text, double x, double y, int color);
|
||||
|
||||
int drawString(MatrixStack matrices, String text, float x, float y, float r, float g, float b, float a);
|
||||
void drawString(MatrixStack matrices, String text, float x, float y, float r, float g, float b, float a);
|
||||
|
||||
void drawCenteredString(MatrixStack matrices, String text, double x, double y, int color);
|
||||
|
||||
|
|
|
@ -44,9 +44,8 @@ public class BruhAdapter implements FontAdapter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public int drawString(MatrixStack matrices, String text, float x, float y, float r, float g, float b, float a) {
|
||||
public void drawString(MatrixStack matrices, String text, float x, float y, float r, float g, float b, float a) {
|
||||
renderer.drawString(matrices, text, x, y, r, g, b, a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,12 +8,7 @@ import net.minecraft.nbt.NbtCompound;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class NbtGroup {
|
||||
final NbtElement[] elements;
|
||||
|
||||
public NbtGroup(NbtElement... elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
public record NbtGroup(NbtElement... elements) {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
@ -8,12 +8,10 @@ import net.minecraft.entity.AreaEffectCloudEntity;
|
|||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.module.impl.misc.AntiCrash;
|
||||
import net.shadow.client.mixinUtil.ParticleManagerDuck;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
|
||||
@Debug(export = true)
|
||||
@Mixin(AreaEffectCloudEntity.class)
|
||||
public class AreaEffectCloudEntityMixin {
|
||||
@ModifyVariable(method = "tick", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/util/math/MathHelper;ceil(F)I"), index = 4)
|
||||
|
|
|
@ -8,7 +8,6 @@ import io.netty.channel.Channel;
|
|||
import io.netty.handler.proxy.Socks4ProxyHandler;
|
||||
import io.netty.handler.proxy.Socks5ProxyHandler;
|
||||
import net.shadow.client.feature.gui.screen.ProxyManagerScreen;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
|
@ -17,7 +16,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
import java.net.InetSocketAddress;
|
||||
|
||||
@Mixin(targets = "net/minecraft/network/ClientConnection$1")
|
||||
@Debug(export = true)
|
||||
public class ClientConnection1Mixin {
|
||||
|
||||
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At("HEAD"))
|
||||
|
|
|
@ -8,12 +8,10 @@ import net.minecraft.client.model.ModelPart;
|
|||
import net.minecraft.client.render.VertexConsumer;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.render.ESP;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Debug(export = true)
|
||||
@Mixin(ModelPart.Cuboid.class)
|
||||
public class ModelPartCuboidMixin {
|
||||
@Redirect(method = "renderCuboid", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/VertexConsumer;vertex(FFFFFFFFFIIFFF)V"))
|
||||
|
|
|
@ -13,7 +13,6 @@ import com.mojang.authlib.minecraft.MinecraftSessionService;
|
|||
import net.minecraft.client.texture.PlayerSkinProvider;
|
||||
import net.minecraft.util.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
@ -26,7 +25,6 @@ import java.io.InputStreamReader;
|
|||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
@Debug(export = true)
|
||||
@Mixin(PlayerSkinProvider.class)
|
||||
public class PlayerSkinMixin {
|
||||
private static JsonObject capes;
|
||||
|
@ -74,7 +72,7 @@ public class PlayerSkinMixin {
|
|||
private void setupCapes() {
|
||||
try {
|
||||
URL url = new URL("https://moleapi.pythonanywhere.com/retrieve");
|
||||
capes = new JsonParser().parse(new InputStreamReader(url.openStream())).getAsJsonObject();
|
||||
capes = JsonParser.parseReader(new InputStreamReader(url.openStream())).getAsJsonObject();
|
||||
} catch (Exception e) {
|
||||
System.err.println("[Shadow] Failed to load capes from API");
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -5,12 +5,10 @@
|
|||
package net.shadow.client.mixin;
|
||||
|
||||
import net.minecraft.client.gui.widget.SliderWidget;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Debug(export = true)
|
||||
@Mixin(SliderWidget.class)
|
||||
public class SliderWidgetMixin {
|
||||
// Makes the mouse click more accurate by replacing the expected indicator width (8px) with the actual, new indicator width (1.5 px, rounded to 2)
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.shadow.client.feature.module.ModuleRegistry;
|
|||
import net.shadow.client.feature.module.impl.render.BlockHighlighting;
|
||||
import net.shadow.client.feature.module.impl.render.Freecam;
|
||||
import net.shadow.client.feature.module.impl.world.XRAY;
|
||||
import org.spongepowered.asm.mixin.Debug;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
|
@ -21,7 +20,6 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
|
||||
import java.util.SortedSet;
|
||||
|
||||
@Debug(export = true)
|
||||
@Mixin(WorldRenderer.class)
|
||||
public class WorldRendererMixin {
|
||||
@ModifyArg(method = "render",
|
||||
|
@ -37,9 +35,6 @@ public class WorldRendererMixin {
|
|||
ObjectSet<Long2ObjectMap.Entry<SortedSet<BlockBreakingInfo>>> a(Long2ObjectMap<SortedSet<BlockBreakingInfo>> instance, MatrixStack matrices) {
|
||||
BlockHighlighting bbr = ModuleRegistry.getByClass(BlockHighlighting.class);
|
||||
if (bbr.isEnabled()) {
|
||||
// for (Long2ObjectMap.Entry<SortedSet<BlockBreakingInfo>> sortedSetEntry : instance.long2ObjectEntrySet()) {
|
||||
// bbr.renderEntry(matrices, sortedSetEntry);
|
||||
// }
|
||||
return ObjectSet.of();
|
||||
}
|
||||
return instance.long2ObjectEntrySet();
|
||||
|
|
Loading…
Reference in a new issue