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.client.render.BlockBreakingInfo;
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.Box;
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.feature.module.Module;
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.Events;
import net.shadow.client.helper.event.events.PacketEvent;
@ -33,11 +30,11 @@ public class BlockHighlighting extends Module {
public BlockHighlighting() {
super("BlockHighlighting", "Renders better block breaking animations", ModuleType.RENDER);
Events.registerEventHandler(EventType.PACKET_RECEIVE, p -> {
if(!this.isEnabled()) return;
PacketEvent event = (PacketEvent)p;
if(event.getPacket() instanceof BlockUpdateS2CPacket packet){
if (!this.isEnabled()) return;
PacketEvent event = (PacketEvent) p;
if (event.getPacket() instanceof BlockUpdateS2CPacket packet) {
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()) {
return;
}
LoreQueryEvent e = (LoreQueryEvent) event;
ByteCounter inst = ByteCounter.instance();
inst.reset();

View file

@ -9,6 +9,7 @@ import net.minecraft.item.BlockItem;
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;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
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.render.Renderer;
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 {
@ -29,13 +26,15 @@ public class AirPlace extends Module {
public AirPlace() {
super("AirPlace", "template", ModuleType.MISC);
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
if(!this.isEnabled()) return;
if(enabled && ((MouseEvent)event).getButton() == 1 && ((MouseEvent)event).getAction() == 1){
if(ShadowMain.client.currentScreen != null) return;
if (!this.isEnabled()) return;
if (enabled && ((MouseEvent) event).getButton() == 1 && ((MouseEvent) event).getAction() == 1) {
if (ShadowMain.client.currentScreen != null) return;
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));
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);
event.setCancelled(true);
} catch (Exception ignored) {

View file

@ -38,6 +38,7 @@ public class Nuker extends Module {
.name("Mode")
.description("How to break block")
.get());
public Nuker() {
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;
client.player.getInventory().selectedSlot = s;
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);
client.player.getInventory().selectedSlot = c;
}

View file

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