the format

This commit is contained in:
0x3C50 2022-03-31 23:27:10 +02:00
parent f081006aca
commit ded843d309
21 changed files with 154 additions and 161 deletions

View file

@ -12,7 +12,6 @@ public class Test extends Command {
} }
@Override @Override
public void onExecute(String[] args) { public void onExecute(String[] args) {
} }

View file

@ -50,10 +50,10 @@ public class ProxyManagerScreen extends ClientScreen {
port = new RoundTextFieldWidget(sourceX, sourceY + yOffset, wWidth, 20, "Port"); port = new RoundTextFieldWidget(sourceX, sourceY + yOffset, wWidth, 20, "Port");
yOffset += port.getHeight() + padding(); yOffset += port.getHeight() + padding();
user = new RoundTextFieldWidget(sourceX, sourceY+yOffset,wWidth,20,"Username (opt.)"); user = new RoundTextFieldWidget(sourceX, sourceY + yOffset, wWidth, 20, "Username (opt.)");
yOffset += user.getHeight()+padding(); yOffset += user.getHeight() + padding();
pass = new RoundTextFieldWidget(sourceX,sourceY+yOffset,wWidth,20,"Password (opt.)"); pass = new RoundTextFieldWidget(sourceX, sourceY + yOffset, wWidth, 20, "Password (opt.)");
yOffset += pass.getHeight()+padding(); yOffset += pass.getHeight() + padding();
if (currentProxy != null) { if (currentProxy != null) {
ip.setText(currentProxy.address); ip.setText(currentProxy.address);
port.setText(currentProxy.port + ""); port.setText(currentProxy.port + "");
@ -118,11 +118,11 @@ public class ProxyManagerScreen extends ClientScreen {
port.setY(sourceY + yOffset); port.setY(sourceY + yOffset);
yOffset += port.getHeight() + padding(); yOffset += port.getHeight() + padding();
user.setX(sourceX); user.setX(sourceX);
user.setY(sourceY+yOffset); user.setY(sourceY + yOffset);
yOffset += user.getHeight()+padding(); yOffset += user.getHeight() + padding();
pass.setX(sourceX); pass.setX(sourceX);
pass.setY(sourceY+yOffset); pass.setY(sourceY + yOffset);
yOffset += pass.getHeight()+padding(); yOffset += pass.getHeight() + padding();
type.setX(sourceX); type.setX(sourceX);
type.setY(sourceY + yOffset); type.setY(sourceY + yOffset);
yOffset += 20 + padding(); yOffset += 20 + padding();

View file

@ -6,7 +6,8 @@ package net.shadow.client.feature.module;
import net.shadow.client.feature.module.impl.combat.*; import net.shadow.client.feature.module.impl.combat.*;
import net.shadow.client.feature.module.impl.crash.*; import net.shadow.client.feature.module.impl.crash.AnimationCrash;
import net.shadow.client.feature.module.impl.crash.BookInflator;
import net.shadow.client.feature.module.impl.exploit.*; import net.shadow.client.feature.module.impl.exploit.*;
import net.shadow.client.feature.module.impl.grief.*; import net.shadow.client.feature.module.impl.grief.*;
import net.shadow.client.feature.module.impl.misc.*; import net.shadow.client.feature.module.impl.misc.*;

View file

@ -5,8 +5,6 @@
package net.shadow.client.feature.module; package net.shadow.client.feature.module;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
public class Template extends Module { public class Template extends Module {

View file

@ -4,16 +4,16 @@
package net.shadow.client.feature.module.impl.crash; package net.shadow.client.feature.module.impl.crash;
import java.util.Objects;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.HandSwingC2SPacket;
import net.minecraft.util.Hand;
import net.minecraft.world.World;
import net.shadow.client.ShadowMain; import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting; import net.shadow.client.feature.config.DoubleSetting;
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.network.packet.c2s.play.HandSwingC2SPacket;
import net.minecraft.util.Hand; import java.util.Objects;
import net.minecraft.world.World;
public class AnimationCrash extends Module { public class AnimationCrash extends Module {
@ -30,11 +30,11 @@ public class AnimationCrash extends Module {
this.setEnabled(false); this.setEnabled(false);
return; return;
} }
try{ try {
for (int i = 0; i < power.getValue(); i++) { for (int i = 0; i < power.getValue(); i++) {
Objects.requireNonNull(ShadowMain.client.player.networkHandler).sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND)); Objects.requireNonNull(ShadowMain.client.player.networkHandler).sendPacket(new HandSwingC2SPacket(Hand.MAIN_HAND));
} }
}catch(NullPointerException e){ } catch (NullPointerException e) {
} }
} }

View file

@ -18,14 +18,15 @@ import org.apache.commons.lang3.RandomStringUtils;
public class BookInflator extends Module { public class BookInflator extends Module {
int slot = 5; int slot = 5;
public BookInflator() { public BookInflator() {
super("BookInflater", "Writes a book thats big", ModuleType.CRASH); super("BookInflater", "Writes a book thats big", ModuleType.CRASH);
} }
@Override @Override
public void tick() { public void tick() {
for(int i = 0; i < 5; i++){ for (int i = 0; i < 5; i++) {
if(slot > 36 + 9){ if (slot > 36 + 9) {
slot = 0; slot = 0;
return; return;
} }
@ -34,7 +35,7 @@ public class BookInflator extends Module {
NbtCompound tag = new NbtCompound(); NbtCompound tag = new NbtCompound();
NbtList list = new NbtList(); NbtList list = new NbtList();
for (int j = 0; j < 99; j++) { for (int j = 0; j < 99; j++) {
list.add(NbtString.of("{\"text\":"+ RandomStringUtils.randomAlphabetic(200) + "\"}")); list.add(NbtString.of("{\"text\":" + RandomStringUtils.randomAlphabetic(200) + "\"}"));
} }
tag.put("author", NbtString.of(RandomStringUtils.randomAlphabetic(9000))); tag.put("author", NbtString.of(RandomStringUtils.randomAlphabetic(9000)));
tag.put("title", NbtString.of(RandomStringUtils.randomAlphabetic(25564))); tag.put("title", NbtString.of(RandomStringUtils.randomAlphabetic(25564)));

View file

@ -4,15 +4,9 @@
package net.shadow.client.feature.module.impl.grief; package net.shadow.client.feature.module.impl.grief;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.ShadowMain;
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.render.Renderer;
import net.shadow.client.helper.util.Utils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.nbt.StringNbtReader; import net.minecraft.nbt.StringNbtReader;
@ -23,23 +17,40 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.shadow.client.ShadowMain;
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.render.Renderer;
import net.shadow.client.helper.util.Utils;
import java.awt.Color; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class AutoFireball extends Module { 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); BlockPos walkman = new BlockPos(0, 0, 0);
List<BlockPos> targets = new ArrayList<>(); List<BlockPos> targets = new ArrayList<>();
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};
public AutoFireball() { public AutoFireball() {
super("AutoFireball", "auto nuke shit using fireballs", ModuleType.MISC); super("AutoFireball", "auto nuke shit using fireballs", ModuleType.MISC);
} }
public static void raycast(BlockPos destination) {
ItemStack item = new ItemStack(Items.COW_SPAWN_EGG, 1);
ItemStack before = ShadowMain.client.player.getMainHandStack();
try {
item.setNbt(StringNbtReader.parse("{EntityTag:{id:\"minecraft:end_crystal\",ShowBottom:0b,BeamTarget:{X:" + destination.getX() + ",Y:" + destination.getY() + ",Z:" + destination.getZ() + "}}}"));
} catch (Exception ignored) {
}
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, item));
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(ShadowMain.client.player.getPos().add(new Vec3d(0, -2, 0)), Direction.UP, ShadowMain.client.player.getBlockPos().offset(Direction.DOWN, 2), false)));
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, before));
}
@Override @Override
public void tick() { public void tick() {
@ -63,22 +74,22 @@ public class AutoFireball extends Module {
for (int z = -l; z < l; z++) { for (int z = -l; z < l; z++) {
BlockPos pos = before.add(new BlockPos(x, y, z)); BlockPos pos = before.add(new BlockPos(x, y, z));
Block block = ShadowMain.client.world.getBlockState(pos).getBlock(); Block block = ShadowMain.client.world.getBlockState(pos).getBlock();
for(Block b : blocks){ for (Block b : blocks) {
if (b.equals(block)){ if (b.equals(block)) {
boolean executebreak = false; boolean executebreak = false;
for(BlockPos bl : new ArrayList<>(targets)){ for (BlockPos bl : new ArrayList<>(targets)) {
if(distanceToBlocks(bl, pos) < 10){ if (distanceToBlocks(bl, pos) < 10) {
executebreak = true; executebreak = true;
} }
} }
if(!executebreak){ if (!executebreak) {
targets.add(pos); targets.add(pos);
} }
} }
} }
} }
ItemStack b4 = ShadowMain.client.player.getMainHandStack(); ItemStack b4 = ShadowMain.client.player.getMainHandStack();
for(BlockPos nuke : new ArrayList<>(targets)){ for (BlockPos nuke : new ArrayList<>(targets)) {
ItemStack fireball = new ItemStack(Items.BLAZE_SPAWN_EGG, 1); ItemStack fireball = new ItemStack(Items.BLAZE_SPAWN_EGG, 1);
try { try {
fireball.setNbt(StringNbtReader.parse("{EntityTag:{id:\"minecraft:fireball\",ExplosionPower:25b,Pos:[" + nuke.getX() + ".0," + nuke.getY() + ".9," + nuke.getZ() + ".0],power:[0.0,-1.0,0.0]}}")); fireball.setNbt(StringNbtReader.parse("{EntityTag:{id:\"minecraft:fireball\",ExplosionPower:25b,Pos:[" + nuke.getX() + ".0," + nuke.getY() + ".9," + nuke.getZ() + ".0],power:[0.0,-1.0,0.0]}}"));
@ -96,18 +107,6 @@ public class AutoFireball extends Module {
}).start(); }).start();
} }
public static void raycast(BlockPos destination) {
ItemStack item = new ItemStack(Items.COW_SPAWN_EGG, 1);
ItemStack before = ShadowMain.client.player.getMainHandStack();
try {
item.setNbt(StringNbtReader.parse("{EntityTag:{id:\"minecraft:end_crystal\",ShowBottom:0b,BeamTarget:{X:" + destination.getX() + ",Y:" + destination.getY() + ",Z:" + destination.getZ() + "}}}"));
} catch (Exception ignored) {
}
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, item));
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(ShadowMain.client.player.getPos().add(new Vec3d(0, -2, 0)), Direction.UP, ShadowMain.client.player.getBlockPos().offset(Direction.DOWN, 2), false)));
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, before));
}
@Override @Override
public void disable() { public void disable() {
} }
@ -119,7 +118,7 @@ public class AutoFireball extends Module {
@Override @Override
public void onWorldRender(MatrixStack matrices) { public void onWorldRender(MatrixStack matrices) {
for(BlockPos globalpos : new ArrayList<>(targets)){ for (BlockPos globalpos : new ArrayList<>(targets)) {
Vec3d vp = new Vec3d(globalpos.getX() - 1.5, globalpos.getY() - 1.5, globalpos.getZ() - 1.5); Vec3d vp = new Vec3d(globalpos.getX() - 1.5, globalpos.getY() - 1.5, globalpos.getZ() - 1.5);
Renderer.R3D.renderFilled(vp, new Vec3d(3, 3, 3), new Color(53, 53, 53, 100), matrices); Renderer.R3D.renderFilled(vp, new Vec3d(3, 3, 3), new Color(53, 53, 53, 100), matrices);
} }

View file

@ -6,6 +6,7 @@ package net.shadow.client.feature.module.impl.grief;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
@ -18,7 +19,6 @@ 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;
import net.minecraft.client.util.math.MatrixStack;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -29,7 +29,7 @@ public class AutoIgnite extends Module {
} }
int getLighterSlot() { int getLighterSlot() {
for(int i = 0;i<9;i++) { for (int i = 0; i < 9; i++) {
ItemStack is = ShadowMain.client.player.getInventory().getStack(i); ItemStack is = ShadowMain.client.player.getInventory().getStack(i);
if (is.getItem() == Items.FLINT_AND_STEEL) return i; if (is.getItem() == Items.FLINT_AND_STEEL) return i;
} }
@ -42,11 +42,12 @@ public class AutoIgnite extends Module {
if (lighterSlot == -1) return; if (lighterSlot == -1) return;
double searchRad = Math.ceil(ShadowMain.client.interactionManager.getReachDistance()); double searchRad = Math.ceil(ShadowMain.client.interactionManager.getReachDistance());
List<BlockPos> blocksToIgnite = new ArrayList<>(); List<BlockPos> blocksToIgnite = new ArrayList<>();
for(double x = -searchRad;x<searchRad;x++) { for (double x = -searchRad; x < searchRad; x++) {
for(double y = -searchRad;y<searchRad;y++) { for (double y = -searchRad; y < searchRad; y++) {
for(double z = -searchRad;z<searchRad;z++) { for (double z = -searchRad; z < searchRad; z++) {
Vec3d vPos = ShadowMain.client.player.getEyePos().add(x,y,z); Vec3d vPos = ShadowMain.client.player.getEyePos().add(x, y, z);
if (vPos.distanceTo(ShadowMain.client.player.getEyePos()) > ShadowMain.client.interactionManager.getReachDistance()) continue; if (vPos.distanceTo(ShadowMain.client.player.getEyePos()) > ShadowMain.client.interactionManager.getReachDistance())
continue;
BlockPos bp = new BlockPos(vPos); BlockPos bp = new BlockPos(vPos);
BlockState bs = ShadowMain.client.world.getBlockState(bp); BlockState bs = ShadowMain.client.world.getBlockState(bp);
if (bs.getBlock() == Blocks.TNT) { if (bs.getBlock() == Blocks.TNT) {
@ -60,8 +61,8 @@ public class AutoIgnite extends Module {
ShadowMain.client.getNetworkHandler().sendPacket(new UpdateSelectedSlotC2SPacket(lighterSlot)); ShadowMain.client.getNetworkHandler().sendPacket(new UpdateSelectedSlotC2SPacket(lighterSlot));
for (BlockPos blockPos : blocksToIgnite) { for (BlockPos blockPos : blocksToIgnite) {
BlockHitResult bhr = new BlockHitResult(Vec3d.of(blockPos).add(0.5,0.5,0.5), Direction.DOWN,blockPos,false); BlockHitResult bhr = new BlockHitResult(Vec3d.of(blockPos).add(0.5, 0.5, 0.5), Direction.DOWN, blockPos, false);
PlayerInteractBlockC2SPacket interact = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND,bhr); PlayerInteractBlockC2SPacket interact = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
ShadowMain.client.getNetworkHandler().sendPacket(interact); ShadowMain.client.getNetworkHandler().sendPacket(interact);
} }

View file

@ -20,6 +20,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
public class DiscordRPC extends Module { public class DiscordRPC extends Module {
static ExecutorService offThreadExec = Executors.newFixedThreadPool(1);
Timer rpcUpdate = new Timer();
long updateRequested = 0;
boolean updateOutstanding = false;
StringSetting details = this.config.create( StringSetting details = this.config.create(
new StringSetting.Builder("Using Shadow V2") new StringSetting.Builder("Using Shadow V2")
.name("Title") .name("Title")
@ -38,17 +42,15 @@ public class DiscordRPC extends Module {
}) })
.get() .get()
); );
long startTime;
public DiscordRPC() { public DiscordRPC() {
super("DiscordRPC", "Shows a discord rich presence", ModuleType.MISC); super("DiscordRPC", "Shows a discord rich presence", ModuleType.MISC);
} }
Timer rpcUpdate = new Timer();
long updateRequested = 0;
boolean updateOutstanding = false;
void update() { void update() {
updateRequested = System.currentTimeMillis()+2000; updateRequested = System.currentTimeMillis() + 2000;
updateOutstanding = true; updateOutstanding = true;
} }
@ -61,8 +63,6 @@ public class DiscordRPC extends Module {
} }
} }
static ExecutorService offThreadExec = Executors.newFixedThreadPool(1);
@Override @Override
public void onFastTick() { public void onFastTick() {
actuallyUpdate(); actuallyUpdate();
@ -72,31 +72,32 @@ public class DiscordRPC extends Module {
public void tick() { public void tick() {
} }
long startTime;
void setState() { void setState() {
RichPresence rp = new RichPresence(); RichPresence rp = new RichPresence();
rp.setDetails(details.getValue()); rp.setDetails(details.getValue());
rp.setState(state.getValue()); rp.setState(state.getValue());
rp.setLargeImage("icon", "discord.gg/moles"); rp.setLargeImage("icon", "discord.gg/moles");
rp.setSmallImage("grass", "made by saturn5Vfive#6767 and 0x150 the 2nd#8918"); rp.setSmallImage("grass", "0x150 the 2nd#8918, saturn5Vfive#6767");
rp.setStart(startTime); rp.setStart(startTime);
DiscordIPC.setActivity(rp); DiscordIPC.setActivity(rp);
} }
void applyRpc() { void applyRpc() {
IPCUser user = DiscordIPC.getUser(); IPCUser user = DiscordIPC.getUser();
Utils.Logging.success("Connected to "+ user.username+"#"+user.discriminator); Utils.Logging.success("Connected to " + user.username + "#" + user.discriminator);
setState(); setState();
Notification.create(3000,"Discord RPC", Notification.Type.SUCCESS, "Connected!"); Notification.create(3000, "Discord RPC", Notification.Type.SUCCESS, "Connected!");
} }
@Override @Override
public void enable() { public void enable() {
startTime = Instant.now().getEpochSecond(); startTime = Instant.now().getEpochSecond();
Notification.create(3000,"Discord RPC", Notification.Type.INFO,"Attempting to connect..."); Notification.create(3000, "Discord RPC", Notification.Type.INFO, "Attempting to connect...");
offThreadExec.execute(() -> { offThreadExec.execute(() -> {
boolean result = DiscordIPC.start(958479347390500874L, this::applyRpc); boolean result = DiscordIPC.start(958479347390500874L, this::applyRpc);
if (!result) { if (!result) {
Notification.create(5000,"Discord RPC", Notification.Type.ERROR, "Discord isn't open! Open discord and enable the module again."); Notification.create(5000, "Discord RPC", Notification.Type.ERROR, "Discord isn't open! Open discord and enable the module again.");
setEnabled(false); setEnabled(false);
} }
}); });

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module.impl.render;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap; 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.render.WorldRenderer; import net.minecraft.client.util.math.MatrixStack;
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,7 +15,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.shadow.client.helper.render.Renderer; import net.shadow.client.helper.render.Renderer;
import net.shadow.client.mixin.WorldRendererAccessor; import net.shadow.client.mixin.WorldRendererAccessor;
@ -38,22 +37,22 @@ public class BetterBlockBreaking extends Module {
long k = e.getLongKey(); long k = e.getLongKey();
BlockPos kv = BlockPos.fromLong(k); BlockPos kv = BlockPos.fromLong(k);
int stage = bbrs.last().getStage()+1; int stage = bbrs.last().getStage() + 1;
double stageProg = stage/10d; double stageProg = stage / 10d;
BlockState bs = ShadowMain.client.world.getBlockState(kv); BlockState bs = ShadowMain.client.world.getBlockState(kv);
VoxelShape vs = bs.getOutlineShape(ShadowMain.client.world,kv); VoxelShape vs = bs.getOutlineShape(ShadowMain.client.world, kv);
if (vs.isEmpty()) return; if (vs.isEmpty()) return;
Box bb = vs.getBoundingBox(); Box bb = vs.getBoundingBox();
double invProg = 1-stageProg; double invProg = 1 - stageProg;
double lenX = bb.getXLength(); double lenX = bb.getXLength();
double lenY = bb.getYLength(); double lenY = bb.getYLength();
double lenZ = bb.getZLength(); double lenZ = bb.getZLength();
bb = bb.shrink(bb.getXLength()*invProg,bb.getYLength()*invProg,bb.getZLength()*invProg); bb = bb.shrink(bb.getXLength() * invProg, bb.getYLength() * invProg, bb.getZLength() * invProg);
Vec3d start = new Vec3d(bb.minX, bb.minY, bb.minZ).add(Vec3d.of(kv)).add(lenX*invProg/2d,lenY*invProg/2d,lenZ*invProg/2d); Vec3d start = new Vec3d(bb.minX, bb.minY, bb.minZ).add(Vec3d.of(kv)).add(lenX * invProg / 2d, lenY * invProg / 2d, lenZ * invProg / 2d);
Vec3d len = new Vec3d(bb.getXLength(),bb.getYLength(),bb.getZLength()); Vec3d len = new Vec3d(bb.getXLength(), bb.getYLength(), bb.getZLength());
Color outline = new Color(50,50,50,255); Color outline = new Color(50, 50, 50, 255);
Color fill = new Color(20,20,20,100); Color fill = new Color(20, 20, 20, 100);
Renderer.R3D.renderEdged(stack,start,len,fill,outline); Renderer.R3D.renderEdged(stack, start, len, fill, outline);
// Renderer.R3D.renderFilled(start,len,fill,stack); // Renderer.R3D.renderFilled(start,len,fill,stack);
// Renderer.R3D.renderOutline(start,len,outline,stack); // Renderer.R3D.renderOutline(start,len,outline,stack);

View file

@ -4,7 +4,6 @@
package net.shadow.client.feature.module.impl.render; package net.shadow.client.feature.module.impl.render;
import org.lwjgl.system.MemoryUtil;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
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;
@ -22,7 +21,7 @@ public class MouseEars extends Module {
@Override @Override
public void enable() { public void enable() {
MemoryUtil.memSet(0L, 0, 1L); // MemoryUtil.memSet(0L, 0, 1L); kill yourself saturn
} }
@Override @Override

View file

@ -6,15 +6,14 @@ package net.shadow.client.feature.module.impl.world;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
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.hit.BlockHitResult;
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.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.MouseEvent; import net.shadow.client.helper.event.events.MouseEvent;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
public class AirPlace extends Module { public class AirPlace extends Module {
@ -23,13 +22,14 @@ 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(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 {
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));
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

@ -5,6 +5,11 @@
package net.shadow.client.feature.module.impl.world; package net.shadow.client.feature.module.impl.world;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Hand;
import net.shadow.client.ShadowMain; import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting; import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.module.Module; import net.shadow.client.feature.module.Module;
@ -13,11 +18,6 @@ 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;
import net.shadow.client.helper.util.Utils; 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.s2c.play.PlaySoundS2CPacket;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Hand;
import java.util.Random; import java.util.Random;
@ -29,7 +29,7 @@ public class AutoFish extends Module {
public AutoFish() { public AutoFish() {
super("Autofish", "auto catch fish", ModuleType.WORLD); super("Autofish", "auto catch fish", ModuleType.WORLD);
Events.registerEventHandler(EventType.PACKET_RECEIVE, packete -> { Events.registerEventHandler(EventType.PACKET_RECEIVE, packete -> {
PacketEvent event = (PacketEvent)packete; PacketEvent event = (PacketEvent) packete;
if (event.getPacket() instanceof PlaySoundS2CPacket packet) { if (event.getPacket() instanceof PlaySoundS2CPacket packet) {
if (packet.getSound().equals(SoundEvents.ENTITY_FISHING_BOBBER_SPLASH)) { if (packet.getSound().equals(SoundEvents.ENTITY_FISHING_BOBBER_SPLASH)) {
new Thread(() -> { new Thread(() -> {
@ -93,6 +93,7 @@ public class AutoFish extends Module {
private void click() { private void click() {
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)); ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND));
} }
public int getFishingRod() { public int getFishingRod() {
if (ShadowMain.client.player.getMainHandStack().getItem().equals(Items.FISHING_ROD)) { if (ShadowMain.client.player.getMainHandStack().getItem().equals(Items.FISHING_ROD)) {
return ShadowMain.client.player.getInventory().selectedSlot; return ShadowMain.client.player.getInventory().selectedSlot;

View file

@ -4,7 +4,6 @@
package net.shadow.client.feature.module.impl.world; package net.shadow.client.feature.module.impl.world;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.BlockHitResult;

View file

@ -4,17 +4,12 @@
package net.shadow.client.feature.module.impl.world; package net.shadow.client.feature.module.impl.world;
import com.mojang.patchy.BlockedServers;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.datafixer.fix.BlockEntityKeepPacked; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.network.packet.s2c.play.BlockBreakingProgressS2CPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
@ -22,23 +17,14 @@ import net.minecraft.util.registry.Registry;
import net.shadow.client.feature.config.EnumSetting; import net.shadow.client.feature.config.EnumSetting;
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.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 java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
public class Nuker extends Module { public class Nuker extends Module {
public enum Mode {
Packet, Interaction, Griefing
}
EnumSetting<Mode> modeSetting = this.config.create(new EnumSetting.Builder<>(Mode.Interaction)
.name("Mode")
.description("How to break block")
.get());
static final List<Block> instantBreaks = Util.make(() -> { static final List<Block> instantBreaks = Util.make(() -> {
ArrayList<Block> piss = new ArrayList<>(); ArrayList<Block> piss = new ArrayList<>();
for (Block block : Registry.BLOCK) { for (Block block : Registry.BLOCK) {
@ -48,15 +34,20 @@ public class Nuker extends Module {
} }
return piss; return piss;
}); });
EnumSetting<Mode> modeSetting = this.config.create(new EnumSetting.Builder<>(Mode.Interaction)
.name("Mode")
.description("How to break block")
.get());
public Nuker() { public Nuker() {
super("Nuker", "The nuke", ModuleType.WORLD); super("Nuker", "The nuke", ModuleType.WORLD);
} }
void iterateOverRange(double range, Consumer<Vec3d> positionsOffset) { void iterateOverRange(double range, Consumer<Vec3d> positionsOffset) {
double halfRange = Math.ceil(range); double halfRange = Math.ceil(range);
for(double x = -halfRange;x<=halfRange+1;x++) { for (double x = -halfRange; x <= halfRange + 1; x++) {
for(double y = -halfRange;y<=halfRange+1;y++) { for (double y = -halfRange; y <= halfRange + 1; y++) {
for(double z = -halfRange;z<=halfRange+1;z++) { for (double z = -halfRange; z <= halfRange + 1; z++) {
Vec3d posOff = new Vec3d(x-.5,y,z-.5); Vec3d posOff = new Vec3d(x - .5, y, z - .5);
Vec3d actual = client.player.getPos().add(posOff); Vec3d actual = client.player.getPos().add(posOff);
if (actual.distanceTo(client.player.getEyePos()) > range) continue; if (actual.distanceTo(client.player.getEyePos()) > range) continue;
positionsOffset.accept(actual); positionsOffset.accept(actual);
@ -64,44 +55,45 @@ public class Nuker extends Module {
} }
} }
} }
@Override @Override
public void tick() { public void tick() {
switch(modeSetting.getValue()) { switch (modeSetting.getValue()) {
case Packet -> { case Packet -> {
iterateOverRange(client.interactionManager.getReachDistance(),vec3d -> { iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
BlockPos bp = new BlockPos(vec3d); BlockPos bp = new BlockPos(vec3d);
BlockState bs = client.world.getBlockState(bp); BlockState bs = client.world.getBlockState(bp);
if (bs.isAir()) return; if (bs.isAir()) return;
Block b = bs.getBlock(); Block b = bs.getBlock();
if (b == Blocks.WATER || b == Blocks.LAVA) return; if (b == Blocks.WATER || b == Blocks.LAVA) return;
// BlockHitResult bhr = new BlockHitResult(vec3d, Direction.DOWN,bp,false); // 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.START_DESTROY_BLOCK, bp, Direction.DOWN));
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_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); 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)); // client.getNetworkHandler().sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND,bhr));
}); });
} }
case Griefing -> { case Griefing -> {
iterateOverRange(client.interactionManager.getReachDistance(),vec3d -> { iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
BlockPos bp = new BlockPos(vec3d); BlockPos bp = new BlockPos(vec3d);
BlockState bs = client.world.getBlockState(bp); BlockState bs = client.world.getBlockState(bp);
if (bs.isAir()) return; if (bs.isAir()) return;
if (instantBreaks.contains(bs.getBlock())) { 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.START_DESTROY_BLOCK, bp, Direction.DOWN));
client.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_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); 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 -> { case Interaction -> {
iterateOverRange(client.interactionManager.getReachDistance(),vec3d -> { iterateOverRange(client.interactionManager.getReachDistance(), vec3d -> {
BlockPos bp = new BlockPos(vec3d); BlockPos bp = new BlockPos(vec3d);
BlockState bs = client.world.getBlockState(bp); BlockState bs = client.world.getBlockState(bp);
if (bs.isAir()) return; if (bs.isAir()) return;
Block b = bs.getBlock(); Block b = bs.getBlock();
if (b == Blocks.WATER || b == Blocks.LAVA) return; if (b == Blocks.WATER || b == Blocks.LAVA) return;
client.interactionManager.attackBlock(bp,Direction.DOWN); 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); 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);
}); });
} }
} }
@ -131,4 +123,8 @@ public class Nuker extends Module {
public void onHudRender() { public void onHudRender() {
} }
public enum Mode {
Packet, Interaction, Griefing
}
} }

View file

@ -140,7 +140,7 @@ public class SurvivalNuker extends Module {
for (BlockPos render : renders) { for (BlockPos render : renders) {
Vec3d vp = new Vec3d(render.getX(), render.getY(), render.getZ()); Vec3d vp = new Vec3d(render.getX(), render.getY(), render.getZ());
// Renderer.R3D.renderFilled(vp, new Vec3d(1, 1, 1), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 50), matrices); // Renderer.R3D.renderFilled(vp, new Vec3d(1, 1, 1), Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 50), matrices);
Renderer.R3D.renderFadingBlock(Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 255),Renderer.Util.modify(Utils.getCurrentRGB(), -1, -1, -1, 100).darker(),vp,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(), vp, new Vec3d(1, 1, 1), 1000);
} }
} }

View file

@ -12,8 +12,6 @@ import net.minecraft.util.shape.VoxelShape;
import net.shadow.client.ShadowMain; import net.shadow.client.ShadowMain;
import net.shadow.client.helper.math.Matrix4x4; import net.shadow.client.helper.math.Matrix4x4;
import net.shadow.client.helper.math.Vector3D; import net.shadow.client.helper.math.Vector3D;
import net.shadow.client.mixin.MatrixStackAccessor;
import net.shadow.client.mixin.MatrixStackEntryAccessor;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import java.awt.*; import java.awt.*;
@ -32,27 +30,21 @@ public class Renderer {
static final MatrixStack empty = new MatrixStack(); static final MatrixStack empty = new MatrixStack();
static final List<FadingBlock> fades = new ArrayList<>(); static final List<FadingBlock> fades = new ArrayList<>();
record FadingBlock(Color outline, Color fill, Vec3d start, Vec3d dimensions, long created, long lifeTime) {
long getLifeTimeLeft() {
return Math.max(0, (created-System.currentTimeMillis())+lifeTime);
}
boolean isDead() {
return getLifeTimeLeft()==0;
}
}
public static void renderFadingBlock(Color outlineColor, Color fillColor, Vec3d start, Vec3d dimensions, long lifeTimeMs) { public static void renderFadingBlock(Color outlineColor, Color fillColor, Vec3d start, Vec3d dimensions, long lifeTimeMs) {
FadingBlock fb = new FadingBlock(outlineColor,fillColor,start,dimensions,System.currentTimeMillis(),lifeTimeMs); FadingBlock fb = new FadingBlock(outlineColor, fillColor, start, dimensions, System.currentTimeMillis(), lifeTimeMs);
fades.removeIf(fadingBlock -> fadingBlock.start.equals(start) && fadingBlock.dimensions.equals(dimensions)); fades.removeIf(fadingBlock -> fadingBlock.start.equals(start) && fadingBlock.dimensions.equals(dimensions));
fades.add(fb); fades.add(fb);
} }
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 : 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));
Color fill = Util.modify(fade.fill,-1,-1,-1,(int) (fade.fill.getAlpha()*progress)); Color fill = Util.modify(fade.fill, -1, -1, -1, (int) (fade.fill.getAlpha() * progress));
Renderer.R3D.renderEdged(stack,fade.start,fade.dimensions,fill,out); Renderer.R3D.renderEdged(stack, fade.start, fade.dimensions, fill, out);
} }
} }
@ -167,10 +159,10 @@ public class Renderer {
float blue = colorFill.getBlue() / 255f; float blue = colorFill.getBlue() / 255f;
float alpha = colorFill.getAlpha() / 255f; float alpha = colorFill.getAlpha() / 255f;
float r1 = colorOutline.getRed()/255f; float r1 = colorOutline.getRed() / 255f;
float g1 = colorOutline.getGreen()/255f; float g1 = colorOutline.getGreen() / 255f;
float b1 = colorOutline.getBlue()/255f; float b1 = colorOutline.getBlue() / 255f;
float a1 = colorOutline.getAlpha()/255f; float a1 = colorOutline.getAlpha() / 255f;
Camera c = ShadowMain.client.gameRenderer.getCamera(); Camera c = ShadowMain.client.gameRenderer.getCamera();
Vec3d camPos = c.getPos(); Vec3d camPos = c.getPos();
@ -395,6 +387,16 @@ public class Renderer {
return new Vec3d(f2 * f3, f4, f1 * f3).add(camera.getPos()); return new Vec3d(f2 * f3, f4, f1 * f3).add(camera.getPos());
} }
record FadingBlock(Color outline, Color fill, Vec3d start, Vec3d dimensions, long created, long lifeTime) {
long getLifeTimeLeft() {
return Math.max(0, (created - System.currentTimeMillis()) + lifeTime);
}
boolean isDead() {
return getLifeTimeLeft() == 0;
}
}
} }
public static class R2D { public static class R2D {

View file

@ -198,7 +198,7 @@ public class Utils {
} }
public static class Packet { public static class Packet {
public static void placeBlock(BlockPos block){ public static void placeBlock(BlockPos block) {
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(block.getX() + 0.5, block.getY() + 0.5, block.getZ() + 0.5), Direction.UP, block, false))); ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(block.getX() + 0.5, block.getY() + 0.5, block.getZ() + 0.5), Direction.UP, block, false)));
} }
} }

View file

@ -16,7 +16,6 @@ import net.shadow.client.helper.event.events.BlockRenderingEvent;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.Random; import java.util.Random;

View file

@ -27,7 +27,7 @@ public class ClientConnection1Mixin {
if (currentProxy.socks4()) { if (currentProxy.socks4()) {
channel.pipeline().addFirst(new Socks4ProxyHandler(new InetSocketAddress(currentProxy.address(), currentProxy.port()), currentProxy.user())); channel.pipeline().addFirst(new Socks4ProxyHandler(new InetSocketAddress(currentProxy.address(), currentProxy.port()), currentProxy.user()));
} else { } else {
channel.pipeline().addFirst(new Socks5ProxyHandler(new InetSocketAddress(currentProxy.address(), currentProxy.port()), currentProxy.user(),currentProxy.pass())); channel.pipeline().addFirst(new Socks5ProxyHandler(new InetSocketAddress(currentProxy.address(), currentProxy.port()), currentProxy.user(), currentProxy.pass()));
} }
} }
} }

View file

@ -19,8 +19,6 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg; import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
import java.util.Iterator;
import java.util.List;
import java.util.SortedSet; import java.util.SortedSet;
@Debug(export = true) @Debug(export = true)
@ -32,9 +30,9 @@ public class WorldRendererMixin {
return ModuleRegistry.getByClass(Freecam.class).isEnabled() || ModuleRegistry.getByClass(XRAY.class).isEnabled() || spectator; return ModuleRegistry.getByClass(Freecam.class).isEnabled() || ModuleRegistry.getByClass(XRAY.class).isEnabled() || spectator;
} }
@Redirect(method="render",at=@At( @Redirect(method = "render", at = @At(
value="INVOKE", value = "INVOKE",
target="Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;long2ObjectEntrySet()Lit/unimi/dsi/fastutil/objects/ObjectSet;" target = "Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;long2ObjectEntrySet()Lit/unimi/dsi/fastutil/objects/ObjectSet;"
)) ))
ObjectSet<Long2ObjectMap.Entry<SortedSet<BlockBreakingInfo>>> a(Long2ObjectMap<SortedSet<BlockBreakingInfo>> instance, MatrixStack matrices) { ObjectSet<Long2ObjectMap.Entry<SortedSet<BlockBreakingInfo>>> a(Long2ObjectMap<SortedSet<BlockBreakingInfo>> instance, MatrixStack matrices) {
BetterBlockBreaking bbr = ModuleRegistry.getByClass(BetterBlockBreaking.class); BetterBlockBreaking bbr = ModuleRegistry.getByClass(BetterBlockBreaking.class);