This commit is contained in:
0x3C50 2022-03-31 23:55:20 +02:00
parent 1d8a78c559
commit bc33d7d8f1
6 changed files with 17 additions and 19 deletions

View file

@ -8,6 +8,7 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.render.BlockBreakingInfo; import net.minecraft.client.render.BlockBreakingInfo;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box; import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
@ -15,10 +16,6 @@ import net.minecraft.util.shape.VoxelShape;
import net.shadow.client.ShadowMain; import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module; import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType; import net.shadow.client.feature.module.ModuleType;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.network.packet.s2c.play.BlockEventS2CPacket;
import net.minecraft.network.packet.s2c.play.BlockUpdateS2CPacket;
import net.shadow.client.helper.event.EventType; import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events; import net.shadow.client.helper.event.Events;
import net.shadow.client.helper.event.events.PacketEvent; import net.shadow.client.helper.event.events.PacketEvent;
@ -33,11 +30,11 @@ public class BlockHighlighting extends Module {
public BlockHighlighting() { public BlockHighlighting() {
super("BlockHighlighting", "Renders better block breaking animations", ModuleType.RENDER); super("BlockHighlighting", "Renders better block breaking animations", ModuleType.RENDER);
Events.registerEventHandler(EventType.PACKET_RECEIVE, p -> { Events.registerEventHandler(EventType.PACKET_RECEIVE, p -> {
if(!this.isEnabled()) return; if (!this.isEnabled()) return;
PacketEvent event = (PacketEvent)p; PacketEvent event = (PacketEvent) p;
if(event.getPacket() instanceof BlockUpdateS2CPacket packet){ if (event.getPacket() instanceof BlockUpdateS2CPacket packet) {
BlockPos real = packet.getPos(); BlockPos real = packet.getPos();
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255),Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(),Vec3d.of(real),new Vec3d(1,1,1), 1000); Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(real), new Vec3d(1, 1, 1), 1000);
} }
}); });
} }

View file

@ -21,6 +21,7 @@ public class ItemByteSize extends Module {
if (!this.isEnabled()) { if (!this.isEnabled()) {
return; return;
} }
LoreQueryEvent e = (LoreQueryEvent) event; LoreQueryEvent e = (LoreQueryEvent) event;
ByteCounter inst = ByteCounter.instance(); ByteCounter inst = ByteCounter.instance();
inst.reset(); inst.reset();

View file

@ -9,6 +9,7 @@ import net.minecraft.item.BlockItem;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.ShadowMain; import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module; import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType; import net.shadow.client.feature.module.ModuleType;
@ -17,10 +18,6 @@ import net.shadow.client.helper.event.Events;
import net.shadow.client.helper.event.events.MouseEvent; import net.shadow.client.helper.event.events.MouseEvent;
import net.shadow.client.helper.render.Renderer; import net.shadow.client.helper.render.Renderer;
import net.shadow.client.helper.util.Utils; import net.shadow.client.helper.util.Utils;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.Vec3d;
public class AirPlace extends Module { public class AirPlace extends Module {
@ -29,13 +26,15 @@ public class AirPlace extends Module {
public AirPlace() { public AirPlace() {
super("AirPlace", "template", ModuleType.MISC); super("AirPlace", "template", ModuleType.MISC);
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> { Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
if(!this.isEnabled()) return; if (!this.isEnabled()) return;
if(enabled && ((MouseEvent)event).getButton() == 1 && ((MouseEvent)event).getAction() == 1){ if (enabled && ((MouseEvent) event).getButton() == 1 && ((MouseEvent) event).getAction() == 1) {
if(ShadowMain.client.currentScreen != null) return; if (ShadowMain.client.currentScreen != null) return;
try { try {
if(!client.world.getBlockState(((BlockHitResult) ShadowMain.client.crosshairTarget).getBlockPos()).isAir()) return; if (!client.world.getBlockState(((BlockHitResult) ShadowMain.client.crosshairTarget).getBlockPos()).isAir())
return;
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, (BlockHitResult) ShadowMain.client.crosshairTarget)); ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, (BlockHitResult) ShadowMain.client.crosshairTarget));
if((client.player.getMainHandStack().getItem() instanceof BlockItem)) Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255),Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(),Vec3d.of(((BlockHitResult) ShadowMain.client.crosshairTarget).getBlockPos()),new Vec3d(1,1,1), 1000); if ((client.player.getMainHandStack().getItem() instanceof BlockItem))
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(), Vec3d.of(((BlockHitResult) ShadowMain.client.crosshairTarget).getBlockPos()), new Vec3d(1, 1, 1), 1000);
ShadowMain.client.player.swingHand(Hand.MAIN_HAND); ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
event.setCancelled(true); event.setCancelled(true);
} catch (Exception ignored) { } catch (Exception ignored) {

View file

@ -38,6 +38,7 @@ public class Nuker extends Module {
.name("Mode") .name("Mode")
.description("How to break block") .description("How to break block")
.get()); .get());
public Nuker() { public Nuker() {
super("Nuker", "The nuke", ModuleType.WORLD); super("Nuker", "The nuke", ModuleType.WORLD);
} }

View file

@ -118,7 +118,7 @@ public class Scaffold extends Module {
int c = Objects.requireNonNull(client.player).getInventory().selectedSlot; int c = Objects.requireNonNull(client.player).getInventory().selectedSlot;
client.player.getInventory().selectedSlot = s; client.player.getInventory().selectedSlot = s;
BlockHitResult bhr = new BlockHitResult(new Vec3d(bp.getX(), bp.getY(), bp.getZ()), Direction.DOWN, bp, false); BlockHitResult bhr = new BlockHitResult(new Vec3d(bp.getX(), bp.getY(), bp.getZ()), Direction.DOWN, bp, false);
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); 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);
Objects.requireNonNull(client.interactionManager).interactBlock(client.player, client.world, Hand.MAIN_HAND, bhr); Objects.requireNonNull(client.interactionManager).interactBlock(client.player, client.world, Hand.MAIN_HAND, bhr);
client.player.getInventory().selectedSlot = c; client.player.getInventory().selectedSlot = c;
} }

View file

@ -39,7 +39,7 @@ public class Renderer {
public static void renderFadingBlocks(MatrixStack stack) { public static void renderFadingBlocks(MatrixStack stack) {
fades.removeIf(FadingBlock::isDead); fades.removeIf(FadingBlock::isDead);
for (FadingBlock fade : fades) { for (FadingBlock fade : new ArrayList<>(fades)) {
long lifetimeLeft = fade.getLifeTimeLeft(); long lifetimeLeft = fade.getLifeTimeLeft();
double progress = lifetimeLeft / (double) fade.lifeTime; double progress = lifetimeLeft / (double) fade.lifeTime;
Color out = Util.modify(fade.outline, -1, -1, -1, (int) (fade.outline.getAlpha() * progress)); Color out = Util.modify(fade.outline, -1, -1, -1, (int) (fade.outline.getAlpha() * progress));