1
0
Fork 0
mirror of https://github.com/Miasmusa/Shadow.git synced 2025-04-01 23:19:41 -04:00
This commit is contained in:
0x3C50 2022-03-10 00:49:36 +01:00
parent 639f2e8b50
commit 9446e1248c
117 changed files with 753 additions and 754 deletions
src/main/java/net/shadow/client

View file

@ -28,7 +28,7 @@ import java.util.ArrayList;
import java.util.List;
@SuppressWarnings("ResultOfMethodCallIgnored")
public class CoffeeClientMain implements ModInitializer {
public class ShadowMain implements ModInitializer {
public static final String MOD_ID = "sipoverprivate";
public static final String MOD_NAME = "SipoverPrivate";
@ -37,7 +37,7 @@ public class CoffeeClientMain implements ModInitializer {
public static final File BASE = new File(MinecraftClient.getInstance().runDirectory, "sip");
public static final List<ResourceEntry> resources = new ArrayList<>();
public static long lastScreenChange = System.currentTimeMillis();
public static CoffeeClientMain INSTANCE;
public static ShadowMain INSTANCE;
public static Thread MODULE_FTTICKER;
public static Thread FAST_TICKER;
public static String sessionKey = null;

View file

@ -1,6 +1,6 @@
package net.shadow.client.feature.command.impl;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.feature.gui.screen.BindScreen;
import net.shadow.client.feature.module.Module;
@ -33,6 +33,6 @@ public class Bind extends Command {
return;
}
BindScreen bs = new BindScreen(module);
Utils.TickManager.runInNTicks(5, () -> CoffeeClientMain.client.setScreen(bs));
Utils.TickManager.runInNTicks(5, () -> ShadowMain.client.setScreen(bs));
}
}

View file

@ -11,7 +11,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import net.minecraft.text.*;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.feature.config.SettingBase;
import net.shadow.client.feature.module.Module;
@ -25,7 +25,7 @@ import java.util.List;
import java.util.Objects;
public class ConfigUtils extends Command {
static final File CONFIG_STORAGE = new File(CoffeeClientMain.BASE, "configs");
static final File CONFIG_STORAGE = new File(ShadowMain.BASE, "configs");
@SuppressWarnings("ResultOfMethodCallIgnored")
public ConfigUtils() {
@ -164,7 +164,7 @@ public class ConfigUtils extends Command {
Style s = Style.EMPTY.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.of("Click to open")))
.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, out.getAbsolutePath()));
t.setStyle(s);
Objects.requireNonNull(CoffeeClientMain.client.player).sendMessage(t, false);
Objects.requireNonNull(ShadowMain.client.player).sendMessage(t, false);
} catch (Exception e) {
error("Couldn't save config: " + e.getLocalizedMessage());
}

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.command.impl;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.util.Utils;
@ -33,7 +33,7 @@ public class Effect extends Command {
@Override
public void onExecute(String[] args) {
if (CoffeeClientMain.client.player == null) {
if (ShadowMain.client.player == null) {
return;
}
if (args.length == 0) {
@ -59,11 +59,11 @@ public class Effect extends Command {
return;
}
StatusEffectInstance inst = new StatusEffectInstance(effect, duration, strength);
CoffeeClientMain.client.player.addStatusEffect(inst);
ShadowMain.client.player.addStatusEffect(inst);
}
case "clear" -> {
for (StatusEffectInstance statusEffect : CoffeeClientMain.client.player.getStatusEffects().toArray(new StatusEffectInstance[0])) {
CoffeeClientMain.client.player.removeStatusEffect(statusEffect.getEffectType());
for (StatusEffectInstance statusEffect : ShadowMain.client.player.getStatusEffects().toArray(new StatusEffectInstance[0])) {
ShadowMain.client.player.removeStatusEffect(statusEffect.getEffectType());
}
}
default -> error("\"give\" and \"clear\" only pls");

View file

@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.StringNbtReader;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Arrays;
@ -24,7 +24,7 @@ public class FakeItem extends Command {
@Override
public String[] getSuggestions(String fullCommand, String[] args) {
if (args.length == 1) {
return Objects.requireNonNull(CoffeeClientMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new);
return Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new);
} else if (args.length == 2) {
return new String[]{"hand", "custom:(item id) [item nbt]"};
} else if (args.length == 3 && args[1].toLowerCase().startsWith("custom:")) {
@ -51,7 +51,7 @@ public class FakeItem extends Command {
nameTarget = args[0];
}
PlayerEntity le = null;
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (entity instanceof PlayerEntity le1) {
if (u != null && entity.getUuid().equals(u)) {
le = le1;
@ -65,7 +65,7 @@ public class FakeItem extends Command {
return;
}
if (args[1].equalsIgnoreCase("hand")) {
ItemStack main = Objects.requireNonNull(CoffeeClientMain.client.player).getMainHandStack().copy();
ItemStack main = Objects.requireNonNull(ShadowMain.client.player).getMainHandStack().copy();
if (main.isEmpty()) {
error("You're not holding anything");
return;

View file

@ -13,7 +13,7 @@ import net.minecraft.network.packet.s2c.play.OpenWrittenBookS2CPacket;
import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events;
@ -40,8 +40,8 @@ public class Find extends Command {
});
Events.registerEventHandler(EventType.NOCLIP_QUERY, event -> { // this also functions as a tick thing so eh
if (pendingBook && bookSlot != -1) {
assert CoffeeClientMain.client.player != null;
CoffeeClientMain.client.player.getInventory().selectedSlot = bookSlot;
assert ShadowMain.client.player != null;
ShadowMain.client.player.getInventory().selectedSlot = bookSlot;
}
});
}
@ -53,8 +53,8 @@ public class Find extends Command {
sent2nd = true;
return;
}
assert CoffeeClientMain.client.player != null;
ItemStack current = CoffeeClientMain.client.player.getInventory().getMainHandStack();
assert ShadowMain.client.player != null;
ItemStack current = ShadowMain.client.player.getInventory().getMainHandStack();
NbtCompound c = current.getOrCreateNbt();
if (c.contains("pages", NbtCompound.LIST_TYPE)) {
NbtList l = c.getList("pages", NbtCompound.STRING_TYPE);
@ -64,7 +64,7 @@ public class Find extends Command {
if (root.get("text") == null || root.get("text").getAsString().isEmpty()) {
error("Couldn't find player, is the dude online?");
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(bookSlot), new ItemStack(Items.AIR));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(pack3);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(pack3);
pendingBook = sent2nd = false;
bookSlot = -1;
pe.setCancelled(true);
@ -80,14 +80,14 @@ public class Find extends Command {
} else {
error("Couldn't find player, is the dude online?");
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(bookSlot), new ItemStack(Items.AIR));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(pack3);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(pack3);
pendingBook = sent2nd = false;
bookSlot = -1;
}
pe.setCancelled(true);
} else if (pe.getPacket() instanceof ScreenHandlerSlotUpdateS2CPacket packet) {
if (packet.getItemStack().getItem() == Items.WRITTEN_BOOK) {
Utils.TickManager.runInNTicks(5, () -> Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)));
Utils.TickManager.runInNTicks(5, () -> Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)));
}
}
}
@ -102,7 +102,7 @@ public class Find extends Command {
@Override
public void onExecute(String[] args) {
if (!Objects.requireNonNull(CoffeeClientMain.client.interactionManager).hasCreativeInventory()) {
if (!Objects.requireNonNull(ShadowMain.client.interactionManager).hasCreativeInventory()) {
error("Cant find the player, need GMC");
return;
}
@ -112,13 +112,13 @@ public class Find extends Command {
return;
}
try {
assert CoffeeClientMain.client.player != null;
String n = "{pages:[\"{\\\"nbt\\\":\\\"Pos\\\",\\\"entity\\\":\\\"" + u + "\\\"}\"],title:\"0\",author:\"" + CoffeeClientMain.client.player.getGameProfile().getName() + "\"}";
assert ShadowMain.client.player != null;
String n = "{pages:[\"{\\\"nbt\\\":\\\"Pos\\\",\\\"entity\\\":\\\"" + u + "\\\"}\"],title:\"0\",author:\"" + ShadowMain.client.player.getGameProfile().getName() + "\"}";
ItemStack s = Utils.generateItemStackWithMeta(n, Items.WRITTEN_BOOK);
pendingBook = true;
bookSlot = CoffeeClientMain.client.player.getInventory().selectedSlot;
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(a);
bookSlot = ShadowMain.client.player.getInventory().selectedSlot;
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(a);
message("Finding player coords...");
} catch (Exception ignored) {
error("UUID invalid");

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.command.impl;
import net.minecraft.client.network.PlayerListEntry;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.util.Utils;
@ -47,12 +47,12 @@ public class ForEach extends Command {
return;
}
message("Sending the message for every person in the player list, with " + delay + "ms delay");
for (PlayerListEntry playerListEntry : Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).getPlayerList()) {
for (PlayerListEntry playerListEntry : Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).getPlayerList()) {
if (Utils.Players.isPlayerNameValid(playerListEntry.getProfile().getName()) && !playerListEntry.getProfile().getId()
.equals(Objects.requireNonNull(CoffeeClientMain.client.player).getUuid())) {
.equals(Objects.requireNonNull(ShadowMain.client.player).getUuid())) {
runner.execute(() -> {
try {
CoffeeClientMain.client.player.sendChatMessage(String.join(" ", Arrays.copyOfRange(args, 1, args.length)).replaceAll("%s", playerListEntry.getProfile().getName()));
ShadowMain.client.player.sendChatMessage(String.join(" ", Arrays.copyOfRange(args, 1, args.length)).replaceAll("%s", playerListEntry.getProfile().getName()));
Thread.sleep(delay);
} catch (Exception ignored) {
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.command.impl;
import net.minecraft.world.GameMode;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Arrays;
@ -27,14 +27,14 @@ public class Gamemode extends Command {
@Override
public void onExecute(String[] args) {
if (CoffeeClientMain.client.interactionManager == null) {
if (ShadowMain.client.interactionManager == null) {
return;
}
if (args.length == 0) {
message("gamemode pls");
} else {
GameMode gm = GameMode.byName(args[0]);
CoffeeClientMain.client.interactionManager.setGameMode(gm);
ShadowMain.client.interactionManager.setGameMode(gm);
}
}
}

View file

@ -8,7 +8,7 @@ package net.shadow.client.feature.command.impl;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.manager.HologramManager;
@ -66,8 +66,8 @@ public class Hologram extends Command {
}
}
String text = String.join(" ", Arrays.copyOfRange(args, 1, args.length));
Vec3d pos = Objects.requireNonNull(CoffeeClientMain.client.player).getPos();
BlockPos displayable = CoffeeClientMain.client.player.getBlockPos();
Vec3d pos = Objects.requireNonNull(ShadowMain.client.player).getPos();
BlockPos displayable = ShadowMain.client.player.getBlockPos();
message("Armor stand config:");
message(" Text: " + text);
message(" Is baby: " + (generateAsBaby ? "Yes" : "No"));
@ -79,6 +79,6 @@ public class Hologram extends Command {
HologramManager.Hologram h = HologramManager.generateDefault(text, pos).isEgg(generateAsEgg).isSmall(generateAsBaby).hasGravity(makeGravity).isVisible(makeVisible).isMarker(marker);
ItemStack stack = h.generate();
message("Dont forget to open your inventory before placing");
CoffeeClientMain.client.player.getInventory().addPickBlock(stack);
ShadowMain.client.player.getInventory().addPickBlock(stack);
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.command.impl;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.StringNbtReader;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Arrays;
@ -32,11 +32,11 @@ public class Inject extends Command {
error("Syntax: inj [set, clear, add] (nbt)");
return;
}
if (!CoffeeClientMain.client.interactionManager.hasCreativeInventory()) {
if (!ShadowMain.client.interactionManager.hasCreativeInventory()) {
error("no creative mode? :megamind:");
return;
}
ItemStack is = CoffeeClientMain.client.player.getInventory().getMainHandStack();
ItemStack is = ShadowMain.client.player.getInventory().getMainHandStack();
if (is.isEmpty()) {
error("hold and item shithead");
return;

View file

@ -8,7 +8,7 @@ package net.shadow.client.feature.command.impl;
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.util.Utils;
@ -23,7 +23,7 @@ public class Invsee extends Command {
@Override
public String[] getSuggestions(String fullCommand, String[] args) {
if (args.length == 1) {
return Objects.requireNonNull(CoffeeClientMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new);
return Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new);
}
return super.getSuggestions(fullCommand, args);
}
@ -35,7 +35,7 @@ public class Invsee extends Command {
return;
}
PlayerEntity t = null;
for (Entity player : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity player : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (player instanceof PlayerEntity player1) {
if (player1.getGameProfile().getName().equalsIgnoreCase(args[0])) {
t = player1;
@ -48,6 +48,6 @@ public class Invsee extends Command {
return;
}
PlayerEntity finalT = t;
Utils.TickManager.runOnNextRender(() -> CoffeeClientMain.client.setScreen(new InventoryScreen(finalT)));
Utils.TickManager.runOnNextRender(() -> ShadowMain.client.setScreen(new InventoryScreen(finalT)));
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.command.impl;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.internal.ReflectionException;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.feature.items.Item;
import net.shadow.client.feature.items.ItemRegistry;
@ -48,7 +48,7 @@ public class ItemExploit extends Command {
error("Need an exploit name");
return;
}
if (!CoffeeClientMain.client.interactionManager.hasCreativeInventory()) {
if (!ShadowMain.client.interactionManager.hasCreativeInventory()) {
error("No creative inventory present - can't generate");
return;
}
@ -129,6 +129,6 @@ public class ItemExploit extends Command {
}
}
// I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT
CoffeeClientMain.client.interactionManager.clickCreativeStack(meant.generate(), Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot));
ShadowMain.client.interactionManager.clickCreativeStack(meant.generate(), Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot));
}
}

View file

@ -8,7 +8,7 @@ import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket;
import net.minecraft.network.packet.c2s.login.LoginHelloC2SPacket;
import net.minecraft.network.packet.s2c.login.*;
import net.minecraft.text.Text;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.net.InetSocketAddress;
@ -20,12 +20,12 @@ public class Kickall extends Command {
@Override
public void onExecute(String[] args) {
InetSocketAddress sa = (InetSocketAddress) CoffeeClientMain.client.getNetworkHandler().getConnection().getAddress();
for (PlayerListEntry playerListEntry : CoffeeClientMain.client.getNetworkHandler().getPlayerList()) {
if (playerListEntry.getProfile().equals(CoffeeClientMain.client.player.getGameProfile())) {
InetSocketAddress sa = (InetSocketAddress) ShadowMain.client.getNetworkHandler().getConnection().getAddress();
for (PlayerListEntry playerListEntry : ShadowMain.client.getNetworkHandler().getPlayerList()) {
if (playerListEntry.getProfile().equals(ShadowMain.client.player.getGameProfile())) {
continue;
}
ClientConnection conn = ClientConnection.connect(sa, CoffeeClientMain.client.options.shouldUseNativeTransport());
ClientConnection conn = ClientConnection.connect(sa, ShadowMain.client.options.shouldUseNativeTransport());
conn.setPacketListener(new ClientLoginPacketListener() {
@Override
public void onHello(LoginHelloS2CPacket packet) {

View file

@ -26,7 +26,7 @@ import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events;
@ -55,8 +55,8 @@ public class Kill extends Command {
});
Events.registerEventHandler(EventType.NOCLIP_QUERY, event -> { // this also functions as a tick thing so eh
if (pendingBook && bookSlot != -1) {
assert CoffeeClientMain.client.player != null;
CoffeeClientMain.client.player.getInventory().selectedSlot = bookSlot;
assert ShadowMain.client.player != null;
ShadowMain.client.player.getInventory().selectedSlot = bookSlot;
}
});
}
@ -76,8 +76,8 @@ public class Kill extends Command {
sent2nd = true;
return;
}
assert CoffeeClientMain.client.player != null;
ItemStack current = CoffeeClientMain.client.player.getInventory().getMainHandStack();
assert ShadowMain.client.player != null;
ItemStack current = ShadowMain.client.player.getInventory().getMainHandStack();
NbtCompound c = current.getOrCreateNbt();
if (c.contains("pages", NbtCompound.LIST_TYPE)) {
NbtList l = c.getList("pages", NbtCompound.STRING_TYPE);
@ -87,7 +87,7 @@ public class Kill extends Command {
if (root.get("text") == null || root.get("text").getAsString().isEmpty()) {
error("Couldn't find player, is the dude online?");
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(bookSlot), new ItemStack(Items.AIR));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(pack3);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(pack3);
pendingBook = sent2nd = false;
bookSlot = -1;
pe.setCancelled(true);
@ -100,18 +100,18 @@ public class Kill extends Command {
pendingBook = sent2nd = false;
bookSlot = -1;
success(String.format("Player's at X=%s,Y=%s,Z=%s, sending funny", Utils.Math.roundToDecimal(target.x, 1), Utils.Math.roundToDecimal(target.y, 1), Utils.Math.roundToDecimal(target.z, 1)));
makeKillPotAt(new BlockHitResult(CoffeeClientMain.client.player.getPos(), Direction.DOWN, new BlockPos(CoffeeClientMain.client.player.getPos()), false), target);
makeKillPotAt(new BlockHitResult(ShadowMain.client.player.getPos(), Direction.DOWN, new BlockPos(ShadowMain.client.player.getPos()), false), target);
} else {
error("Couldn't find player, is the dude online?");
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(bookSlot), new ItemStack(Items.AIR));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(pack3);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(pack3);
pendingBook = sent2nd = false;
bookSlot = -1;
}
pe.setCancelled(true);
} else if (pe.getPacket() instanceof ScreenHandlerSlotUpdateS2CPacket packet) {
if (packet.getItemStack().getItem() == Items.WRITTEN_BOOK) {
Utils.TickManager.runInNTicks(5, () -> Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)));
Utils.TickManager.runInNTicks(5, () -> Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND)));
}
}
}
@ -119,13 +119,13 @@ public class Kill extends Command {
void makeKillPotAt(BlockHitResult bhr, Vec3d target) {
target = target.add(0, 2.7, 0);
ItemStack s = Utils.generateItemStackWithMeta("{data: [], palette: [], EntityTag: {Item: {Count: 1b, id: \"minecraft:splash_potion\", tag: {CustomPotionEffects: [{ShowParticles: 1b, Duration: 20, Id: 6b, Amplifier: 125b}], Potion: \"minecraft:awkward\"}}, Pos: [" + target.x + "d, " + target.y + "d, " + target.z + "d], Motion: [0d,-5d,0d], id: \"minecraft:potion\", LeftOwner: 1b}}", Items.BAT_SPAWN_EGG);
assert CoffeeClientMain.client.player != null;
CreativeInventoryActionC2SPacket pack = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(pack);
assert ShadowMain.client.player != null;
CreativeInventoryActionC2SPacket pack = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(pack);
PlayerInteractBlockC2SPacket pack2 = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
CoffeeClientMain.client.getNetworkHandler().sendPacket(pack2);
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), new ItemStack(Items.AIR));
CoffeeClientMain.client.getNetworkHandler().sendPacket(pack3);
ShadowMain.client.getNetworkHandler().sendPacket(pack2);
CreativeInventoryActionC2SPacket pack3 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), new ItemStack(Items.AIR));
ShadowMain.client.getNetworkHandler().sendPacket(pack3);
}
@Override
@ -134,23 +134,23 @@ public class Kill extends Command {
error("Cant kill no one");
return;
}
assert CoffeeClientMain.client.interactionManager != null;
if (!CoffeeClientMain.client.interactionManager.hasCreativeInventory()) {
assert ShadowMain.client.interactionManager != null;
if (!ShadowMain.client.interactionManager.hasCreativeInventory()) {
error("I cant give you a kill pot because you dont have a creative inv");
return;
}
if (args[0].equals("*")) {
message("Killing everyone in render distance");
assert CoffeeClientMain.client.world != null;
for (AbstractClientPlayerEntity player : CoffeeClientMain.client.world.getPlayers()) {
if (player.equals(CoffeeClientMain.client.player)) {
assert ShadowMain.client.world != null;
for (AbstractClientPlayerEntity player : ShadowMain.client.world.getPlayers()) {
if (player.equals(ShadowMain.client.player)) {
continue;
}
onExecute(new String[]{player.getGameProfile().getName()});
}
return;
}
HitResult hr = CoffeeClientMain.client.crosshairTarget;
HitResult hr = ShadowMain.client.crosshairTarget;
assert hr != null;
BlockHitResult bhr;
if (!(hr instanceof BlockHitResult bhr1)) {
@ -166,21 +166,21 @@ public class Kill extends Command {
String uuidP = user.substring(1);
try {
UUID resolved = UUID.fromString(uuidP);
assert CoffeeClientMain.client.player != null;
String n = "{pages:[\"{\\\"nbt\\\":\\\"Pos\\\",\\\"entity\\\":\\\"" + resolved + "\\\"}\"],title:\"0\",author:\"" + CoffeeClientMain.client.player.getGameProfile().getName() + "\"}";
assert ShadowMain.client.player != null;
String n = "{pages:[\"{\\\"nbt\\\":\\\"Pos\\\",\\\"entity\\\":\\\"" + resolved + "\\\"}\"],title:\"0\",author:\"" + ShadowMain.client.player.getGameProfile().getName() + "\"}";
ItemStack s = Utils.generateItemStackWithMeta(n, Items.WRITTEN_BOOK);
pendingBook = true;
bookSlot = CoffeeClientMain.client.player.getInventory().selectedSlot;
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(a);
bookSlot = ShadowMain.client.player.getInventory().selectedSlot;
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), s);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(a);
message("Finding player coords...");
} catch (Exception ignored) {
error("UUID invalid");
}
return;
} else {
assert CoffeeClientMain.client.world != null;
for (Entity entity : CoffeeClientMain.client.world.getEntities()) {
assert ShadowMain.client.world != null;
for (Entity entity : ShadowMain.client.world.getEntities()) {
if (entity instanceof PlayerEntity pe && pe.getGameProfile().getName().toLowerCase().contains(user.toLowerCase())) {
if (pe.getGameProfile().getName().equalsIgnoreCase(user)) { // direct match, we know who we want to fuck
targets.clear();

View file

@ -5,7 +5,7 @@
package net.shadow.client.feature.command.impl;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleRegistry;
@ -51,7 +51,7 @@ public class Panic extends Command {
module.setEnabled(false);
}
}
CoffeeClientMain.client.inGameHud.getChatHud().clear(true);
ShadowMain.client.inGameHud.getChatHud().clear(true);
} else if (args[0].equalsIgnoreCase("restore")) {
if (stored.size() == 0) {
error("The stored module list is empty");

View file

@ -9,7 +9,7 @@ import com.mojang.brigadier.suggestion.Suggestion;
import com.mojang.brigadier.suggestion.Suggestions;
import net.minecraft.network.packet.c2s.play.RequestCommandCompletionsC2SPacket;
import net.minecraft.network.packet.s2c.play.CommandSuggestionsS2CPacket;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events;
@ -25,7 +25,7 @@ public class Plugins extends Command {
public Plugins() {
super("Plugins", "Finds server plugins via command suggestions", "pl", "plugins");
if (CoffeeClientMain.client.getNetworkHandler() != null) {
if (ShadowMain.client.getNetworkHandler() != null) {
Events.registerEventHandler(EventType.PACKET_RECEIVE, event -> {
if (!pendingCmdTree) {
return;
@ -59,8 +59,8 @@ public class Plugins extends Command {
@Override
public void onExecute(String[] args) {
if (CoffeeClientMain.client.getNetworkHandler() != null) {
CoffeeClientMain.client.getNetworkHandler().sendPacket(new RequestCommandCompletionsC2SPacket(0, "/"));
if (ShadowMain.client.getNetworkHandler() != null) {
ShadowMain.client.getNetworkHandler().sendPacket(new RequestCommandCompletionsC2SPacket(0, "/"));
pendingCmdTree = true;
}
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.command.impl;
import net.minecraft.text.Text;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Objects;
@ -32,10 +32,10 @@ public class Rename extends Command {
error("example: rename &c&lthe &afunny");
return;
}
if (Objects.requireNonNull(CoffeeClientMain.client.player).getInventory().getMainHandStack().isEmpty()) {
if (Objects.requireNonNull(ShadowMain.client.player).getInventory().getMainHandStack().isEmpty()) {
error("idk if you're holding anything");
return;
}
CoffeeClientMain.client.player.getInventory().getMainHandStack().setCustomName(Text.of("§r" + String.join(" ", args).replaceAll("&", "§")));
ShadowMain.client.player.getInventory().getMainHandStack().setCustomName(Text.of("§r" + String.join(" ", args).replaceAll("&", "§")));
}
}

View file

@ -5,7 +5,7 @@
package net.shadow.client.feature.command.impl;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Objects;
@ -30,6 +30,6 @@ public class Say extends Command {
error("not sure if i can say nothing");
return;
}
Objects.requireNonNull(CoffeeClientMain.client.player).sendChatMessage(String.join(" ", args));
Objects.requireNonNull(ShadowMain.client.player).sendChatMessage(String.join(" ", args));
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.command.impl;
import com.google.gson.Gson;
import net.minecraft.client.texture.NativeImage;
import net.minecraft.client.texture.NativeImageBackedTexture;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import net.shadow.client.helper.Texture;
import net.shadow.client.helper.event.EventType;
@ -26,10 +26,10 @@ import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
public class Taco extends Command {
public static final File storage = new File(CoffeeClientMain.BASE, "taco.sip");
public static final File storage = new File(ShadowMain.BASE, "taco.sip");
public static final List<Frame> frames = new ArrayList<>();
public static final AtomicBoolean init = new AtomicBoolean(false);
static final File gifPath = new File(CoffeeClientMain.BASE, "tacoFrames");
static final File gifPath = new File(ShadowMain.BASE, "tacoFrames");
public static TacoConfig config = new TacoConfig();
public static long currentFrame = 0;
static final Thread ticker = new Thread(() -> {
@ -71,7 +71,7 @@ public class Taco extends Command {
if (!storage.exists()) {
//noinspection ResultOfMethodCallIgnored
storage.createNewFile();
CoffeeClientMain.log(Level.INFO, "Skipping taco config file because it doesnt exist");
ShadowMain.log(Level.INFO, "Skipping taco config file because it doesnt exist");
return;
}
String a = FileUtils.readFileToString(storage, StandardCharsets.UTF_8);
@ -82,7 +82,7 @@ public class Taco extends Command {
}
initFrames();
} catch (Exception e) {
CoffeeClientMain.log(Level.ERROR, "Failed to read taco config");
ShadowMain.log(Level.ERROR, "Failed to read taco config");
e.printStackTrace();
if (storage.exists()) {
//noinspection ResultOfMethodCallIgnored
@ -94,7 +94,7 @@ public class Taco extends Command {
static void initFrames() throws Exception {
checkGifPath();
for (Frame frame : frames) {
CoffeeClientMain.client.getTextureManager().destroyTexture(frame.getI());
ShadowMain.client.getTextureManager().destroyTexture(frame.getI());
}
frames.clear();
Frame.frameCounter = 0;
@ -124,7 +124,7 @@ public class Taco extends Command {
try {
FileUtils.writeStringToFile(storage, json, StandardCharsets.UTF_8);
} catch (Exception e) {
CoffeeClientMain.log(Level.ERROR, "Failed to write taco config");
ShadowMain.log(Level.ERROR, "Failed to write taco config");
e.printStackTrace();
}
}
@ -250,7 +250,7 @@ public class Taco extends Command {
// i = new Identifier("atomic", "tacoframe_" + frameCounter);
i = new Texture("taco/frame_" + frameCounter);
frameCounter++;
CoffeeClientMain.client.execute(() -> CoffeeClientMain.client.getTextureManager().registerTexture(i, tex));
ShadowMain.client.execute(() -> ShadowMain.client.getTextureManager().registerTexture(i, tex));
} catch (Exception e) {
Utils.Logging.error("failed to register frame " + frameCounter);
e.printStackTrace();

View file

@ -8,7 +8,7 @@ package net.shadow.client.feature.command.impl;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.*;
import net.minecraft.text.Text;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.command.Command;
import java.util.Objects;
@ -60,11 +60,11 @@ public class ViewNbt extends Command {
}
}
}
if (Objects.requireNonNull(CoffeeClientMain.client.player).getInventory().getMainHandStack().isEmpty()) {
if (Objects.requireNonNull(ShadowMain.client.player).getInventory().getMainHandStack().isEmpty()) {
error("you're not holding anything");
return;
}
ItemStack stack = CoffeeClientMain.client.player.getInventory().getMainHandStack();
ItemStack stack = ShadowMain.client.player.getInventory().getMainHandStack();
NbtCompound c = stack.getNbt();
if (!stack.hasNbt() || c == null) {
error("stack has no data");
@ -75,13 +75,13 @@ public class ViewNbt extends Command {
} else {
// I've to use .sendMessage because of monkey minecraft api
if (noColor) {
CoffeeClientMain.client.player.sendMessage(Text.of(c.asString()), false);
ShadowMain.client.player.sendMessage(Text.of(c.asString()), false);
} else {
CoffeeClientMain.client.player.sendMessage(NbtHelper.toPrettyPrintedText(c), false);
ShadowMain.client.player.sendMessage(NbtHelper.toPrettyPrintedText(c), false);
}
}
if (copy) {
CoffeeClientMain.client.keyboard.setClipboard(c.asString());
ShadowMain.client.keyboard.setClipboard(c.asString());
success("Copied nbt!");
}
}

View file

@ -6,7 +6,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec2f;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.feature.gui.clickgui.element.Element;
import net.shadow.client.feature.gui.clickgui.element.impl.CategoryDisplay;
@ -89,7 +89,7 @@ public class ClickGUI extends Screen implements FastTickable {
void initElements() {
elements.clear();
double width = CoffeeClientMain.client.getWindow().getScaledWidth();
double width = ShadowMain.client.getWindow().getScaledWidth();
double x = 5;
double y = 5;
double tallestInTheRoom = 0;
@ -158,8 +158,8 @@ public class ClickGUI extends Screen implements FastTickable {
for (String s : text) {
width = Math.max(width, FontRenderers.getRenderer().getStringWidth(s));
}
if (descX + width > CoffeeClientMain.client.getWindow().getScaledWidth()) {
descX -= (descX + width - CoffeeClientMain.client.getWindow().getScaledWidth()) + 4;
if (descX + width > ShadowMain.client.getWindow().getScaledWidth()) {
descX -= (descX + width - ShadowMain.client.getWindow().getScaledWidth()) + 4;
}
Vec2f root = Renderer.R2D.renderTooltip(matrices, descX, descY, width + 4, FontRenderers.getRenderer().getMarginHeight() + 4, tooltipColor);
float yOffset = 2;

View file

@ -7,7 +7,7 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.math.Quaternion;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.clickgui.theme.Theme;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.helper.render.Renderer;
@ -36,7 +36,7 @@ public class ParticleRenderer {
return;
}
Particle n = new Particle();
n.x = Math.random() * CoffeeClientMain.client.getWindow().getScaledWidth();
n.x = Math.random() * ShadowMain.client.getWindow().getScaledWidth();
n.y = -10;
n.velY = (Math.random() + 1);
n.decline = MathHelper.lerp(Math.random(), 0.05, 0.2);

View file

@ -5,7 +5,7 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import net.minecraft.client.gui.screen.ChatScreen;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.hud.element.HudElement;
import net.shadow.client.feature.gui.hud.element.SpeedHud;
import net.shadow.client.feature.gui.hud.element.Taco;
@ -24,15 +24,15 @@ import java.util.List;
public class HudRenderer {
static final File CONFIG = new File(CoffeeClientMain.BASE, "hud.sip");
static final File CONFIG = new File(ShadowMain.BASE, "hud.sip");
private static HudRenderer INSTANCE;
final List<HudElement> elements = register();
boolean isEditing = false;
boolean mouseHeldDown = false;
double prevX = Utils.Mouse.getMouseX();
double prevY = Utils.Mouse.getMouseY();
double prevWX = CoffeeClientMain.client.getWindow().getScaledWidth();
double prevWY = CoffeeClientMain.client.getWindow().getScaledHeight();
double prevWX = ShadowMain.client.getWindow().getScaledWidth();
double prevWY = ShadowMain.client.getWindow().getScaledHeight();
private HudRenderer() {
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
@ -76,7 +76,7 @@ public class HudRenderer {
}
void saveConfig() {
CoffeeClientMain.log(Level.INFO, "Saving hud");
ShadowMain.log(Level.INFO, "Saving hud");
JsonArray root = new JsonArray();
for (HudElement element : elements) {
JsonObject current = new JsonObject();
@ -88,18 +88,18 @@ public class HudRenderer {
try {
FileUtils.write(CONFIG, root.toString(), StandardCharsets.UTF_8);
} catch (Exception ignored) {
CoffeeClientMain.log(Level.ERROR, "Failed to write hud file");
ShadowMain.log(Level.ERROR, "Failed to write hud file");
}
}
@SuppressWarnings("ResultOfMethodCallIgnored")
void loadConfig() {
CoffeeClientMain.log(Level.INFO, "Loading hud");
ShadowMain.log(Level.INFO, "Loading hud");
if (!CONFIG.isFile()) {
CONFIG.delete();
}
if (!CONFIG.exists()) {
CoffeeClientMain.log(Level.INFO, "Skipping hud loading because file doesn't exist");
ShadowMain.log(Level.INFO, "Skipping hud loading because file doesn't exist");
return;
}
try {
@ -118,14 +118,14 @@ public class HudRenderer {
}
}
} catch (Exception ignored) {
CoffeeClientMain.log(Level.ERROR, "Failed to read hud file - corrupted?");
ShadowMain.log(Level.ERROR, "Failed to read hud file - corrupted?");
}
CoffeeClientMain.log(Level.INFO, "Loaded hud");
ShadowMain.log(Level.INFO, "Loaded hud");
}
public void fastTick() {
double currentWX = CoffeeClientMain.client.getWindow().getScaledWidth();
double currentWY = CoffeeClientMain.client.getWindow().getScaledHeight();
double currentWX = ShadowMain.client.getWindow().getScaledWidth();
double currentWY = ShadowMain.client.getWindow().getScaledHeight();
if (currentWX != prevWX) {
for (HudElement element : elements) {
double px = element.getPosX();
@ -142,7 +142,7 @@ public class HudRenderer {
}
prevWY = currentWY;
}
isEditing = CoffeeClientMain.client.currentScreen instanceof ChatScreen;
isEditing = ShadowMain.client.currentScreen instanceof ChatScreen;
if (mouseHeldDown) {
for (HudElement element : elements) {
element.mouseDragged(Utils.Mouse.getMouseX() - prevX, Utils.Mouse.getMouseY() - prevY);

View file

@ -2,7 +2,7 @@ package net.shadow.client.feature.gui.hud.element;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.helper.font.FontRenderers;
import net.shadow.client.helper.render.Renderer;
@ -94,8 +94,8 @@ public abstract class HudElement {
if (selected) {
this.posX += deltaX;
this.posY += deltaY;
this.posX = MathHelper.clamp(this.posX, 0, CoffeeClientMain.client.getWindow().getScaledWidth() - this.width);
this.posY = MathHelper.clamp(this.posY, 0, CoffeeClientMain.client.getWindow().getScaledHeight() - this.height);
this.posX = MathHelper.clamp(this.posX, 0, ShadowMain.client.getWindow().getScaledWidth() - this.width);
this.posY = MathHelper.clamp(this.posY, 0, ShadowMain.client.getWindow().getScaledHeight() - this.height);
}
}
@ -104,7 +104,7 @@ public abstract class HudElement {
}
public void fastTick() {
this.posX = MathHelper.clamp(this.posX, 0, CoffeeClientMain.client.getWindow().getScaledWidth() - this.width);
this.posY = MathHelper.clamp(this.posY, 0, CoffeeClientMain.client.getWindow().getScaledHeight() - this.height);
this.posX = MathHelper.clamp(this.posX, 0, ShadowMain.client.getWindow().getScaledWidth() - this.width);
this.posY = MathHelper.clamp(this.posY, 0, ShadowMain.client.getWindow().getScaledHeight() - this.height);
}
}

View file

@ -1,7 +1,7 @@
package net.shadow.client.feature.gui.hud.element;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.feature.module.ModuleRegistry;
import net.shadow.client.feature.module.impl.render.Hud;
@ -19,7 +19,7 @@ public class SpeedHud extends HudElement {
final Timer update = new Timer();
public SpeedHud() {
super("Speed", CoffeeClientMain.client.getWindow().getScaledWidth() / 2d - 160 / 2d, CoffeeClientMain.client.getWindow().getScaledHeight() - 40 - 64, 160, 64);
super("Speed", ShadowMain.client.getWindow().getScaledWidth() / 2d - 160 / 2d, ShadowMain.client.getWindow().getScaledHeight() - 40 - 64, 160, 64);
}
@Override
@ -59,7 +59,7 @@ public class SpeedHud extends HudElement {
@Override
public void fastTick() {
if (update.hasExpired(50)) { // update when velocity gets updated
double speedCombined = CoffeeClientMain.client.player.getVelocity().length();
double speedCombined = ShadowMain.client.player.getVelocity().length();
double last = speedSaved.isEmpty() ? speedCombined : speedSaved.get(speedSaved.size() - 1);
speedSaved.add((speedCombined + last) / 2d);
while (speedSaved.size() > 50) {

View file

@ -4,13 +4,13 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.gui.DrawableHelper;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.helper.Texture;
import net.shadow.client.helper.font.FontRenderers;
public class Taco extends HudElement {
public Taco() {
super("Taco", 0, CoffeeClientMain.client.getWindow().getScaledHeight(), 100, 100);
super("Taco", 0, ShadowMain.client.getWindow().getScaledHeight(), 100, 100);
}
@Override

View file

@ -1,7 +1,7 @@
package net.shadow.client.feature.gui.hud.element;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.ModuleRegistry;
import net.shadow.client.feature.module.impl.render.TargetHud;
import net.shadow.client.helper.render.MSAAFramebuffer;
@ -9,7 +9,7 @@ import net.shadow.client.helper.render.MSAAFramebuffer;
public class TargetHUD extends HudElement {
public TargetHUD() {
super("Target HUD", CoffeeClientMain.client.getWindow().getScaledWidth() / 2f + 10, CoffeeClientMain.client.getWindow()
super("Target HUD", ShadowMain.client.getWindow().getScaledWidth() / 2f + 10, ShadowMain.client.getWindow()
.getScaledHeight() / 2f + 10, TargetHud.modalWidth, TargetHud.modalHeight);
}

View file

@ -8,7 +8,7 @@ package net.shadow.client.feature.gui.notifications;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.helper.font.FontRenderers;
import net.shadow.client.helper.render.ClipStack;
@ -50,7 +50,7 @@ public class NotificationRenderer {
public static void renderTop() {
MatrixStack ms = Renderer.R3D.getEmptyMatrixStack();
int baseX = CoffeeClientMain.client.getWindow().getScaledWidth() / 2;
int baseX = ShadowMain.client.getWindow().getScaledWidth() / 2;
int height = 16;
int baseY = -height - 5;
int currentYOffset = 5;
@ -116,8 +116,8 @@ public class NotificationRenderer {
public static void renderSide() {
MatrixStack ms = Renderer.R3D.getEmptyMatrixStack();
int currentYOffset = 0;
int baseX = CoffeeClientMain.client.getWindow().getScaledWidth();
int baseY = CoffeeClientMain.client.getWindow().getScaledHeight() - 10;
int baseX = ShadowMain.client.getWindow().getScaledWidth();
int baseY = ShadowMain.client.getWindow().getScaledHeight() - 10;
long c = System.currentTimeMillis();
for (Notification notification : new ArrayList<>(notifications)) {
boolean notificationExpired = notification.creationDate + notification.duration < c;

View file

@ -17,7 +17,7 @@ import net.minecraft.client.util.DefaultSkinHelper;
import net.minecraft.client.util.Session;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.feature.gui.widget.RoundButton;
import net.shadow.client.feature.gui.widget.RoundTextFieldWidget;
@ -55,7 +55,7 @@ import java.util.stream.Collectors;
public class AltManagerScreen extends ClientScreen implements FastTickable {
public static final Map<UUID, Texture> texCache = new HashMap<>();
static final File ALTS_FILE = new File(CoffeeClientMain.BASE, "alts.sip");
static final File ALTS_FILE = new File(ShadowMain.BASE, "alts.sip");
static final String TOP_NOTE = """
// DO NOT SHARE THIS FILE
// This file contains sensitive information about your accounts
@ -102,7 +102,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
}
void saveAlts() {
CoffeeClientMain.log(Level.INFO, "Saving alts");
ShadowMain.log(Level.INFO, "Saving alts");
JsonArray root = new JsonArray();
for (AltContainer alt1 : alts) {
AltStorage alt = alt1.storage;
@ -121,7 +121,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
try {
FileUtils.write(ALTS_FILE, TOP_NOTE + "\n" + root, StandardCharsets.UTF_8);
} catch (Exception ignored) {
CoffeeClientMain.log(Level.ERROR, "Failed to write alts file");
ShadowMain.log(Level.ERROR, "Failed to write alts file");
}
}
@ -133,13 +133,13 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
@SuppressWarnings("ResultOfMethodCallIgnored")
void loadAlts() {
CoffeeClientMain.log(Level.INFO, "Loading alts");
ShadowMain.log(Level.INFO, "Loading alts");
if (!ALTS_FILE.isFile()) {
ALTS_FILE.delete();
}
if (!ALTS_FILE.exists()) {
CoffeeClientMain.log(Level.INFO, "Skipping alt loading because file doesn't exist");
ShadowMain.log(Level.INFO, "Skipping alt loading because file doesn't exist");
return;
}
try {
@ -160,7 +160,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
}
} catch (Exception ignored) {
CoffeeClientMain.log(Level.ERROR, "Failed to read alts file - corrupted?");
ShadowMain.log(Level.ERROR, "Failed to read alts file - corrupted?");
}
}
@ -205,7 +205,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
toY = height - getPadding();
buttonWidth = toX - fromX - padding * 3 - texDim;
session = new ThemedButton(fromX + texDim + padding * 2, toY - 20 - padding, buttonWidth, 20, "Session", () -> {
Objects.requireNonNull(client).setScreen(new SessionEditor(this, CoffeeClientMain.client.getSession())); // this is not a session stealer
Objects.requireNonNull(client).setScreen(new SessionEditor(this, ShadowMain.client.getSession())); // this is not a session stealer
});
}
@ -214,7 +214,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
}
void updateCurrentAccount() {
UUID uid = CoffeeClientMain.client.getSession().getProfile().getId();
UUID uid = ShadowMain.client.getSession().getProfile().getId();
if (texCache.containsKey(uid)) {
this.currentAccountTexture = texCache.get(uid);
@ -234,8 +234,8 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
NativeImage img = NativeImage.read(data);
NativeImageBackedTexture texture = new NativeImageBackedTexture(img);
CoffeeClientMain.client.execute(() -> {
CoffeeClientMain.client.getTextureManager().registerTexture(currentAccountTexture, texture);
ShadowMain.client.execute(() -> {
ShadowMain.client.getTextureManager().registerTexture(currentAccountTexture, texture);
currentAccountTextureLoaded = true;
});
} catch (Exception e) {
@ -256,7 +256,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
return;
}
Session newSession = new Session(selectedAlt.storage.cachedName, selectedAlt.storage.cachedUuid.toString(), selectedAlt.storage.accessToken, Optional.empty(), Optional.empty(), Session.AccountType.MOJANG);
((IMinecraftClientAccessor) CoffeeClientMain.client).setSession(newSession);
((IMinecraftClientAccessor) ShadowMain.client).setSession(newSession);
updateCurrentAccount();
}).start();
}
@ -406,7 +406,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
Renderer.R2D.renderTexture(stack, fromX + padding, fromY + padding, texDim, texDim, 8, 8, 8, 8, 64, 64);
}
RenderSystem.defaultBlendFunc();
String uuid = CoffeeClientMain.client.getSession().getUuid();
String uuid = ShadowMain.client.getSession().getUuid();
double uuidWid = FontRenderers.getRenderer().getStringWidth(uuid);
double maxWid = leftWidth - texDim - padding * 3;
if (uuidWid > maxWid) {
@ -414,7 +414,7 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
uuid = FontRenderers.getRenderer().trimStringToWidth(uuid, maxWid - 1 - threeDotWidth);
uuid += "...";
}
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{new AltContainer.PropEntry(CoffeeClientMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF),
AltContainer.PropEntry[] props = new AltContainer.PropEntry[]{new AltContainer.PropEntry(ShadowMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF),
new AltContainer.PropEntry(uuid, FontRenderers.getRenderer(), 0xAAAAAA)};
float propsOffset = (float) (fromY + padding);
for (AltContainer.PropEntry prop : props) {
@ -929,9 +929,9 @@ public class AltManagerScreen extends ClientScreen implements FastTickable {
NativeImage img = NativeImage.read(data);
NativeImageBackedTexture texture = new NativeImageBackedTexture(img);
CoffeeClientMain.client.execute(() -> {
ShadowMain.client.execute(() -> {
this.tex = new Texture(("dynamic/tex_" + this.storage.cachedUuid.hashCode() + "_" + (Math.random() + "").split("\\.")[1]).toLowerCase());
CoffeeClientMain.client.getTextureManager().registerTexture(this.tex, texture);
ShadowMain.client.getTextureManager().registerTexture(this.tex, texture);
texCache.put(this.storage.cachedUuid, this.tex);
texLoaded = true;
});

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.gui.screen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.helper.render.MSAAFramebuffer;
public class ClientScreen extends Screen {
@ -24,7 +24,7 @@ public class ClientScreen extends Screen {
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
CoffeeClientMain.client.keyboard.setRepeatEvents(true);
ShadowMain.client.keyboard.setRepeatEvents(true);
if (samples != -1) {
if (!MSAAFramebuffer.framebufferInUse()) {
MSAAFramebuffer.use(samples, () -> renderInternal(matrices, mouseX, mouseY, delta));

View file

@ -12,7 +12,7 @@ import net.minecraft.client.texture.NativeImageBackedTexture;
import net.minecraft.client.util.DefaultSkinHelper;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.feature.gui.widget.RoundButton;
import net.shadow.client.helper.Texture;
@ -100,14 +100,14 @@ public class HomeScreen extends ClientScreen implements FastTickable {
double centerWidgetsY = height - padding - 25;
double rightPad = width - padding;
Color bg = new Color(30, 30, 30);
RoundButton single = new RoundButton(bg, rightPad - (padding + 60), centerWidgetsY, 60, 20, "Singleplayer", () -> CoffeeClientMain.client.setScreen(new SelectWorldScreen(this)));
RoundButton multi = new RoundButton(bg, rightPad - (padding + 60) * 2, centerWidgetsY, 60, 20, "Multiplayer", () -> CoffeeClientMain.client.setScreen(new MultiplayerScreen(this)));
RoundButton realms = new RoundButton(bg, rightPad - (padding + 60) * 3, centerWidgetsY, 60, 20, "Realms", () -> CoffeeClientMain.client.setScreen(new RealmsMainScreen(this)));
RoundButton alts = new RoundButton(bg, rightPad - (padding + 60) * 4, centerWidgetsY, 60, 20, "Alts", () -> CoffeeClientMain.client.setScreen(AltManagerScreen.instance()
RoundButton single = new RoundButton(bg, rightPad - (padding + 60), centerWidgetsY, 60, 20, "Singleplayer", () -> ShadowMain.client.setScreen(new SelectWorldScreen(this)));
RoundButton multi = new RoundButton(bg, rightPad - (padding + 60) * 2, centerWidgetsY, 60, 20, "Multiplayer", () -> ShadowMain.client.setScreen(new MultiplayerScreen(this)));
RoundButton realms = new RoundButton(bg, rightPad - (padding + 60) * 3, centerWidgetsY, 60, 20, "Realms", () -> ShadowMain.client.setScreen(new RealmsMainScreen(this)));
RoundButton alts = new RoundButton(bg, rightPad - (padding + 60) * 4, centerWidgetsY, 60, 20, "Alts", () -> ShadowMain.client.setScreen(AltManagerScreen.instance()
// new TestScreen()
));
RoundButton settings = new RoundButton(bg, rightPad - (padding + 60) * 5, centerWidgetsY, 60, 20, "Options", () -> CoffeeClientMain.client.setScreen(new OptionsScreen(this, CoffeeClientMain.client.options)));
RoundButton quit = new RoundButton(bg, rightPad - (padding + 60) * 5 - padding - 20, centerWidgetsY, 20, 20, "X", CoffeeClientMain.client::scheduleStop);
RoundButton settings = new RoundButton(bg, rightPad - (padding + 60) * 5, centerWidgetsY, 60, 20, "Options", () -> ShadowMain.client.setScreen(new OptionsScreen(this, ShadowMain.client.options)));
RoundButton quit = new RoundButton(bg, rightPad - (padding + 60) * 5 - padding - 20, centerWidgetsY, 20, 20, "X", ShadowMain.client::scheduleStop);
addDrawableChild(single);
addDrawableChild(multi);
addDrawableChild(settings);
@ -132,7 +132,7 @@ public class HomeScreen extends ClientScreen implements FastTickable {
}
void updateCurrentAccount(Runnable callback) {
UUID uid = CoffeeClientMain.client.getSession().getProfile().getId();
UUID uid = ShadowMain.client.getSession().getProfile().getId();
if (previousChecked != null && previousChecked.equals(uid)) {
callback.run();
return;
@ -152,8 +152,8 @@ public class HomeScreen extends ClientScreen implements FastTickable {
System.out.println(img);
NativeImageBackedTexture texture = new NativeImageBackedTexture(img);
CoffeeClientMain.client.execute(() -> {
CoffeeClientMain.client.getTextureManager().registerTexture(currentAccountTexture, texture);
ShadowMain.client.execute(() -> {
ShadowMain.client.getTextureManager().registerTexture(currentAccountTexture, texture);
currentAccountTextureLoaded = true;
callback.run();
});
@ -221,7 +221,7 @@ public class HomeScreen extends ClientScreen implements FastTickable {
Renderer.R2D.renderTexture(stack, fromX + padding, fromY + padding, texDim, texDim, 8, 8, 8, 8, 64, 64);
}
RenderSystem.defaultBlendFunc();
String uuid = CoffeeClientMain.client.getSession().getUuid();
String uuid = ShadowMain.client.getSession().getUuid();
double uuidWid = FontRenderers.getRenderer().getStringWidth(uuid);
double maxWid = 200 - texDim - padding * 3;
if (uuidWid > maxWid) {
@ -230,7 +230,7 @@ public class HomeScreen extends ClientScreen implements FastTickable {
uuid += "...";
}
AltManagerScreen.AltContainer.PropEntry[] props = new AltManagerScreen.AltContainer.PropEntry[]{
new AltManagerScreen.AltContainer.PropEntry(CoffeeClientMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF),
new AltManagerScreen.AltContainer.PropEntry(ShadowMain.client.getSession().getUsername(), FontRenderers.getCustomSize(22), 0xFFFFFF),
new AltManagerScreen.AltContainer.PropEntry(uuid, FontRenderers.getRenderer(), 0xAAAAAA)};
float propsOffset = (float) (fromY + padding);
for (AltManagerScreen.AltContainer.PropEntry prop : props) {
@ -261,7 +261,7 @@ public class HomeScreen extends ClientScreen implements FastTickable {
@Override
public void onFastTick() {
if (CoffeeClientMain.client.getOverlay() == null && CoffeeClientMain.client.currentScreen == this && System.currentTimeMillis() - initTime > 1000 && !loaded) {
if (ShadowMain.client.getOverlay() == null && ShadowMain.client.currentScreen == this && System.currentTimeMillis() - initTime > 1000 && !loaded) {
load();
}
double delta = 10 / 600d;

View file

@ -4,7 +4,7 @@ import com.google.common.util.concurrent.AtomicDouble;
import lombok.Data;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.helper.font.FontRenderers;
import net.shadow.client.helper.font.adapter.impl.ClientFontRenderer;
@ -39,7 +39,7 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
// double progress = 0;
final AtomicDouble progress = new AtomicDouble();
final ClientFontRenderer title = FontRenderers.getCustomSize(40);
final Map<CoffeeClientMain.ResourceEntry, ProgressData> progressMap = new ConcurrentHashMap<>();
final Map<ShadowMain.ResourceEntry, ProgressData> progressMap = new ConcurrentHashMap<>();
double smoothProgress = 0;
double opacity = 1;
String warningIfPresent = "";
@ -69,11 +69,11 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
public void onFastTick() {
//System.out.println(progressMap.values().stream().map(AtomicDouble::get).reduce(Double::sum)+"-"+CoffeeClientMain.resources.size());
progress.set(progressMap.values().stream().map(progressData -> progressData.getProgress().get()).reduce(Double::sum).orElse(0d) / CoffeeClientMain.resources.size());
progress.set(progressMap.values().stream().map(progressData -> progressData.getProgress().get()).reduce(Double::sum).orElse(0d) / ShadowMain.resources.size());
smoothProgress = Transitions.transition(smoothProgress, progress.get(), 10, 0.0001);
// smoothProgress = progress.get();
if (CoffeeClientMain.client.getOverlay() == null) {
if (ShadowMain.client.getOverlay() == null) {
if (!loadInProg.get()) {
load();
}
@ -91,10 +91,10 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
ExecutorService es = Executors.newFixedThreadPool(atOnce);
for (CoffeeClientMain.ResourceEntry resource : CoffeeClientMain.resources) {
for (ShadowMain.ResourceEntry resource : ShadowMain.resources) {
progressMap.put(resource, new ProgressData());
es.execute(() -> {
CoffeeClientMain.log(Level.INFO, "Downloading " + resource.url());
ShadowMain.log(Level.INFO, "Downloading " + resource.url());
progressMap.get(resource).getWorkingOnIt().set(true);
try {
@ -122,9 +122,9 @@ public class LoadingScreen extends ClientScreen implements FastTickable {
byte[] imageBuffer = bout.toByteArray();
BufferedImage bi = ImageIO.read(new ByteArrayInputStream(imageBuffer));
Utils.registerBufferedImageTexture(resource.tex(), bi);
CoffeeClientMain.log(Level.INFO, "Downloaded " + resource.url());
ShadowMain.log(Level.INFO, "Downloaded " + resource.url());
} catch (Exception e) {
CoffeeClientMain.log(Level.ERROR, "Failed to download " + resource.url() + ": " + e.getMessage());
ShadowMain.log(Level.ERROR, "Failed to download " + resource.url() + ": " + e.getMessage());
BufferedImage empty = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
empty.setRGB(0, 0, 0xFF000000);
Utils.registerBufferedImageTexture(resource.tex(), empty);

View file

@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.StringNbtReader;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.gui.widget.RoundButton;
@ -207,7 +207,7 @@ public class NbtEditorScreen extends ClientScreen implements FastTickable {
double entitledScroll = contentHeight - windowHeight;
entitledScroll = Math.max(0, entitledScroll);
if (InputUtil.isKeyPressed(CoffeeClientMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_SHIFT)) {
if (InputUtil.isKeyPressed(ShadowMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_SHIFT)) {
scrollX -= amount * 10;
} else {
scroll -= amount * 10;
@ -228,7 +228,7 @@ public class NbtEditorScreen extends ClientScreen implements FastTickable {
return true;
}
if (isPaste(keyCode)) {
String clip = CoffeeClientMain.client.keyboard.getClipboard();
String clip = ShadowMain.client.keyboard.getClipboard();
skipAppend = true;
for (char c : clip.toCharArray()) {
if (c == '\n') {

View file

@ -5,7 +5,7 @@ import net.minecraft.client.gui.widget.DoubleOptionSliderWidget;
import net.minecraft.client.option.DoubleOption;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.FastTickable;
import net.shadow.client.helper.Timer;
import net.shadow.client.helper.render.Renderer;
@ -31,9 +31,9 @@ public class TestScreen extends Screen implements FastTickable {
@Override
protected void init() {
DoubleOption dop = new DoubleOption("bruh", 1, 10, 0.01f, gameOptions -> 1d, (gameOptions, aDouble) -> goopyV = aDouble, (gameOptions, doubleOption) -> Text.of("goopy"));
goopy = new DoubleOptionSliderWidget(CoffeeClientMain.client.options, 5, height - 30, 100, 20, dop, Lists.newArrayList());
goopy = new DoubleOptionSliderWidget(ShadowMain.client.options, 5, height - 30, 100, 20, dop, Lists.newArrayList());
DoubleOption curve = new DoubleOption("curve", 1, 10, 0.01f, gameOptions -> 1d, (gameOptions, aDouble) -> curveV = aDouble, (gameOptions, doubleOption) -> Text.of("real"));
this.curve = new DoubleOptionSliderWidget(CoffeeClientMain.client.options, 110, height - 30, 100, 20, curve, Lists.newArrayList());
this.curve = new DoubleOptionSliderWidget(ShadowMain.client.options, 110, height - 30, 100, 20, curve, Lists.newArrayList());
addDrawableChild(goopy);
addDrawableChild(this.curve);
super.init();

View file

@ -7,7 +7,7 @@ import net.minecraft.client.gui.Selectable;
import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.DoesMSAA;
import net.shadow.client.helper.font.FontRenderers;
import net.shadow.client.helper.render.ClipStack;
@ -64,12 +64,12 @@ public class RoundTextFieldWidget implements Element, Drawable, Selectable, Does
if (control && key == GLFW.GLFW_KEY_C) {
if (cursor != selectionStart || cursor != selectionEnd) {
CoffeeClientMain.client.keyboard.setClipboard(text.substring(selectionStart, selectionEnd));
ShadowMain.client.keyboard.setClipboard(text.substring(selectionStart, selectionEnd));
}
return true;
} else if (control && key == GLFW.GLFW_KEY_X) {
if (cursor != selectionStart || cursor != selectionEnd) {
CoffeeClientMain.client.keyboard.setClipboard(text.substring(selectionStart, selectionEnd));
ShadowMain.client.keyboard.setClipboard(text.substring(selectionStart, selectionEnd));
clearSelection();
}
@ -103,7 +103,7 @@ public class RoundTextFieldWidget implements Element, Drawable, Selectable, Does
clearSelection();
String preText = text;
String clipboard = CoffeeClientMain.client.keyboard.getClipboard();
String clipboard = ShadowMain.client.keyboard.getClipboard();
int addedChars = 0;
StringBuilder sb = new StringBuilder(text.length() + clipboard.length());

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.ModuleConfig;
@ -15,7 +15,7 @@ import net.shadow.client.feature.gui.notifications.Notification;
public abstract class Module {
protected static final MinecraftClient client = CoffeeClientMain.client;
protected static final MinecraftClient client = ShadowMain.client;
public final ModuleConfig config;
public final DoubleSetting keybind;
private final BooleanSetting debuggerEnabled;

View file

@ -14,7 +14,7 @@ import net.minecraft.entity.passive.PassiveEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.Vec2f;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -64,17 +64,17 @@ public class AimAssist extends Module {
attacks.add(AttackManager.getLastAttackInTimeRange());
}
} else {
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (!entity.isAttackable()) {
continue;
}
if (entity.equals(CoffeeClientMain.client.player)) {
if (entity.equals(ShadowMain.client.player)) {
continue;
}
if (!entity.isAlive()) {
continue;
}
if (entity.getPos().distanceTo(CoffeeClientMain.client.player.getPos()) > Objects.requireNonNull(CoffeeClientMain.client.interactionManager).getReachDistance()) {
if (entity.getPos().distanceTo(ShadowMain.client.player.getPos()) > Objects.requireNonNull(ShadowMain.client.interactionManager).getReachDistance()) {
continue;
}
boolean checked = false;
@ -108,7 +108,7 @@ public class AimAssist extends Module {
return;
}
if (priority.getValue() == PriorityMode.Distance) {
le = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos()))).toList()
le = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList()
.get(0);
} else {
// get entity with the least health if mode is ascending, else get most health
@ -147,8 +147,8 @@ public class AimAssist extends Module {
Rotations.lookAtPositionSmooth(le.getPos().add(0, le.getHeight() / 2d, 0), laziness.getValue());
} else {
Vec2f py = Rotations.getPitchYaw(le.getPos().add(0, le.getHeight() / 2d, 0));
Objects.requireNonNull(CoffeeClientMain.client.player).setPitch(py.x);
CoffeeClientMain.client.player.setYaw(py.y);
Objects.requireNonNull(ShadowMain.client.player).setPitch(py.x);
ShadowMain.client.player.setYaw(py.y);
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.module.impl.combat;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -18,11 +18,11 @@ public class AutoAttack extends Module {
@Override
public void tick() {
if (!(CoffeeClientMain.client.crosshairTarget instanceof EntityHitResult) || Objects.requireNonNull(CoffeeClientMain.client.player).getAttackCooldownProgress(0) < 1) {
if (!(ShadowMain.client.crosshairTarget instanceof EntityHitResult) || Objects.requireNonNull(ShadowMain.client.player).getAttackCooldownProgress(0) < 1) {
return;
}
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).attackEntity(CoffeeClientMain.client.player, ((EntityHitResult) CoffeeClientMain.client.crosshairTarget).getEntity());
CoffeeClientMain.client.player.swingHand(Hand.MAIN_HAND);
Objects.requireNonNull(ShadowMain.client.interactionManager).attackEntity(ShadowMain.client.player, ((EntityHitResult) ShadowMain.client.crosshairTarget).getEntity());
ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
}
@Override

View file

@ -9,7 +9,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleRegistry;
@ -27,11 +27,11 @@ public class Criticals extends Module {
super("Criticals", "Makes you deal a perfect 10/10 crit every time", ModuleType.COMBAT);
Events.registerEventHandler(EventType.PACKET_SEND, event1 -> {
PacketEvent event = (PacketEvent) event1;
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (event.getPacket() instanceof PlayerInteractEntityC2SPacket && this.isEnabled()) {
Vec3d ppos = CoffeeClientMain.client.player.getPos();
Vec3d ppos = ShadowMain.client.player.getPos();
ModuleRegistry.getByClass(NoFall.class).enabled = false; // disable nofall modifying packets when we send these
switch (mode.getValue()) {
case Packet -> {
@ -39,16 +39,16 @@ public class Criticals extends Module {
PlayerMoveC2SPacket.PositionAndOnGround p2 = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y, ppos.z, false);
PlayerMoveC2SPacket.PositionAndOnGround p3 = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y + 0.000011, ppos.z, false);
PlayerMoveC2SPacket.PositionAndOnGround p4 = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y, ppos.z, false);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p1);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p2);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p3);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p4);
ShadowMain.client.getNetworkHandler().sendPacket(p1);
ShadowMain.client.getNetworkHandler().sendPacket(p2);
ShadowMain.client.getNetworkHandler().sendPacket(p3);
ShadowMain.client.getNetworkHandler().sendPacket(p4);
}
case TpHop -> {
PlayerMoveC2SPacket.PositionAndOnGround p5 = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y + 0.02, ppos.z, false);
PlayerMoveC2SPacket.PositionAndOnGround p6 = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y + 0.01, ppos.z, false);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p5);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p6);
ShadowMain.client.getNetworkHandler().sendPacket(p5);
ShadowMain.client.getNetworkHandler().sendPacket(p6);
}
}
ModuleRegistry.getByClass(NoFall.class).enabled = true; // re-enable nofall

View file

@ -21,7 +21,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -86,21 +86,21 @@ public class Killaura extends Module {
}
int getDelay() {
if (CoffeeClientMain.client.player == null) {
if (ShadowMain.client.player == null) {
return 0;
}
if (!automaticDelay.getValue()) {
return (int) (delay.getValue() + 0);
} else {
ItemStack hand = CoffeeClientMain.client.player.getMainHandStack();
ItemStack hand = ShadowMain.client.player.getMainHandStack();
if (hand == null) {
hand = CoffeeClientMain.client.player.getOffHandStack();
hand = ShadowMain.client.player.getOffHandStack();
}
if (hand == null) {
return 10;
}
hand.getTooltip(CoffeeClientMain.client.player, TooltipContext.Default.ADVANCED);
AtomicDouble speed = new AtomicDouble(CoffeeClientMain.client.player.getAttributeBaseValue(EntityAttributes.GENERIC_ATTACK_SPEED));
hand.getTooltip(ShadowMain.client.player, TooltipContext.Default.ADVANCED);
AtomicDouble speed = new AtomicDouble(ShadowMain.client.player.getAttributeBaseValue(EntityAttributes.GENERIC_ATTACK_SPEED));
hand.getAttributeModifiers(EquipmentSlot.MAINHAND).forEach((entityAttribute, entityAttributeModifier) -> {
if (entityAttribute == EntityAttributes.GENERIC_ATTACK_SPEED) {
speed.addAndGet(entityAttributeModifier.getValue());
@ -111,18 +111,18 @@ public class Killaura extends Module {
}
double getRange() {
if (CoffeeClientMain.client.interactionManager == null) {
if (ShadowMain.client.interactionManager == null) {
return 0;
}
if (capRangeAtMax.getValue()) {
return CoffeeClientMain.client.interactionManager.getReachDistance();
return ShadowMain.client.interactionManager.getReachDistance();
} else {
return range.getValue();
}
}
void doConfuse(Entity e) { // This also contains a range check
Vec3d updatePos = Objects.requireNonNull(CoffeeClientMain.client.player).getPos();
Vec3d updatePos = Objects.requireNonNull(ShadowMain.client.player).getPos();
switch (confuseMode.getValue()) {
case Behind -> {
Vec3d p = e.getRotationVecClient();
@ -139,17 +139,17 @@ public class Killaura extends Module {
updatePos = new Vec3d(e.getX() + sin, e.getY(), e.getZ() + cos);
}
}
if (!confuseAllowClip.getValue() && Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(new BlockPos(updatePos)).getMaterial().blocksMovement()) {
if (!confuseAllowClip.getValue() && Objects.requireNonNull(ShadowMain.client.world).getBlockState(new BlockPos(updatePos)).getMaterial().blocksMovement()) {
return;
}
if (e.getPos().distanceTo(updatePos) <= getRange()) {
CoffeeClientMain.client.player.updatePosition(updatePos.x, updatePos.y, updatePos.z);
ShadowMain.client.player.updatePosition(updatePos.x, updatePos.y, updatePos.z);
}
}
@Override
public void tick() {
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null || CoffeeClientMain.client.interactionManager == null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null || ShadowMain.client.interactionManager == null) {
return;
}
boolean delayHasPassed = this.delayExec.hasExpired(getDelay() * 50L);
@ -165,7 +165,7 @@ public class Killaura extends Module {
if (!combatPartner.isAttackable()) {
return;
}
if (combatPartner.equals(CoffeeClientMain.client.player)) {
if (combatPartner.equals(ShadowMain.client.player)) {
return;
}
if (!combatPartner.isAlive()) {
@ -174,33 +174,33 @@ public class Killaura extends Module {
if (enableConfuse.getValue()) {
doConfuse(combatPartner);
}
if (combatPartner.getPos().distanceTo(CoffeeClientMain.client.player.getPos()) > getRange()) {
if (combatPartner.getPos().distanceTo(ShadowMain.client.player.getPos()) > getRange()) {
return;
}
Packets.sendServerSideLook(combatPartner.getEyePos());
Rotations.lookAtV3(combatPartner.getPos().add(0, combatPartner.getHeight() / 2, 0));
if (delayHasPassed) {
CoffeeClientMain.client.interactionManager.attackEntity(CoffeeClientMain.client.player, combatPartner);
CoffeeClientMain.client.player.swingHand(Hand.MAIN_HAND);
ShadowMain.client.interactionManager.attackEntity(ShadowMain.client.player, combatPartner);
ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
delayExec.reset();
}
return;
}
attacks.clear();
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (attacks.size() > multiLimit.getValue()) {
break;
}
if (!entity.isAttackable()) {
continue;
}
if (entity.equals(CoffeeClientMain.client.player)) {
if (entity.equals(ShadowMain.client.player)) {
continue;
}
if (!entity.isAlive()) {
continue;
}
if (entity.getPos().distanceTo(CoffeeClientMain.client.player.getPos()) > getRange()) {
if (entity.getPos().distanceTo(ShadowMain.client.player.getPos()) > getRange()) {
continue;
}
@ -208,7 +208,7 @@ public class Killaura extends Module {
attacks.add(entity);
} else {
if (entity instanceof Angerable) {
if (((Angerable) entity).getAngryAt() == CoffeeClientMain.client.player.getUuid()) {
if (((Angerable) entity).getAngryAt() == ShadowMain.client.player.getUuid()) {
if (attackHostile.getValue()) {
attacks.add(entity);
} else if (attackNeutral.getValue()) {
@ -239,7 +239,7 @@ public class Killaura extends Module {
if (mode.getValue() == SelectMode.Single) {
Entity tar = null;
if (prio.getValue() == PriorityMode.Distance) {
tar = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos()))).toList().get(0);
tar = attacks.stream().sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList().get(0);
} else if (prio.getValue() == PriorityMode.Health_ascending || prio.getValue() == PriorityMode.Health_descending) { // almost missed this
// get entity with the least health if mode is ascending, else get most health
tar = attacks.stream().sorted(Comparator.comparingDouble(value -> {
@ -252,12 +252,12 @@ public class Killaura extends Module {
// get entity in front of you (or closest to the front)
tar = attacks.stream().sorted(Comparator.comparingDouble(value -> {
Vec3d center = value.getBoundingBox().getCenter();
double offX = center.x - CoffeeClientMain.client.player.getX();
double offZ = center.z - CoffeeClientMain.client.player.getZ();
double offX = center.x - ShadowMain.client.player.getX();
double offZ = center.z - ShadowMain.client.player.getZ();
float yaw = (float) Math.toDegrees(Math.atan2(offZ, offX)) - 90F;
float pitch = (float) -Math.toDegrees(Math.atan2(center.y - CoffeeClientMain.client.player.getEyeY(), Math.sqrt(offX * offX + offZ * offZ)));
return Math.abs(MathHelper.wrapDegrees(yaw - CoffeeClientMain.client.player.getYaw())) + Math.abs(MathHelper.wrapDegrees(pitch - CoffeeClientMain.client.player.getPitch()));
})).sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos()))).toList().get(0);
float pitch = (float) -Math.toDegrees(Math.atan2(center.y - ShadowMain.client.player.getEyeY(), Math.sqrt(offX * offX + offZ * offZ)));
return Math.abs(MathHelper.wrapDegrees(yaw - ShadowMain.client.player.getYaw())) + Math.abs(MathHelper.wrapDegrees(pitch - ShadowMain.client.player.getPitch()));
})).sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList().get(0);
}
if (tar == null) {
return;
@ -265,14 +265,14 @@ public class Killaura extends Module {
if (enableConfuse.getValue()) {
doConfuse(tar);
}
if (tar.getPos().distanceTo(CoffeeClientMain.client.player.getPos()) > getRange()) {
if (tar.getPos().distanceTo(ShadowMain.client.player.getPos()) > getRange()) {
return;
}
Packets.sendServerSideLook(tar.getEyePos());
Rotations.lookAtV3(tar.getPos().add(0, tar.getHeight() / 2, 0));
if (delayHasPassed) {
CoffeeClientMain.client.interactionManager.attackEntity(CoffeeClientMain.client.player, tar);
CoffeeClientMain.client.player.swingHand(Hand.MAIN_HAND);
ShadowMain.client.interactionManager.attackEntity(ShadowMain.client.player, tar);
ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
delayExec.reset();
}
return;
@ -281,8 +281,8 @@ public class Killaura extends Module {
Packets.sendServerSideLook(attack.getEyePos());
Rotations.lookAtV3(attack.getPos().add(0, attack.getHeight() / 2, 0));
if (delayHasPassed) {
CoffeeClientMain.client.interactionManager.attackEntity(CoffeeClientMain.client.player, attack);
CoffeeClientMain.client.player.swingHand(Hand.MAIN_HAND);
ShadowMain.client.interactionManager.attackEntity(ShadowMain.client.player, attack);
ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
delayExec.reset();
}
}

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module.impl.combat;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -30,11 +30,11 @@ public class Velocity extends Module {
multiplierX.showIf(() -> mode.getValue() == Mode.Modify);
multiplierY.showIf(() -> mode.getValue() == Mode.Modify);
Events.registerEventHandler(EventType.PACKET_RECEIVE, event -> {
if (!this.isEnabled() || CoffeeClientMain.client.player == null) {
if (!this.isEnabled() || ShadowMain.client.player == null) {
return;
}
PacketEvent pe = (PacketEvent) event;
if (pe.getPacket() instanceof EntityVelocityUpdateS2CPacket packet && packet.getId() == CoffeeClientMain.client.player.getId()) {
if (pe.getPacket() instanceof EntityVelocityUpdateS2CPacket packet && packet.getId() == ShadowMain.client.player.getId()) {
if (mode.getValue() == Mode.Modify) {
double velX = packet.getVelocityX() / 8000d; // don't ask me why they did this
double velY = packet.getVelocityY() / 8000d;

View file

@ -13,7 +13,7 @@ import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -70,7 +70,7 @@ public class AntiAntiXray extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (toScan.size() == 0) {
@ -94,19 +94,19 @@ public class AntiAntiXray extends Module {
scanned++;
PlayerActionC2SPacket p = new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.ABORT_DESTROY_BLOCK, current, Direction.DOWN);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p);
ShadowMain.client.getNetworkHandler().sendPacket(p);
}
}
@Override
public void enable() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
toScan.clear();
scanned = 0;
startPos = CoffeeClientMain.client.player.getPos();
BlockPos ppos = CoffeeClientMain.client.player.getBlockPos();
startPos = ShadowMain.client.player.getPos();
BlockPos ppos = ShadowMain.client.player.getBlockPos();
Vec3d lastPos = Vec3d.ZERO;
int rangeMid = (int) (range.getValue() / 2);
int ry = customYSize.getValue() == -1 ? rangeMid : (int) (customYSize.getValue() / 2);
@ -114,7 +114,7 @@ public class AntiAntiXray extends Module {
for (int x = -rangeMid; x < rangeMid; x++) {
for (int z = -rangeMid; z < rangeMid; z++) {
BlockPos current = ppos.add(x, y, z);
BlockState bs = CoffeeClientMain.client.world.getBlockState(current);
BlockState bs = ShadowMain.client.world.getBlockState(current);
Vec3d currentPos = new Vec3d(current.getX(), current.getY(), current.getZ());
if (!bs.isAir() && lastPos.distanceTo(currentPos) >= skipDistance.getValue()) {
if (isBlockValid(bs.getBlock())) {

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.exploit;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -35,7 +35,7 @@ public class AntiReducedDebugInfo extends Module {
@Override
public String getContext() {
boolean origDebugInfoReduce = Objects.requireNonNull(CoffeeClientMain.client.player).hasReducedDebugInfo() || CoffeeClientMain.client.options.reducedDebugInfo;
boolean origDebugInfoReduce = Objects.requireNonNull(ShadowMain.client.player).hasReducedDebugInfo() || ShadowMain.client.options.reducedDebugInfo;
return origDebugInfoReduce ? "Active!" : null;
}

View file

@ -10,7 +10,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
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;
@ -33,17 +33,17 @@ public class Boaty extends Module {
@Override
public void tick() {
if (Objects.requireNonNull(CoffeeClientMain.client.player).hasVehicle()) {
Entity vehicle = CoffeeClientMain.client.player.getVehicle();
if (Objects.requireNonNull(ShadowMain.client.player).hasVehicle()) {
Entity vehicle = ShadowMain.client.player.getVehicle();
if (!running) {
BlockPos start = CoffeeClientMain.client.player.getBlockPos();
BlockPos start = ShadowMain.client.player.getBlockPos();
this.start = new Vec3d(start.getX() + .5, start.getY() + 1, start.getZ() + .5);
}
running = true;
Objects.requireNonNull(vehicle).updatePosition(start.x, start.y - 1, start.z);
VehicleMoveC2SPacket p = new VehicleMoveC2SPacket(vehicle);
for (int i = 0; i < amount.getValue(); i++) {
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
}
} else {
running = false;
@ -80,7 +80,7 @@ public class Boaty extends Module {
@Override
public void onFastTick_NWC() {
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null) {
setEnabled(false);
}
}

View file

@ -15,7 +15,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.math.*;
import net.minecraft.world.RaycastContext;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.gui.notifications.Notification;
@ -52,7 +52,7 @@ public class CarpetBomb extends Module {
if (!this.isEnabled()) {
return;
}
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null || CoffeeClientMain.client.currentScreen != null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null || ShadowMain.client.currentScreen != null) {
return;
}
MouseEvent me = (MouseEvent) event;
@ -65,9 +65,9 @@ public class CarpetBomb extends Module {
void spawn() {
if (mode.getValue() == Mode.Entity) {
Vec3d goal = Objects.requireNonNull(CoffeeClientMain.client.player).getRotationVec(1f).multiply(200);
Box b = CoffeeClientMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
EntityHitResult ehr = ProjectileUtil.raycast(CoffeeClientMain.client.player, CoffeeClientMain.client.player.getCameraPosVec(0), CoffeeClientMain.client.player.getCameraPosVec(0)
Vec3d goal = Objects.requireNonNull(ShadowMain.client.player).getRotationVec(1f).multiply(200);
Box b = ShadowMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0)
.add(goal), b, net.minecraft.entity.Entity::isAttackable, 200 * 200);
if (ehr == null) {
Notification.create(6000, "Error", false, Notification.Type.ERROR, "You aren't looking at an entity");
@ -79,15 +79,15 @@ public class CarpetBomb extends Module {
for (int oz = -10; oz < 11; oz++) {
Vec3d off = new Vec3d(ox, oz, 0);
off = off.multiply(spacing.getValue());
Vec3d a = Rotations.relativeToAbsolute(Objects.requireNonNull(CoffeeClientMain.client.player)
.getCameraPosVec(CoffeeClientMain.client.getTickDelta()), CoffeeClientMain.client.player.getRotationClient(), off);
Vec3d a = Rotations.relativeToAbsolute(Objects.requireNonNull(ShadowMain.client.player)
.getCameraPosVec(ShadowMain.client.getTickDelta()), ShadowMain.client.player.getRotationClient(), off);
Vec3d rot = switch (mode.getValue()) {
case Relative -> CoffeeClientMain.client.player.getRotationVector();
case Relative -> ShadowMain.client.player.getRotationVector();
case Focussed -> {
Vec3d root = CoffeeClientMain.client.player.getCameraPosVec(1);
Vec3d rotNormal = CoffeeClientMain.client.player.getRotationVector();
RaycastContext rc = new RaycastContext(root, root.add(rotNormal.multiply(200)), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, CoffeeClientMain.client.player);
BlockHitResult bhr = Objects.requireNonNull(CoffeeClientMain.client.world).raycast(rc);
Vec3d root = ShadowMain.client.player.getCameraPosVec(1);
Vec3d rotNormal = ShadowMain.client.player.getRotationVector();
RaycastContext rc = new RaycastContext(root, root.add(rotNormal.multiply(200)), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, ShadowMain.client.player);
BlockHitResult bhr = Objects.requireNonNull(ShadowMain.client.world).raycast(rc);
Vec2f real = Rotations.getPitchYawFromOtherEntity(a, bhr.getPos());
float f = real.x * 0.017453292F;
float g = -real.y * 0.017453292F;
@ -152,14 +152,14 @@ public class CarpetBomb extends Module {
motion.add(NbtDouble.of(vel.z));
entityTag.put("power", motion);
entityTag.put("ExplosionPower", NbtDouble.of(power.getValue()));
CreativeInventoryActionC2SPacket set = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(Objects.requireNonNull(CoffeeClientMain.client.player)
CreativeInventoryActionC2SPacket set = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(Objects.requireNonNull(ShadowMain.client.player)
.getInventory().selectedSlot), spawnEgg);
CreativeInventoryActionC2SPacket clr = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), new ItemStack(Items.AIR));
BlockHitResult bhr = new BlockHitResult(CoffeeClientMain.client.player.getPos(), Direction.DOWN, new BlockPos(CoffeeClientMain.client.player.getPos()), false);
CreativeInventoryActionC2SPacket clr = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), new ItemStack(Items.AIR));
BlockHitResult bhr = new BlockHitResult(ShadowMain.client.player.getPos(), Direction.DOWN, new BlockPos(ShadowMain.client.player.getPos()), false);
PlayerInteractBlockC2SPacket put = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(set);
CoffeeClientMain.client.getNetworkHandler().sendPacket(put);
CoffeeClientMain.client.getNetworkHandler().sendPacket(clr);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(set);
ShadowMain.client.getNetworkHandler().sendPacket(put);
ShadowMain.client.getNetworkHandler().sendPacket(clr);
positions = positionsCopy;
}

View file

@ -15,7 +15,7 @@ import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.module.Module;
@ -43,15 +43,15 @@ public class InstaBow extends Module {
}
PacketEvent pe = (PacketEvent) event;
if (pe.getPacket() instanceof PlayerActionC2SPacket packet && packet.getAction() == PlayerActionC2SPacket.Action.RELEASE_USE_ITEM) {
Vec3d a = Objects.requireNonNull(CoffeeClientMain.client.player).getPos().subtract(0, 1e-10, 0);
Vec3d b = CoffeeClientMain.client.player.getPos().add(0, 1e-10, 0);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(new ClientCommandC2SPacket(CoffeeClientMain.client.player, ClientCommandC2SPacket.Mode.START_SPRINTING));
Vec3d a = Objects.requireNonNull(ShadowMain.client.player).getPos().subtract(0, 1e-10, 0);
Vec3d b = ShadowMain.client.player.getPos().add(0, 1e-10, 0);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(new ClientCommandC2SPacket(ShadowMain.client.player, ClientCommandC2SPacket.Mode.START_SPRINTING));
// ModuleRegistry.getByClass(NoFall.class).enabled = false; // disable nofall modifying packets when we send these
for (int i = 0; i < it.getValue(); i++) {
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.PositionAndOnGround(a.x, a.y, a.z, true);
PlayerMoveC2SPacket p1 = new PlayerMoveC2SPacket.PositionAndOnGround(b.x, b.y, b.z, false);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p1);
ShadowMain.client.getNetworkHandler().sendPacket(p);
ShadowMain.client.getNetworkHandler().sendPacket(p1);
}
// ModuleRegistry.getByClass(NoFall.class).enabled = true;
}
@ -63,24 +63,24 @@ public class InstaBow extends Module {
if (!autoFire.getValue()) {
return;
}
Vec3d ep = Objects.requireNonNull(CoffeeClientMain.client.player).getEyePos();
Vec3d ep = Objects.requireNonNull(ShadowMain.client.player).getEyePos();
Entity nearestApplicable = null;
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (entity.getType() == EntityType.ENDERMAN) {
continue;
}
if (!(entity instanceof LivingEntity ent) || !ent.isAttackable() || ent.isDead() || entity.equals(CoffeeClientMain.client.player)) {
if (!(entity instanceof LivingEntity ent) || !ent.isAttackable() || ent.isDead() || entity.equals(ShadowMain.client.player)) {
continue;
}
Vec3d origin = entity.getPos();
float h = entity.getHeight();
Vec3d upper = origin.add(0, h, 0);
Vec3d center = entity.getPos().add(0, h / 2f, 0);
if (Utils.Math.isABObstructed(ep, center, CoffeeClientMain.client.world, CoffeeClientMain.client.player)) {
if (Utils.Math.isABObstructed(ep, center, ShadowMain.client.world, ShadowMain.client.player)) {
continue;
}
if (ep.y < upper.y && ep.y > origin.y) { // entity's on our Y
if (nearestApplicable == null || nearestApplicable.distanceTo(CoffeeClientMain.client.player) > origin.distanceTo(CoffeeClientMain.client.player.getPos())) {
if (nearestApplicable == null || nearestApplicable.distanceTo(ShadowMain.client.player) > origin.distanceTo(ShadowMain.client.player.getPos())) {
nearestApplicable = entity;
}
}
@ -88,14 +88,14 @@ public class InstaBow extends Module {
if (nearestApplicable == null) {
return;
}
if (CoffeeClientMain.client.player.isUsingItem() && CoffeeClientMain.client.player.getMainHandStack().getItem() == Items.BOW) {
BowItem be = (BowItem) CoffeeClientMain.client.player.getMainHandStack().getItem();
int p = be.getMaxUseTime(null) - CoffeeClientMain.client.player.getItemUseTimeLeft();
if (ShadowMain.client.player.isUsingItem() && ShadowMain.client.player.getMainHandStack().getItem() == Items.BOW) {
BowItem be = (BowItem) ShadowMain.client.player.getMainHandStack().getItem();
int p = be.getMaxUseTime(null) - ShadowMain.client.player.getItemUseTimeLeft();
if (BowItem.getPullProgress(p) > 0.1) {
Rotations.lookAtV3(nearestApplicable.getPos().add(0, nearestApplicable.getHeight() / 2f, 0));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler())
.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(Rotations.getClientYaw(), Rotations.getClientPitch(), CoffeeClientMain.client.player.isOnGround()));
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).stopUsingItem(CoffeeClientMain.client.player);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler())
.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(Rotations.getClientYaw(), Rotations.getClientPitch(), ShadowMain.client.player.isOnGround()));
Objects.requireNonNull(ShadowMain.client.interactionManager).stopUsingItem(ShadowMain.client.player);
}
}
}

View file

@ -16,7 +16,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -43,7 +43,7 @@ public class NoComCrash extends Module {
Vec3d cpos = pickRandomPos();
if (method.getValue() == Method.Interact) {
PlayerInteractBlockC2SPacket packet = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(cpos, Direction.DOWN, new BlockPos(cpos), false));
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(packet);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(packet);
} else {
ItemStack stack = new ItemStack(Items.OAK_SIGN, 1);
NbtCompound nbt = stack.getOrCreateSubNbt("BlockEntityTag");
@ -52,7 +52,7 @@ public class NoComCrash extends Module {
nbt.putInt("z", (int) cpos.z);
// stack.setSubNbt("BlockEntityTag", nbt);
CreativeInventoryActionC2SPacket packet = new CreativeInventoryActionC2SPacket(1, stack);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(packet);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(packet);
}
this.i++;
}

View file

@ -12,7 +12,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.font.FontRenderers;
@ -38,10 +38,10 @@ public class OOBCrash extends Module {
}
void doIt() {
BlockHitResult bhr = new BlockHitResult(Objects.requireNonNull(CoffeeClientMain.client.player)
BlockHitResult bhr = new BlockHitResult(Objects.requireNonNull(ShadowMain.client.player)
.getPos(), Direction.DOWN, new BlockPos(new Vec3d(Double.POSITIVE_INFINITY, 5, Double.POSITIVE_INFINITY)), false);
PlayerInteractBlockC2SPacket p = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
Utils.Logging.message("Wait a bit for this to complete, the server will run fine until it autosaves the world. After that, it will just brick itself.");
setEnabled(false);
}
@ -86,7 +86,7 @@ public class OOBCrash extends Module {
@Override
public void onHudRender() {
if (current != null) {
FontRenderers.getRenderer().drawCenteredString(Renderer.R3D.getEmptyMatrixStack(), current.t, CoffeeClientMain.client.getWindow().getScaledWidth() / 2f, CoffeeClientMain.client.getWindow()
FontRenderers.getRenderer().drawCenteredString(Renderer.R3D.getEmptyMatrixStack(), current.t, ShadowMain.client.getWindow().getScaledWidth() / 2f, ShadowMain.client.getWindow()
.getScaledHeight() / 2f, 0xFFFFFF);
}
}

View file

@ -9,7 +9,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.shadow.client.CoffeeClientMain;
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.ModuleRegistry;
@ -28,12 +28,12 @@ public class OffhandCrash extends Module {
@Override
public void tick() {
try {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
throw new Exception();
}
PlayerActionC2SPacket p = new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.SWAP_ITEM_WITH_OFFHAND, BlockPos.ORIGIN, Direction.DOWN);
for (int i = 0; i < a.getValue(); i++) {
CoffeeClientMain.client.getNetworkHandler().sendPacket(p);
ShadowMain.client.getNetworkHandler().sendPacket(p);
}
} catch (Exception ignored) {
this.setEnabled(false);

View file

@ -9,7 +9,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.c2s.play.KeepAliveC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayPongC2SPacket;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -84,7 +84,7 @@ public class PingSpoof extends Module {
@Override
public void onFastTick_NWC() {
if (CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.getNetworkHandler() == null) {
setEnabled(false);
return;
}
@ -93,7 +93,7 @@ public class PingSpoof extends Module {
if (entry.entryTime + entry.delay <= c) {
dontRepeat.add(entry.packet);
entries.remove(entry);
CoffeeClientMain.client.getNetworkHandler().sendPacket(entry.packet);
ShadowMain.client.getNetworkHandler().sendPacket(entry.packet);
}
}
}

View file

@ -11,7 +11,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
@ -56,7 +56,7 @@ public class AutoTrap extends Module {
boolean smallMatches = Arrays.stream(buildOffsetsSmall).allMatch(ints -> {
BlockPos a = bp.add(ints[0], ints[1], ints[2]);
return Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(a).getMaterial().blocksMovement();
return Objects.requireNonNull(ShadowMain.client.world).getBlockState(a).getMaterial().blocksMovement();
});
if (smallMatches) {
return true;
@ -67,7 +67,7 @@ public class AutoTrap extends Module {
Vec3d potentialHome = entityPos.add(ints[0], ints[1], ints[2]);
boolean matches = Arrays.stream(buildOffsetsBig).allMatch(ints1 -> {
BlockPos a = new BlockPos(potentialHome.add(ints1[0], ints1[1], ints1[2]));
return CoffeeClientMain.client.world.getBlockState(a).getMaterial().blocksMovement();
return ShadowMain.client.world.getBlockState(a).getMaterial().blocksMovement();
});
if (matches) {
return true;
@ -77,13 +77,13 @@ public class AutoTrap extends Module {
}
boolean inHitRange(Entity attacker, Vec3d pos) {
return attacker.getCameraPosVec(1f).distanceTo(pos) <= Objects.requireNonNull(CoffeeClientMain.client.interactionManager).getReachDistance() + .5;
return attacker.getCameraPosVec(1f).distanceTo(pos) <= Objects.requireNonNull(ShadowMain.client.interactionManager).getReachDistance() + .5;
}
@Override
public void onFastTick() {
for (Entity player : Objects.requireNonNull(CoffeeClientMain.client.world).getPlayers()) {
if (player.equals(CoffeeClientMain.client.player)) {
for (Entity player : Objects.requireNonNull(ShadowMain.client.world).getPlayers()) {
if (player.equals(ShadowMain.client.player)) {
continue;
}
if (isTrappedAlready(player)) {
@ -103,14 +103,14 @@ public class AutoTrap extends Module {
double[][] filteredPlan = Arrays.stream(planToUse).filter(ints -> {
Vec3d v = player.getPos().add(new Vec3d(ints[0], ints[1], ints[2]));
return inHitRange(CoffeeClientMain.client.player, v.add(.5, .5, .5));
return inHitRange(ShadowMain.client.player, v.add(.5, .5, .5));
}).toList().toArray(double[][]::new);
int slot = -1;
for (int i = 0; i < 9; i++) {
ItemStack real = CoffeeClientMain.client.player.getInventory().getStack(i);
ItemStack real = ShadowMain.client.player.getInventory().getStack(i);
if (real.getItem() instanceof BlockItem bi && Block.isShapeFullCube(bi.getBlock()
.getOutlineShape(bi.getBlock().getDefaultState(), CoffeeClientMain.client.world, new BlockPos(0, 0, 0), ShapeContext.absent()))) {
.getOutlineShape(bi.getBlock().getDefaultState(), ShadowMain.client.world, new BlockPos(0, 0, 0), ShapeContext.absent()))) {
slot = i;
}
}
@ -120,19 +120,19 @@ public class AutoTrap extends Module {
int finalSlot = slot;
// make sure we're in sync
CoffeeClientMain.client.execute(() -> {
int selSlot = CoffeeClientMain.client.player.getInventory().selectedSlot;
CoffeeClientMain.client.player.getInventory().selectedSlot = finalSlot;
ShadowMain.client.execute(() -> {
int selSlot = ShadowMain.client.player.getInventory().selectedSlot;
ShadowMain.client.player.getInventory().selectedSlot = finalSlot;
for (double[] ints : filteredPlan) {
BlockPos current = new BlockPos(pos.add(ints[0], ints[1], ints[2]));
if (!CoffeeClientMain.client.world.getBlockState(current).isAir()) {
if (!ShadowMain.client.world.getBlockState(current).isAir()) {
continue;
}
BlockHitResult bhr = new BlockHitResult(Vec3d.of(current), Direction.DOWN, current, false);
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).interactBlock(CoffeeClientMain.client.player, CoffeeClientMain.client.world, Hand.MAIN_HAND, bhr);
Objects.requireNonNull(ShadowMain.client.interactionManager).interactBlock(ShadowMain.client.player, ShadowMain.client.world, Hand.MAIN_HAND, bhr);
}
CoffeeClientMain.client.player.getInventory().selectedSlot = selSlot;
ShadowMain.client.player.getInventory().selectedSlot = selSlot;
});
}
}
@ -160,8 +160,8 @@ public class AutoTrap extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (isDebuggerEnabled()) {
for (Entity player : Objects.requireNonNull(CoffeeClientMain.client.world).getPlayers()) {
if (player.equals(CoffeeClientMain.client.player)) {
for (Entity player : Objects.requireNonNull(ShadowMain.client.world).getPlayers()) {
if (player.equals(ShadowMain.client.player)) {
continue;
}
if (isTrappedAlready(player)) {
@ -182,11 +182,11 @@ public class AutoTrap extends Module {
for (double[] ints : planToUse) {
BlockPos current = new BlockPos(pos.add(ints[0], ints[1], ints[2]));
Vec3d v3 = Vec3d.of(current);
if (!inHitRange(CoffeeClientMain.client.player, v3.add(.5, .5, .5))) {
if (!inHitRange(ShadowMain.client.player, v3.add(.5, .5, .5))) {
Renderer.R3D.renderOutline(v3, new Vec3d(1, 1, 1), Color.RED, matrices);
continue;
}
if (!CoffeeClientMain.client.world.getBlockState(current).isAir()) {
if (!ShadowMain.client.world.getBlockState(current).isAir()) {
Renderer.R3D.renderOutline(v3, new Vec3d(1, 1, 1), Color.BLUE, matrices);
continue;
}

View file

@ -7,7 +7,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.hit.HitResult;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -30,15 +30,15 @@ public class FakeHacker extends Module {
if (!this.isEnabled()) {
return;
}
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
if (CoffeeClientMain.client.currentScreen != null) {
if (ShadowMain.client.currentScreen != null) {
return;
}
MouseEvent me = (MouseEvent) event;
if (me.getAction() == 1 && me.getButton() == 2) {
HitResult hr = CoffeeClientMain.client.crosshairTarget;
HitResult hr = ShadowMain.client.crosshairTarget;
if (hr instanceof EntityHitResult ehr && ehr.getEntity() instanceof PlayerEntity pe) {
target = pe;
}
@ -49,7 +49,7 @@ public class FakeHacker extends Module {
@Override
public void tick() {
if (target != null) {
Iterable<Entity> entities = Objects.requireNonNull(CoffeeClientMain.client.world).getEntities();
Iterable<Entity> entities = Objects.requireNonNull(ShadowMain.client.world).getEntities();
List<Entity> entities1 = new ArrayList<>(StreamSupport.stream(entities.spliterator(), false).toList());
Collections.shuffle(entities1);
for (Entity entity : entities1) {

View file

@ -9,7 +9,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.Hand;
import net.shadow.client.CoffeeClientMain;
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;
@ -61,9 +61,9 @@ public class Spinner extends Module {
Rotations.setClientPitch((float) ((Math.random() * 60) - 30));
Rotations.setClientYaw((float) (Math.random() * 360));
PlayerInteractItemC2SPacket p = new PlayerInteractItemC2SPacket(Hand.MAIN_HAND);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
PlayerMoveC2SPacket p1 = new PlayerMoveC2SPacket.LookAndOnGround((float) r, Rotations.getClientPitch(), Objects.requireNonNull(CoffeeClientMain.client.player).isOnGround());
CoffeeClientMain.client.getNetworkHandler().sendPacket(p1);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
PlayerMoveC2SPacket p1 = new PlayerMoveC2SPacket.LookAndOnGround((float) r, Rotations.getClientPitch(), Objects.requireNonNull(ShadowMain.client.player).isOnGround());
ShadowMain.client.getNetworkHandler().sendPacket(p1);
}
@Override

View file

@ -6,7 +6,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3f;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.ColorSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -45,7 +45,7 @@ public class Test extends Module {
@Override
public void onWorldRender(MatrixStack s) {
Camera camera = CoffeeClientMain.client.gameRenderer.getCamera();
Camera camera = ShadowMain.client.gameRenderer.getCamera();
Vec3d camPos = camera.getPos();
MatrixStack stack = new MatrixStack();
stack.push();

View file

@ -9,7 +9,7 @@ import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
@ -41,10 +41,10 @@ public class TpRange extends Module {
if (!this.isEnabled()) {
return;
}
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
if (CoffeeClientMain.client.currentScreen != null) {
if (ShadowMain.client.currentScreen != null) {
return;
}
MouseEvent me = (MouseEvent) event;
@ -68,28 +68,28 @@ public class TpRange extends Module {
}
void doIt() {
Vec3d goal = Objects.requireNonNull(CoffeeClientMain.client.player).getRotationVec(1f).multiply(200);
Box b = CoffeeClientMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
EntityHitResult ehr = ProjectileUtil.raycast(CoffeeClientMain.client.player, CoffeeClientMain.client.player.getCameraPosVec(0), CoffeeClientMain.client.player.getCameraPosVec(0)
Vec3d goal = Objects.requireNonNull(ShadowMain.client.player).getRotationVec(1f).multiply(200);
Box b = ShadowMain.client.player.getBoundingBox().stretch(goal).expand(1, 1, 1);
EntityHitResult ehr = ProjectileUtil.raycast(ShadowMain.client.player, ShadowMain.client.player.getCameraPosVec(0), ShadowMain.client.player.getCameraPosVec(0)
.add(goal), b, Entity::isAttackable, 200 * 200);
if (ehr == null) {
return;
}
Vec3d pos = ehr.getPos();
Vec3d orig = CoffeeClientMain.client.player.getPos();
Vec3d orig = ShadowMain.client.player.getPos();
if (mode.getValue() == Mode.PaperBypass) {
teleportTo(orig, pos);
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).attackEntity(CoffeeClientMain.client.player, ehr.getEntity());
Objects.requireNonNull(ShadowMain.client.interactionManager).attackEntity(ShadowMain.client.player, ehr.getEntity());
Utils.sleep(100);
teleportTo(pos, orig);
CoffeeClientMain.client.player.updatePosition(orig.x, orig.y, orig.z);
ShadowMain.client.player.updatePosition(orig.x, orig.y, orig.z);
} else {
PlayerMoveC2SPacket tpToEntity = new PlayerMoveC2SPacket.PositionAndOnGround(pos.x, pos.y, pos.z, false);
PlayerMoveC2SPacket tpBack = new PlayerMoveC2SPacket.PositionAndOnGround(orig.x, orig.y, orig.z, true);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(tpToEntity);
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).attackEntity(CoffeeClientMain.client.player, ehr.getEntity());
CoffeeClientMain.client.getNetworkHandler().sendPacket(tpBack);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(tpToEntity);
Objects.requireNonNull(ShadowMain.client.interactionManager).attackEntity(ShadowMain.client.player, ehr.getEntity());
ShadowMain.client.getNetworkHandler().sendPacket(tpBack);
}
}
@ -107,13 +107,13 @@ public class TpRange extends Module {
double newY = MathHelper.lerp(prog, from.y, pos.y);
double newZ = MathHelper.lerp(prog, from.z, pos.z);
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.PositionAndOnGround(newX, newY, newZ, true);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
previousSpoofedPos = spoofedPos;
spoofedPos = new Vec3d(newX, newY, newZ);
Utils.sleep(10);
}
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.PositionAndOnGround(pos.x, pos.y, pos.z, true);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
previousSpoofedPos = null;
spoofedPos = null;
}

View file

@ -5,7 +5,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
import net.minecraft.network.packet.s2c.play.OpenScreenS2CPacket;
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.gui.notifications.Notification;
@ -107,7 +107,7 @@ public class AntiCrash extends Module {
}
}
if (pe.getPacket() instanceof ParticleS2CPacket p && capParticles.getValue()) {
int partTotal = ((ParticleManagerDuck) CoffeeClientMain.client.particleManager).getTotalParticles();
int partTotal = ((ParticleManagerDuck) ShadowMain.client.particleManager).getTotalParticles();
int newCount = partTotal + p.getCount();
if (newCount >= particleMax.getValue()) {
int space = (int) Math.floor(particleMax.getValue() - partTotal);

View file

@ -6,7 +6,7 @@ import net.minecraft.entity.projectile.FireballEntity;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.Vec2f;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -40,27 +40,27 @@ public class FireballDeflector extends Module {
Entity owner = fe.getOwner();
if (owner != null) {
// we are the owner of this fireball = we shot it = dont hit it again
if (owner.equals(CoffeeClientMain.client.player)) {
if (owner.equals(ShadowMain.client.player)) {
return;
}
if (mode.getValue() == Mode.ReflectBack) {
Vec2f pitchYaw = Rotations.getPitchYawFromOtherEntity(fe.getPos().add(0, fe.getHeight() / 2, 0), owner.getPos().add(0, owner.getHeight() / 2, 0));
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.LookAndOnGround(pitchYaw.y, pitchYaw.x, CoffeeClientMain.client.player.isOnGround());
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.LookAndOnGround(pitchYaw.y, pitchYaw.x, ShadowMain.client.player.isOnGround());
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
}
}
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).attackEntity(CoffeeClientMain.client.player, fe);
Objects.requireNonNull(ShadowMain.client.interactionManager).attackEntity(ShadowMain.client.player, fe);
}
boolean inHitRange(Entity attacker, Entity target) {
return attacker.getCameraPosVec(1f).distanceTo(target.getPos().add(0, target.getHeight() / 2, 0)) <= Objects.requireNonNull(CoffeeClientMain.client.interactionManager).getReachDistance();
return attacker.getCameraPosVec(1f).distanceTo(target.getPos().add(0, target.getHeight() / 2, 0)) <= Objects.requireNonNull(ShadowMain.client.interactionManager).getReachDistance();
}
@Override
public void onFastTick() {
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (entity instanceof FireballEntity fe) {
if (inHitRange(Objects.requireNonNull(CoffeeClientMain.client.player), fe) && isApproaching(CoffeeClientMain.client.player.getPos(), fe.getPos(), fe.getVelocity())) {
if (inHitRange(Objects.requireNonNull(ShadowMain.client.player), fe) && isApproaching(ShadowMain.client.player.getPos(), fe.getPos(), fe.getVelocity())) {
hit(fe);
}
}
@ -90,16 +90,16 @@ public class FireballDeflector extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (isDebuggerEnabled()) {
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (entity instanceof FireballEntity fe) {
if (fe.getOwner() != null) {
Entity owner = fe.getOwner();
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(owner).add(0, owner.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe)
.add(0, fe.getHeight() / 2, 0), Color.MAGENTA, matrices);
}
if (inHitRange(Objects.requireNonNull(CoffeeClientMain.client.player), fe)) {
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player)
.add(0, CoffeeClientMain.client.player.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe).add(0, fe.getHeight() / 2, 0), Color.RED, matrices);
if (inHitRange(Objects.requireNonNull(ShadowMain.client.player), fe)) {
Renderer.R3D.renderLine(Utils.getInterpolatedEntityPosition(ShadowMain.client.player)
.add(0, ShadowMain.client.player.getHeight() / 2, 0), Utils.getInterpolatedEntityPosition(fe).add(0, fe.getHeight() / 2, 0), Color.RED, matrices);
}
}
}

View file

@ -9,7 +9,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.s2c.play.SubtitleS2CPacket;
import net.minecraft.network.packet.s2c.play.TitleFadeS2CPacket;
import net.minecraft.network.packet.s2c.play.TitleS2CPacket;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -41,7 +41,7 @@ public class NoTitles extends Module {
event.setCancelled(true);
} else if (pe.getPacket() instanceof SubtitleS2CPacket || pe.getPacket() instanceof TitleFadeS2CPacket) {
event.setCancelled(true);
CoffeeClientMain.client.inGameHud.setDefaultTitleFade();
ShadowMain.client.inGameHud.setDefaultTitleFade();
}
});
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.module.impl.misc;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.ShulkerBulletEntity;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -23,17 +23,17 @@ public class ShulkerDeflector extends Module {
}
boolean inHitRange(Entity attacker, Entity target) {
return attacker.getCameraPosVec(1f).distanceTo(target.getPos().add(0, target.getHeight() / 2, 0)) <= Objects.requireNonNull(CoffeeClientMain.client.interactionManager).getReachDistance();
return attacker.getCameraPosVec(1f).distanceTo(target.getPos().add(0, target.getHeight() / 2, 0)) <= Objects.requireNonNull(ShadowMain.client.interactionManager).getReachDistance();
}
@Override
public void onFastTick() {
for (Entity entity : Objects.requireNonNull(CoffeeClientMain.client.world).getEntities()) {
if (entity instanceof ShulkerBulletEntity sbe && inHitRange(Objects.requireNonNull(CoffeeClientMain.client.player), sbe)) {
if (checkOwner.getValue() && sbe.getOwner() != null && sbe.getOwner().equals(CoffeeClientMain.client.player)) {
for (Entity entity : Objects.requireNonNull(ShadowMain.client.world).getEntities()) {
if (entity instanceof ShulkerBulletEntity sbe && inHitRange(Objects.requireNonNull(ShadowMain.client.player), sbe)) {
if (checkOwner.getValue() && sbe.getOwner() != null && sbe.getOwner().equals(ShadowMain.client.player)) {
continue;
}
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).attackEntity(CoffeeClientMain.client.player, sbe);
Objects.requireNonNull(ShadowMain.client.interactionManager).attackEntity(ShadowMain.client.player, sbe);
}
}
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -18,12 +18,12 @@ public class AirJump extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (CoffeeClientMain.client.options.jumpKey.isPressed()) {
CoffeeClientMain.client.player.setOnGround(true);
CoffeeClientMain.client.player.fallDistance = 0f;
if (ShadowMain.client.options.jumpKey.isPressed()) {
ShadowMain.client.player.setOnGround(true);
ShadowMain.client.player.fallDistance = 0f;
}
}

View file

@ -8,7 +8,7 @@ import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -24,9 +24,9 @@ public class AntiAnvil extends Module {
@Override
public void tick() {
// Vec3d currentPos = CoffeeClientMain.client.player.getPos();
BlockPos currentPos = Objects.requireNonNull(CoffeeClientMain.client.player).getBlockPos();
Vec3d ppos = CoffeeClientMain.client.player.getPos();
List<Entity> anvils = StreamSupport.stream(Objects.requireNonNull(CoffeeClientMain.client.world).getEntities().spliterator(), false).filter(entity -> {
BlockPos currentPos = Objects.requireNonNull(ShadowMain.client.player).getBlockPos();
Vec3d ppos = ShadowMain.client.player.getPos();
List<Entity> anvils = StreamSupport.stream(Objects.requireNonNull(ShadowMain.client.world).getEntities().spliterator(), false).filter(entity -> {
if (entity instanceof FallingBlockEntity e) {
Block bs = e.getBlockState().getBlock();
return bs == Blocks.ANVIL || bs == Blocks.CHIPPED_ANVIL || bs == Blocks.DAMAGED_ANVIL;
@ -40,7 +40,7 @@ public class AntiAnvil extends Module {
double yDist = anvilPos.y - ppos.y;
if (yDist > 0 && yDist < -anvil.getVelocity().y * 2) { // anvil is 0-1 blocks above our feet
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.PositionAndOnGround(ppos.x, ppos.y + 1, ppos.z, false);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
// CoffeeClientMain.client.player.updatePosition(ppos.x,ppos.y+1,ppos.z);
}
}

View file

@ -8,7 +8,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.shadow.client.CoffeeClientMain;
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;
@ -27,15 +27,15 @@ public class AutoElytra extends Module {
}
boolean equippedElytra() {
return Objects.requireNonNull(CoffeeClientMain.client.player).getInventory().armor.get(2).getItem() == Items.ELYTRA;
return Objects.requireNonNull(ShadowMain.client.player).getInventory().armor.get(2).getItem() == Items.ELYTRA;
}
@Override
public void tick() {
if (Objects.requireNonNull(CoffeeClientMain.client.player).fallDistance > fallDist.getValue()) {
if (Objects.requireNonNull(ShadowMain.client.player).fallDistance > fallDist.getValue()) {
if (!equippedElytra()) { // do we not have an elytra equipped?
for (int i = 0; i < (9 * 4 + 1); i++) { // gotta equip
ItemStack stack = CoffeeClientMain.client.player.getInventory().getStack(i); // is it an elytra?
ItemStack stack = ShadowMain.client.player.getInventory().getStack(i); // is it an elytra?
if (stack.getItem() == Items.ELYTRA) {
Utils.Inventory.moveStackToOther(Utils.Inventory.slotIndexToId(i), 6); // equip
break; // we found the item, cancel the loop
@ -57,7 +57,7 @@ public class AutoElytra extends Module {
@Override
public String getContext() {
float fd = Objects.requireNonNull(CoffeeClientMain.client.player).fallDistance;
float fd = Objects.requireNonNull(ShadowMain.client.player).fallDistance;
if (fd > fallDist.getMin()) {
return Utils.Math.roundToDecimal(fd, 1) + " | " + fallDist.getValue();
}

View file

@ -4,7 +4,7 @@ import net.minecraft.client.util.InputUtil;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.event.EventType;
@ -36,11 +36,11 @@ public class Backtrack extends Module {
}
boolean shouldBacktrack() {
return InputUtil.isKeyPressed(CoffeeClientMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_ALT) && CoffeeClientMain.client.currentScreen == null;
return InputUtil.isKeyPressed(ShadowMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_LEFT_ALT) && ShadowMain.client.currentScreen == null;
}
void shouldCommit() {
boolean a = !committed && InputUtil.isKeyPressed(CoffeeClientMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_ENTER) && CoffeeClientMain.client.currentScreen == null;
boolean a = !committed && InputUtil.isKeyPressed(ShadowMain.client.getWindow().getHandle(), GLFW.GLFW_KEY_ENTER) && ShadowMain.client.currentScreen == null;
if (a) {
committed = true;
}
@ -52,10 +52,10 @@ public class Backtrack extends Module {
}
void moveTo(PositionEntry e) {
CoffeeClientMain.client.player.updatePosition(e.pos.x, e.pos.y, e.pos.z);
CoffeeClientMain.client.player.setPitch((float) e.pitch);
CoffeeClientMain.client.player.setYaw((float) e.yaw);
CoffeeClientMain.client.player.setVelocity(e.vel);
ShadowMain.client.player.updatePosition(e.pos.x, e.pos.y, e.pos.z);
ShadowMain.client.player.setPitch((float) e.pitch);
ShadowMain.client.player.setYaw((float) e.yaw);
ShadowMain.client.player.setVelocity(e.vel);
}
@Override
@ -69,7 +69,7 @@ public class Backtrack extends Module {
public void disable() {
entries.clear();
committed = false;
CoffeeClientMain.client.player.setNoGravity(false);
ShadowMain.client.player.setNoGravity(false);
}
@Override
@ -82,9 +82,9 @@ public class Backtrack extends Module {
shouldCommit();
if (!shouldBacktrack() && !committed) {
entries.add(new PositionEntry(Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player), CoffeeClientMain.client.player.getVelocity(), CoffeeClientMain.client.player.getPitch(), CoffeeClientMain.client.player.getYaw()));
entries.add(new PositionEntry(Utils.getInterpolatedEntityPosition(ShadowMain.client.player), ShadowMain.client.player.getVelocity(), ShadowMain.client.player.getPitch(), ShadowMain.client.player.getYaw()));
} else if (committed) {
CoffeeClientMain.client.player.setNoGravity(true);
ShadowMain.client.player.setNoGravity(true);
moveTo(entries.get(0));
entries.remove(0);
if (entries.isEmpty()) {

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
@ -28,10 +28,10 @@ public class BlocksmcFlight extends Module {
if (jumpTimeout < 0) {
jumpTimeout = 0;
}
if (CoffeeClientMain.client.player.getPos().y < yStart && jumpTimeout == 0) {
CoffeeClientMain.client.player.jump();
if (ShadowMain.client.player.getPos().y < yStart && jumpTimeout == 0) {
ShadowMain.client.player.jump();
AnimatedCircle ac = new AnimatedCircle();
ac.spawnPos = CoffeeClientMain.client.player.getPos();
ac.spawnPos = ShadowMain.client.player.getPos();
circles.add(ac);
jumpTimeout = 5;
}
@ -39,7 +39,7 @@ public class BlocksmcFlight extends Module {
@Override
public void enable() {
yStart = CoffeeClientMain.client.player.getPos().y;
yStart = ShadowMain.client.player.getPos().y;
}
@Override
@ -55,7 +55,7 @@ public class BlocksmcFlight extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
Vec3d ppos = Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player);
Vec3d ppos = Utils.getInterpolatedEntityPosition(ShadowMain.client.player);
Vec3d renderPos = new Vec3d(ppos.x, yStart, ppos.z);
Renderer.R3D.renderOutline(renderPos.subtract(1, 0, 1), new Vec3d(2, 0, 2), Color.RED, matrices);
circles.removeIf(animatedCircle -> animatedCircle.animProg > 1);

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.vehicle.BoatEntity;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -41,17 +41,17 @@ public class BoatPhase extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (!(CoffeeClientMain.client.player.getVehicle() instanceof BoatEntity)) {
if (!(ShadowMain.client.player.getVehicle() instanceof BoatEntity)) {
Notification.create(5000, "Boat phase", true, Notification.Type.INFO, "sir you need a boat");
setEnabled(false);
return;
}
CoffeeClientMain.client.player.getVehicle().noClip = true;
CoffeeClientMain.client.player.getVehicle().setNoGravity(true);
CoffeeClientMain.client.player.noClip = true;
ShadowMain.client.player.getVehicle().noClip = true;
ShadowMain.client.player.getVehicle().setNoGravity(true);
ShadowMain.client.player.noClip = true;
}
@Override

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -29,15 +29,15 @@ public class Boost extends Module {
@Override
public void enable() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
setEnabled(false);
Vec3d newVelocity = CoffeeClientMain.client.player.getRotationVector().multiply(strength.getValue());
Vec3d newVelocity = ShadowMain.client.player.getRotationVector().multiply(strength.getValue());
if (this.mode.getValue() == Mode.Add) {
CoffeeClientMain.client.player.addVelocity(newVelocity.x, newVelocity.y, newVelocity.z);
ShadowMain.client.player.addVelocity(newVelocity.x, newVelocity.y, newVelocity.z);
} else {
CoffeeClientMain.client.player.setVelocity(newVelocity);
ShadowMain.client.player.setVelocity(newVelocity);
}
}

View file

@ -7,7 +7,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Box;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -21,17 +21,17 @@ public class EdgeJump extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
if (!CoffeeClientMain.client.player.isOnGround() || CoffeeClientMain.client.player.isSneaking()) {
if (!ShadowMain.client.player.isOnGround() || ShadowMain.client.player.isSneaking()) {
return;
}
Box bounding = CoffeeClientMain.client.player.getBoundingBox();
Box bounding = ShadowMain.client.player.getBoundingBox();
bounding = bounding.offset(0, -0.5, 0);
bounding = bounding.expand(-0.001, 0, -0.001);
if (!CoffeeClientMain.client.world.getBlockCollisions(client.player, bounding).iterator().hasNext()) {
if (!ShadowMain.client.world.getBlockCollisions(client.player, bounding).iterator().hasNext()) {
Objects.requireNonNull(client.player).jump();
}
}

View file

@ -11,7 +11,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -25,10 +25,10 @@ public class EdgeSneak extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
Box bounding = CoffeeClientMain.client.player.getBoundingBox();
Box bounding = ShadowMain.client.player.getBoundingBox();
bounding = bounding.offset(0, -1, 0);
bounding = bounding.expand(0.3);
boolean sneak = false;
@ -36,8 +36,8 @@ public class EdgeSneak extends Module {
for (int z = -1; z < 2; z++) {
double xScale = x / 3d + .5;
double zScale = z / 3d + .5;
BlockPos current = CoffeeClientMain.client.player.getBlockPos().add(x, -1, z);
BlockState bs = CoffeeClientMain.client.world.getBlockState(current);
BlockPos current = ShadowMain.client.player.getBlockPos().add(x, -1, z);
BlockState bs = ShadowMain.client.world.getBlockState(current);
if (bs.isAir() && bounding.contains(new Vec3d(current.getX() + xScale, current.getY() + 1, current.getZ() + zScale))) {
sneak = true;
break;
@ -45,7 +45,7 @@ public class EdgeSneak extends Module {
}
}
//STL.notifyUser(sneak+"");
boolean previousState = InputUtil.isKeyPressed(CoffeeClientMain.client.getWindow().getHandle(), client.options.sneakKey.getDefaultKey().getCode());
boolean previousState = InputUtil.isKeyPressed(ShadowMain.client.getWindow().getHandle(), client.options.sneakKey.getDefaultKey().getCode());
if (Objects.requireNonNull(client.player).isOnGround()) {
client.options.sneakKey.setPressed(sneak || previousState);
}

View file

@ -12,7 +12,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.mob.MobEntity;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.util.Utils;
@ -31,10 +31,10 @@ public class EntityFly extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
Entity vehicle = CoffeeClientMain.client.player.getVehicle();
Entity vehicle = ShadowMain.client.player.getVehicle();
if (vehicle == null) {
return;
}
@ -43,7 +43,7 @@ public class EntityFly extends Module {
if (vehicle instanceof MobEntity) {
((MobEntity) vehicle).setAiDisabled(true);
}
GameOptions go = CoffeeClientMain.client.options;
GameOptions go = ShadowMain.client.options;
float y = Objects.requireNonNull(client.player).getYaw();
int mx = 0, my = 0, mz = 0;
if (go.jumpKey.isPressed()) {

View file

@ -6,7 +6,7 @@ import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -46,7 +46,7 @@ public class Flight extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
double speed = this.speed.getValue();
@ -54,19 +54,19 @@ public class Flight extends Module {
bypassTimer++;
if (bypassTimer > 10) {
bypassTimer = 0;
Vec3d p = CoffeeClientMain.client.player.getPos();
CoffeeClientMain.client.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(p.x, p.y - 0.2, p.z, false));
CoffeeClientMain.client.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(p.x, p.y + 0.2, p.z, false));
Vec3d p = ShadowMain.client.player.getPos();
ShadowMain.client.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(p.x, p.y - 0.2, p.z, false));
ShadowMain.client.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(p.x, p.y + 0.2, p.z, false));
}
}
switch (mode.getValue()) {
case Vanilla:
CoffeeClientMain.client.player.getAbilities().setFlySpeed((float) (this.speed.getValue() + 0f) / 20f);
CoffeeClientMain.client.player.getAbilities().flying = true;
ShadowMain.client.player.getAbilities().setFlySpeed((float) (this.speed.getValue() + 0f) / 20f);
ShadowMain.client.player.getAbilities().flying = true;
break;
case Static:
GameOptions go = CoffeeClientMain.client.options;
float y = CoffeeClientMain.client.player.getYaw();
GameOptions go = ShadowMain.client.options;
float y = ShadowMain.client.player.getYaw();
int mx = 0, my = 0, mz = 0;
if (go.jumpKey.isPressed()) {
@ -96,22 +96,22 @@ public class Flight extends Module {
nx += ts * mx * -c;
nz += ts * mx * -s;
Vec3d nv3 = new Vec3d(nx, ny, nz);
CoffeeClientMain.client.player.setVelocity(nv3);
ShadowMain.client.player.setVelocity(nv3);
break;
case Jetpack:
if (CoffeeClientMain.client.options.jumpKey.isPressed()) {
assert CoffeeClientMain.client.player != null;
CoffeeClientMain.client.player.addVelocity(0, speed / 30, 0);
Vec3d vp = CoffeeClientMain.client.player.getPos();
if (ShadowMain.client.options.jumpKey.isPressed()) {
assert ShadowMain.client.player != null;
ShadowMain.client.player.addVelocity(0, speed / 30, 0);
Vec3d vp = ShadowMain.client.player.getPos();
Random r = new Random();
for (int i = 0; i < 10; i++) {
CoffeeClientMain.client.world.addImportantParticle(ParticleTypes.SOUL_FIRE_FLAME, true, vp.x, vp.y, vp.z, (r.nextDouble() * 0.25) - .125, (r.nextDouble() * 0.25) - .125, (r.nextDouble() * 0.25) - .125);
ShadowMain.client.world.addImportantParticle(ParticleTypes.SOUL_FIRE_FLAME, true, vp.x, vp.y, vp.z, (r.nextDouble() * 0.25) - .125, (r.nextDouble() * 0.25) - .125, (r.nextDouble() * 0.25) - .125);
}
}
break;
case ThreeD:
CoffeeClientMain.client.player.setVelocity(CoffeeClientMain.client.player.getRotationVector().multiply(speed)
.multiply(CoffeeClientMain.client.player.input.pressingForward ? 1 : (CoffeeClientMain.client.player.input.pressingBack ? -1 : 0)));
ShadowMain.client.player.setVelocity(ShadowMain.client.player.getRotationVector().multiply(speed)
.multiply(ShadowMain.client.player.input.pressingForward ? 1 : (ShadowMain.client.player.input.pressingBack ? -1 : 0)));
break;
}
}
@ -119,15 +119,15 @@ public class Flight extends Module {
@Override
public void enable() {
bypassTimer = 0;
flewBefore = Objects.requireNonNull(CoffeeClientMain.client.player).getAbilities().flying;
CoffeeClientMain.client.player.setOnGround(false);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(new ClientCommandC2SPacket(CoffeeClientMain.client.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY));
flewBefore = Objects.requireNonNull(ShadowMain.client.player).getAbilities().flying;
ShadowMain.client.player.setOnGround(false);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(new ClientCommandC2SPacket(ShadowMain.client.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY));
}
@Override
public void disable() {
Objects.requireNonNull(CoffeeClientMain.client.player).getAbilities().flying = flewBefore;
CoffeeClientMain.client.player.getAbilities().setFlySpeed(0.05f);
Objects.requireNonNull(ShadowMain.client.player).getAbilities().flying = flewBefore;
ShadowMain.client.player.getAbilities().setFlySpeed(0.05f);
}
@Override
@ -138,8 +138,8 @@ public class Flight extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (isDebuggerEnabled()) {
Vec3d a = Utils.getInterpolatedEntityPosition(Objects.requireNonNull(CoffeeClientMain.client.player));
Vec3d b = a.add(CoffeeClientMain.client.player.getVelocity());
Vec3d a = Utils.getInterpolatedEntityPosition(Objects.requireNonNull(ShadowMain.client.player));
Vec3d b = a.add(ShadowMain.client.player.getVelocity());
Renderer.R3D.renderLine(a, b, Color.CYAN, matrices);
}
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
@ -28,10 +28,10 @@ public class Jesus extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (CoffeeClientMain.client.player.isWet()) {
if (ShadowMain.client.player.isWet()) {
switch (mode.getValue()) {
case Jump -> Objects.requireNonNull(client.player).jump();
case Velocity -> Objects.requireNonNull(client.player).setVelocity(client.player.getVelocity().x, velStrength.getValue(), client.player.getVelocity().z);

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -30,11 +30,11 @@ public class LongJump extends Module {
}
Vec3d getVel() {
float f = Objects.requireNonNull(CoffeeClientMain.client.player).getYaw() * 0.017453292F;
float f = Objects.requireNonNull(ShadowMain.client.player).getYaw() * 0.017453292F;
double scaled = xz.getValue() / 5;
return switch (focus.getValue()) {
case Direction -> new Vec3d(-MathHelper.sin(f) * scaled, 0.0D, MathHelper.cos(f) * scaled);
case Velocity -> new Vec3d(CoffeeClientMain.client.player.getVelocity().normalize().x * scaled, 0.0D, CoffeeClientMain.client.player.getVelocity().normalize().z * scaled);
case Velocity -> new Vec3d(ShadowMain.client.player.getVelocity().normalize().x * scaled, 0.0D, ShadowMain.client.player.getVelocity().normalize().z * scaled);
};
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -18,10 +18,10 @@ public class MoonGravity extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
CoffeeClientMain.client.player.addVelocity(0, 0.0568000030517578, 0);
ShadowMain.client.player.addVelocity(0, 0.0568000030517578, 0);
// yea that's literally it
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.mixin.ILivingEntityAccessor;
@ -19,10 +19,10 @@ public class NoJumpCooldown extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
((ILivingEntityAccessor) CoffeeClientMain.client.player).setJumpingCooldown(0);
((ILivingEntityAccessor) ShadowMain.client.player).setJumpingCooldown(0);
}
@Override

View file

@ -10,7 +10,7 @@ import net.minecraft.entity.EntityPose;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.Box;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.event.EventType;
@ -25,16 +25,16 @@ public class Phase extends Module {
public Phase() {
super("Phase", "Go through walls when flying (works best with creative)", ModuleType.MOVEMENT);
Events.registerEventHandler(EventType.PACKET_SEND, event -> {
if (!this.isEnabled() || CoffeeClientMain.client.player == null || !CoffeeClientMain.client.player.getAbilities().flying) {
if (!this.isEnabled() || ShadowMain.client.player == null || !ShadowMain.client.player.getAbilities().flying) {
return;
}
PacketEvent pe = (PacketEvent) event;
Box p = CoffeeClientMain.client.player.getBoundingBox(CoffeeClientMain.client.player.getPose()).offset(0, 0.27, 0).expand(0.25);
Box p = ShadowMain.client.player.getBoundingBox(ShadowMain.client.player.getPose()).offset(0, 0.27, 0).expand(0.25);
if (p.getYLength() < 2) {
p = p.expand(0, 1, 0);
}
p = p.offset(CoffeeClientMain.client.player.getPos());
if (pe.getPacket() instanceof PlayerMoveC2SPacket && !Objects.requireNonNull(CoffeeClientMain.client.world).isSpaceEmpty(CoffeeClientMain.client.player, p)) {
p = p.offset(ShadowMain.client.player.getPos());
if (pe.getPacket() instanceof PlayerMoveC2SPacket && !Objects.requireNonNull(ShadowMain.client.world).isSpaceEmpty(ShadowMain.client.player, p)) {
event.setCancelled(true);
}
});
@ -56,10 +56,10 @@ public class Phase extends Module {
@Override
public void enable() {
Objects.requireNonNull(CoffeeClientMain.client.player).setPose(EntityPose.STANDING);
CoffeeClientMain.client.player.setOnGround(false);
CoffeeClientMain.client.player.fallDistance = 0;
CoffeeClientMain.client.player.setVelocity(0, 0, 0);
Objects.requireNonNull(ShadowMain.client.player).setPose(EntityPose.STANDING);
ShadowMain.client.player.setOnGround(false);
ShadowMain.client.player.fallDistance = 0;
ShadowMain.client.player.setVelocity(0, 0, 0);
}
@Override
@ -69,15 +69,15 @@ public class Phase extends Module {
@Override
public String getContext() {
return getNoClipState(CoffeeClientMain.client.player) ? "Active" : null;
return getNoClipState(ShadowMain.client.player) ? "Active" : null;
}
@Override
public void onWorldRender(MatrixStack matrices) {
if (Objects.requireNonNull(CoffeeClientMain.client.player).getAbilities().flying) {
CoffeeClientMain.client.player.setPose(EntityPose.STANDING);
CoffeeClientMain.client.player.setOnGround(false);
CoffeeClientMain.client.player.fallDistance = 0;
if (Objects.requireNonNull(ShadowMain.client.player).getAbilities().flying) {
ShadowMain.client.player.setPose(EntityPose.STANDING);
ShadowMain.client.player.setOnGround(false);
ShadowMain.client.player.fallDistance = 0;
//SipoverPrivate.client.player.setVelocity(0,0,0);
}
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -20,10 +20,10 @@ public class Sprint extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (CoffeeClientMain.client.options.forwardKey.isPressed() && !CoffeeClientMain.client.options.backKey.isPressed() && !CoffeeClientMain.client.player.isSneaking() && !CoffeeClientMain.client.player.horizontalCollision) {
if (ShadowMain.client.options.forwardKey.isPressed() && !ShadowMain.client.options.backKey.isPressed() && !ShadowMain.client.player.isSneaking() && !ShadowMain.client.player.horizontalCollision) {
Objects.requireNonNull(client.player).setSprinting(true);
}
}

View file

@ -6,7 +6,7 @@
package net.shadow.client.feature.module.impl.movement;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
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;
@ -24,10 +24,10 @@ public class Step extends Module {
@Override
public void tick() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
CoffeeClientMain.client.player.stepHeight = (float) (height.getValue() + 0);
ShadowMain.client.player.stepHeight = (float) (height.getValue() + 0);
}
@Override
@ -37,7 +37,7 @@ public class Step extends Module {
@Override
public void disable() {
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.player == null || ShadowMain.client.getNetworkHandler() == null) {
return;
}
Objects.requireNonNull(client.player).stepHeight = 0.6f;

View file

@ -6,7 +6,7 @@ import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -27,13 +27,13 @@ public class Swing extends Module {
public Swing() {
super("Swing", "Swing around like spiderman", ModuleType.MOVEMENT);
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
if (!this.isEnabled() || CoffeeClientMain.client.currentScreen != null) {
if (!this.isEnabled() || ShadowMain.client.currentScreen != null) {
return;
}
MouseEvent me = (MouseEvent) event;
if (me.getButton() == 0 && me.getAction() == 1) {
try {
HitResult hit = Objects.requireNonNull(CoffeeClientMain.client.player).raycast(200, CoffeeClientMain.client.getTickDelta(), true);
HitResult hit = Objects.requireNonNull(ShadowMain.client.player).raycast(200, ShadowMain.client.getTickDelta(), true);
swinging = new BlockPos(hit.getPos());
} catch (Exception ignored) {
}
@ -55,10 +55,10 @@ public class Swing extends Module {
if (swinging == null) {
return;
}
Vec3d diff = Vec3d.of(swinging).add(0.5, 0.5, 0.5).subtract(Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player)).normalize().multiply(0.4).add(0, 0.03999999910593033 * 2, 0);
Vec3d diff = Vec3d.of(swinging).add(0.5, 0.5, 0.5).subtract(Utils.getInterpolatedEntityPosition(ShadowMain.client.player)).normalize().multiply(0.4).add(0, 0.03999999910593033 * 2, 0);
CoffeeClientMain.client.player.addVelocity(diff.x, diff.y, diff.z);
if (CoffeeClientMain.client.options.sneakKey.isPressed()) {
ShadowMain.client.player.addVelocity(diff.x, diff.y, diff.z);
if (ShadowMain.client.options.sneakKey.isPressed()) {
swinging = null;
}
}
@ -80,13 +80,13 @@ public class Swing extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (swinging == null || CoffeeClientMain.client.player == null) {
if (swinging == null || ShadowMain.client.player == null) {
return;
}
RenderSystem.defaultBlendFunc();
Vec3d cringe = new Vec3d(swinging.getX(), swinging.getY(), swinging.getZ());
Vec3d cringe2 = new Vec3d(swinging.getX() + 0.5, swinging.getY() + 0.5, swinging.getZ() + 0.5);
Vec3d eSource = Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player);
Vec3d eSource = Utils.getInterpolatedEntityPosition(ShadowMain.client.player);
// Renderer.R3D.renderFilled(cringe, new Vec3d(1, 1, 1), new Color(150, 150, 150, 150), matrices)
Renderer.R3D.renderFilled(cringe.add(.5, .5, .5).subtract(.25, .25, .25), new Vec3d(.5, .5, .5), ThemeManager.getMainTheme().getInactive(), matrices);
Renderer.R3D.renderLine(eSource, cringe2, line, matrices);

View file

@ -15,7 +15,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.SettingsGroup;
@ -107,7 +107,7 @@ public class CaveMapper extends Module {
for (BlockPos pos : new BlockPos[]{right, left, fw, bw, up, down}) {
boolean hadObstacle = false;
int y = pos.getY();
while (!Objects.requireNonNull(CoffeeClientMain.client.world).isOutOfHeightLimit(y)) {
while (!Objects.requireNonNull(ShadowMain.client.world).isOutOfHeightLimit(y)) {
BlockPos current = new BlockPos(pos.getX(), y, pos.getZ());
if (!bs(current).isAir()) {
hadObstacle = true;
@ -120,7 +120,7 @@ public class CaveMapper extends Module {
toScan.add(pos);
scannedBlocks.add(pos);
}
} else if (bs(pos).isFullCube(CoffeeClientMain.client.world, pos) && circ.stream().noneMatch(blockPosListEntry -> blockPosListEntry.getKey().equals(pos))) {
} else if (bs(pos).isFullCube(ShadowMain.client.world, pos) && circ.stream().noneMatch(blockPosListEntry -> blockPosListEntry.getKey().equals(pos))) {
Vec3d renderR = new Vec3d(pos.getX(), pos.getY(), pos.getZ());
Vec3d end = renderR.add(new Vec3d(1, 1, 1));
float x1 = (float) renderR.x;
@ -237,7 +237,7 @@ public class CaveMapper extends Module {
}
BlockState bs(BlockPos bp) {
return Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(bp);
return Objects.requireNonNull(ShadowMain.client.world).getBlockState(bp);
}
@Override
@ -250,7 +250,7 @@ public class CaveMapper extends Module {
toScan.clear();
ores.clear();
circ.clear();
start = Objects.requireNonNull(CoffeeClientMain.client.player).getBlockPos();
start = Objects.requireNonNull(ShadowMain.client.player).getBlockPos();
toScan.add(start);
scanned = false;
}
@ -258,9 +258,9 @@ public class CaveMapper extends Module {
@Override
public String getContext() {
return scannedBlocks.size() + "S|" + new ArrayList<>(this.ores).stream()
.filter(blockPos -> shouldRenderOre(Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(blockPos).getBlock()))
.filter(blockPos -> shouldRenderOre(Objects.requireNonNull(ShadowMain.client.world).getBlockState(blockPos).getBlock()))
.count() + "F|" + Utils.Math.roundToDecimal((double) new ArrayList<>(this.ores).stream()
.filter(blockPos -> shouldRenderOre(Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(blockPos).getBlock())).count() / scannedBlocks.size() * 100, 2) + "%D";
.filter(blockPos -> shouldRenderOre(Objects.requireNonNull(ShadowMain.client.world).getBlockState(blockPos).getBlock())).count() / scannedBlocks.size() * 100, 2) + "%D";
}
@Override
@ -277,7 +277,7 @@ public class CaveMapper extends Module {
}
List<Map.Entry<BlockPos, List<Vec3d>>> real = new ArrayList<>(circ);
Camera cam = CoffeeClientMain.client.gameRenderer.getCamera();
Camera cam = ShadowMain.client.gameRenderer.getCamera();
BufferBuilder buffer = Tessellator.getInstance().getBuffer();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
GL11.glDepthFunc(GL11.GL_ALWAYS);
@ -297,7 +297,7 @@ public class CaveMapper extends Module {
if (ores.contains(entry.getKey())) {
continue;
}
double dist = new Vec3d(entry.getKey().getX(), entry.getKey().getY(), entry.getKey().getZ()).distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos());
double dist = new Vec3d(entry.getKey().getX(), entry.getKey().getY(), entry.getKey().getZ()).distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos());
dist = (1 - MathHelper.clamp(dist, 0, 15) / 15d) * 3d;
dist = Math.round(dist);
dist /= 3;
@ -333,15 +333,15 @@ public class CaveMapper extends Module {
if (ore == null) {
continue;
}
Block t = Objects.requireNonNull(CoffeeClientMain.client.world).getBlockState(ore).getBlock();
Block t = Objects.requireNonNull(ShadowMain.client.world).getBlockState(ore).getBlock();
if (!shouldRenderOre(t)) {
continue;
}
Vec3d p = new Vec3d(ore.getX(), ore.getY(), ore.getZ());
double dist = p.distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos());
double dist = p.distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos());
dist = MathHelper.clamp(dist, 0, 30);
Renderer.R3D.renderFilled(p, new Vec3d(1, 1, 1), Renderer.Util.modify(oreColors.containsKey(t) ? oreColors.get(t) : new Color(CoffeeClientMain.client.world.getBlockState(ore)
.getMapColor(CoffeeClientMain.client.world, ore).color), -1, -1, -1, (int) ((dist / 30d) * 200)), matrices);
Renderer.R3D.renderFilled(p, new Vec3d(1, 1, 1), Renderer.Util.modify(oreColors.containsKey(t) ? oreColors.get(t) : new Color(ShadowMain.client.world.getBlockState(ore)
.getMapColor(ShadowMain.client.world, ore).color), -1, -1, -1, (int) ((dist / 30d) * 200)), matrices);
}
}

View file

@ -1,7 +1,7 @@
package net.shadow.client.feature.module.impl.render;
import net.minecraft.client.util.math.MatrixStack;
import net.shadow.client.CoffeeClientMain;
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;
@ -18,7 +18,7 @@ public class ClickGUI extends Module {
public void tick() {
t--;
if (t == 0) {
CoffeeClientMain.client.setScreen(net.shadow.client.feature.gui.clickgui.ClickGUI.instance());
ShadowMain.client.setScreen(net.shadow.client.feature.gui.clickgui.ClickGUI.instance());
setEnabled(false);
}
}

View file

@ -13,7 +13,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Matrix4f;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
@ -108,16 +108,16 @@ public class ESP extends Module {
GL11.glDepthFunc(GL11.GL_LEQUAL);
RenderSystem.disableBlend();
}
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null) {
return;
}
for (Entity entity : CoffeeClientMain.client.world.getEntities()) {
if (entity.squaredDistanceTo(CoffeeClientMain.client.player) > Math.pow(range.getValue(), 2)) {
for (Entity entity : ShadowMain.client.world.getEntities()) {
if (entity.squaredDistanceTo(ShadowMain.client.player) > Math.pow(range.getValue(), 2)) {
continue;
}
if (entity.getUuid().equals(CoffeeClientMain.client.player.getUuid())) {
if (entity.getUuid().equals(ShadowMain.client.player.getUuid())) {
continue;
}
if (shouldRenderEntity(entity)) {
@ -138,12 +138,12 @@ public class ESP extends Module {
}
void renderOutline(Entity e, Color color, MatrixStack stack) {
Vec3d eSource = new Vec3d(MathHelper.lerp(CoffeeClientMain.client.getTickDelta(), e.prevX, e.getX()), MathHelper.lerp(CoffeeClientMain.client.getTickDelta(), e.prevY, e.getY()), MathHelper.lerp(CoffeeClientMain.client.getTickDelta(), e.prevZ, e.getZ()));
Vec3d eSource = new Vec3d(MathHelper.lerp(ShadowMain.client.getTickDelta(), e.prevX, e.getX()), MathHelper.lerp(ShadowMain.client.getTickDelta(), e.prevY, e.getY()), MathHelper.lerp(ShadowMain.client.getTickDelta(), e.prevZ, e.getZ()));
float red = color.getRed() / 255f;
float green = color.getGreen() / 255f;
float blue = color.getBlue() / 255f;
float alpha = color.getAlpha() / 255f;
Camera c = CoffeeClientMain.client.gameRenderer.getCamera();
Camera c = ShadowMain.client.gameRenderer.getCamera();
Vec3d camPos = c.getPos();
Vec3d start = eSource.subtract(camPos);
float x = (float) start.x;

View file

@ -2,7 +2,7 @@ package net.shadow.client.feature.module.impl.render;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.util.Transitions;
@ -22,17 +22,17 @@ public class Fullbright extends Module {
@Override
public void enable() {
og = MathHelper.clamp(CoffeeClientMain.client.options.gamma, 0, 1);
og = MathHelper.clamp(ShadowMain.client.options.gamma, 0, 1);
}
@Override
public void disable() {
CoffeeClientMain.client.options.gamma = og;
ShadowMain.client.options.gamma = og;
}
@Override
public void onFastTick() {
CoffeeClientMain.client.options.gamma = Transitions.transition(CoffeeClientMain.client.options.gamma, 10, 300);
ShadowMain.client.options.gamma = Transitions.transition(ShadowMain.client.options.gamma, 10, 300);
}
@Override

View file

@ -5,7 +5,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.network.packet.s2c.play.WorldTimeUpdateS2CPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.gui.clickgui.theme.ThemeManager;
import net.shadow.client.feature.gui.hud.HudRenderer;
@ -114,18 +114,18 @@ public class Hud extends Module {
@Override
public void onHudRenderNoMSAA() {
if (CoffeeClientMain.client.getNetworkHandler() == null) {
if (ShadowMain.client.getNetworkHandler() == null) {
return;
}
if (CoffeeClientMain.client.player == null) {
if (ShadowMain.client.player == null) {
return;
}
MatrixStack ms = Renderer.R3D.getEmptyMatrixStack();
double heightOffsetLeft = 0, heightOffsetRight = 0;
if (CoffeeClientMain.client.options.debugEnabled) {
if (ShadowMain.client.options.debugEnabled) {
double heightAccordingToMc = 9;
List<String> lt = ((IDebugHudAccessor) ((IInGameHudAccessor) CoffeeClientMain.client.inGameHud).getDebugHud()).callGetLeftText();
List<String> rt = ((IDebugHudAccessor) ((IInGameHudAccessor) CoffeeClientMain.client.inGameHud).getDebugHud()).callGetRightText();
List<String> lt = ((IDebugHudAccessor) ((IInGameHudAccessor) ShadowMain.client.inGameHud).getDebugHud()).callGetLeftText();
List<String> rt = ((IDebugHudAccessor) ((IInGameHudAccessor) ShadowMain.client.inGameHud).getDebugHud()).callGetRightText();
heightOffsetLeft = 2 + heightAccordingToMc * (lt.size() + 3);
heightOffsetRight = 2 + heightAccordingToMc * rt.size() + 5;
}
@ -167,7 +167,7 @@ public class Hud extends Module {
double rootY = 6;
List<String> values = new ArrayList<>();
if (this.fps.getValue()) {
values.add(((IMinecraftClientAccessor) CoffeeClientMain.client).getCurrentFps() + " fps");
values.add(((IMinecraftClientAccessor) ShadowMain.client).getCurrentFps() + " fps");
}
if (this.tps.getValue()) {
@ -180,11 +180,11 @@ public class Hud extends Module {
values.add(tpsString + " tps");
}
if (this.ping.getValue()) {
PlayerListEntry ple = Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).getPlayerListEntry(Objects.requireNonNull(CoffeeClientMain.client.player).getUuid());
PlayerListEntry ple = Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).getPlayerListEntry(Objects.requireNonNull(ShadowMain.client.player).getUuid());
values.add((ple == null || ple.getLatency() == 0 ? "?" : ple.getLatency() + "") + " ms");
}
if (this.coords.getValue()) {
BlockPos bp = Objects.requireNonNull(CoffeeClientMain.client.player).getBlockPos();
BlockPos bp = Objects.requireNonNull(ShadowMain.client.player).getBlockPos();
values.add(bp.getX() + " " + bp.getY() + " " + bp.getZ());
}
String drawStr = String.join(" | ", values);
@ -202,7 +202,7 @@ public class Hud extends Module {
}
void drawModuleList(MatrixStack ms) {
double width = CoffeeClientMain.client.getWindow().getScaledWidth();
double width = ShadowMain.client.getWindow().getScaledWidth();
double y = 0;
for (ModuleEntry moduleEntry : moduleList.stream().sorted(Comparator.comparingDouble(value -> -value.getRenderWidth())).toList()) {
double prog = moduleEntry.getAnimProg() * 2;

View file

@ -2,7 +2,7 @@ package net.shadow.client.feature.module.impl.render;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleRegistry;
import net.shadow.client.feature.module.ModuleType;
@ -97,9 +97,9 @@ public class TabGui extends Module {
public void onHudRender() {
double innerPad = 5;
double heightOffsetLeft = 6 + Math.max(Hud.getTitleFr().getMarginHeight(), FontRenderers.getRenderer().getMarginHeight()) + 2 + innerPad;
if (CoffeeClientMain.client.options.debugEnabled) {
if (ShadowMain.client.options.debugEnabled) {
double heightAccordingToMc = 9;
List<String> lt = ((IDebugHudAccessor) ((IInGameHudAccessor) CoffeeClientMain.client.inGameHud).getDebugHud()).callGetLeftText();
List<String> lt = ((IDebugHudAccessor) ((IInGameHudAccessor) ShadowMain.client.inGameHud).getDebugHud()).callGetLeftText();
heightOffsetLeft += 2 + heightAccordingToMc * (lt.size() + 3);
}
MatrixStack ms = Renderer.R3D.getEmptyMatrixStack();

View file

@ -14,7 +14,7 @@ import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.MathHelper;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -52,10 +52,10 @@ public class TargetHud extends Module {
}
boolean isApplicable(Entity check) {
if (check == CoffeeClientMain.client.player) {
if (check == ShadowMain.client.player) {
return false;
}
if (check.distanceTo(CoffeeClientMain.client.player) > 64) {
if (check.distanceTo(ShadowMain.client.player) > 64) {
return false;
}
int l = check.getEntityName().length();
@ -66,7 +66,7 @@ public class TargetHud extends Module {
if (!isValidEntityName) {
return false;
}
if (check == CoffeeClientMain.client.player) {
if (check == ShadowMain.client.player) {
return false;
}
return check.getType() == EntityType.PLAYER && check instanceof PlayerEntity;
@ -78,8 +78,8 @@ public class TargetHud extends Module {
e = AttackManager.getLastAttackInTimeRange();
return;
}
List<Entity> entitiesQueue = StreamSupport.stream(Objects.requireNonNull(CoffeeClientMain.client.world).getEntities().spliterator(), false).filter(this::isApplicable)
.sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(CoffeeClientMain.client.player).getPos()))).toList();
List<Entity> entitiesQueue = StreamSupport.stream(Objects.requireNonNull(ShadowMain.client.world).getEntities().spliterator(), false).filter(this::isApplicable)
.sorted(Comparator.comparingDouble(value -> value.getPos().distanceTo(Objects.requireNonNull(ShadowMain.client.player).getPos()))).toList();
if (entitiesQueue.size() > 0) {
e = entitiesQueue.get(0);
} else {
@ -168,7 +168,7 @@ public class TargetHud extends Module {
FontRenderers.getRenderer().drawString(stack, entity.getEntityName(), textLeftAlign, yOffset, 0xFFFFFF);
yOffset += FontRenderers.getRenderer().getFontHeight();
PlayerListEntry ple = Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).getPlayerListEntry(entity.getUuid());
PlayerListEntry ple = Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).getPlayerListEntry(entity.getUuid());
if (ple != null && renderPing.getValue()) {
int ping = ple.getLatency();
String v = ping + " ms";

View file

@ -12,7 +12,7 @@ import net.minecraft.entity.mob.EndermanEntity;
import net.minecraft.entity.mob.HostileEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -49,27 +49,27 @@ public class Tracers extends Module {
@Override
public String getContext() {
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null) {
return null;
}
return StreamSupport.stream(CoffeeClientMain.client.world.getEntities().spliterator(), false)
.filter(entity -> entity.squaredDistanceTo(CoffeeClientMain.client.player) < 4096 && entity.getUuid() != CoffeeClientMain.client.player.getUuid() && isEntityApplicable(entity))
return StreamSupport.stream(ShadowMain.client.world.getEntities().spliterator(), false)
.filter(entity -> entity.squaredDistanceTo(ShadowMain.client.player) < 4096 && entity.getUuid() != ShadowMain.client.player.getUuid() && isEntityApplicable(entity))
.count() + "";
}
@Override
public void onWorldRender(MatrixStack matrices) {
if (CoffeeClientMain.client.world == null || CoffeeClientMain.client.player == null) {
if (ShadowMain.client.world == null || ShadowMain.client.player == null) {
return;
}
for (Entity entity : StreamSupport.stream(CoffeeClientMain.client.world.getEntities().spliterator(), false)
.sorted(Comparator.comparingDouble(value -> -value.distanceTo(CoffeeClientMain.client.player))).toList()) {
if (entity.squaredDistanceTo(CoffeeClientMain.client.player) > 4096) {
for (Entity entity : StreamSupport.stream(ShadowMain.client.world.getEntities().spliterator(), false)
.sorted(Comparator.comparingDouble(value -> -value.distanceTo(ShadowMain.client.player))).toList()) {
if (entity.squaredDistanceTo(ShadowMain.client.player) > 4096) {
continue;
}
double dc = entity.squaredDistanceTo(CoffeeClientMain.client.player) / 4096;
double dc = entity.squaredDistanceTo(ShadowMain.client.player) / 4096;
dc = Math.abs(1 - dc);
if (entity.getUuid().equals(CoffeeClientMain.client.player.getUuid())) {
if (entity.getUuid().equals(ShadowMain.client.player.getUuid())) {
continue;
}
Color c;

View file

@ -2,7 +2,7 @@ package net.shadow.client.feature.module.impl.render;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.render.Renderer;
@ -26,7 +26,7 @@ public class Trail extends Module {
@Override
public void onFastTick() {
positions.add(Utils.getInterpolatedEntityPosition(CoffeeClientMain.client.player));
positions.add(Utils.getInterpolatedEntityPosition(ShadowMain.client.player));
while (positions.size() > 1000) {
positions.remove(0);
}

View file

@ -14,7 +14,7 @@ import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
import net.shadow.client.helper.event.EventType;
@ -33,19 +33,19 @@ public class AnyPlacer extends Module {
if (!this.isEnabled()) {
return;
}
if (CoffeeClientMain.client.player == null || CoffeeClientMain.client.world == null) {
if (ShadowMain.client.player == null || ShadowMain.client.world == null) {
return;
}
if (CoffeeClientMain.client.currentScreen != null) {
if (ShadowMain.client.currentScreen != null) {
return;
}
// PacketEvent pe = (PacketEvent) event;
MouseEvent me = (MouseEvent) event;
if ((me.getAction() == 1 || me.getAction() == 2) && me.getButton() == 1) {
ItemStack sex = CoffeeClientMain.client.player.getMainHandStack();
ItemStack sex = ShadowMain.client.player.getMainHandStack();
if (sex.getItem() instanceof SpawnEggItem) {
event.setCancelled(true);
HitResult hr = CoffeeClientMain.client.player.raycast(500, 0, true);
HitResult hr = ShadowMain.client.player.raycast(500, 0, true);
Vec3d spawnPos = hr.getPos();
NbtCompound entityTag = sex.getOrCreateSubNbt("EntityTag");
NbtList nl = new NbtList();
@ -53,11 +53,11 @@ public class AnyPlacer extends Module {
nl.add(NbtDouble.of(spawnPos.y));
nl.add(NbtDouble.of(spawnPos.z));
entityTag.put("Pos", nl);
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), sex);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(a);
BlockHitResult bhr = new BlockHitResult(CoffeeClientMain.client.player.getPos(), Direction.DOWN, new BlockPos(CoffeeClientMain.client.player.getPos()), false);
CreativeInventoryActionC2SPacket a = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), sex);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(a);
BlockHitResult bhr = new BlockHitResult(ShadowMain.client.player.getPos(), Direction.DOWN, new BlockPos(ShadowMain.client.player.getPos()), false);
PlayerInteractBlockC2SPacket ib = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
CoffeeClientMain.client.getNetworkHandler().sendPacket(ib);
ShadowMain.client.getNetworkHandler().sendPacket(ib);
}
}
});
@ -85,7 +85,7 @@ public class AnyPlacer extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (isDebuggerEnabled()) {
HitResult hr = Objects.requireNonNull(CoffeeClientMain.client.player).raycast(500, 0, true);
HitResult hr = Objects.requireNonNull(ShadowMain.client.player).raycast(500, 0, true);
Vec3d spawnPos = hr.getPos();
Renderer.R3D.renderFilled(spawnPos.subtract(.3, 0, .3), new Vec3d(.6, 0.001, .6), Color.WHITE, matrices);
}

View file

@ -11,7 +11,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.Vec3i;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -37,10 +37,10 @@ public class AutoLavacast extends Module {
BlockPos getNextPosition() {
int y = 0;
while ((y + start.getY()) < CoffeeClientMain.client.world.getTopY()) {
while ((y + start.getY()) < ShadowMain.client.world.getTopY()) {
Vec3i ie = incr.multiply(y + 1);
BlockPos next = start.add(ie).add(0, y, 0);
if (CoffeeClientMain.client.world.getBlockState(next).getMaterial().isReplaceable()) {
if (ShadowMain.client.world.getBlockState(next).getMaterial().isReplaceable()) {
return next;
}
y++;
@ -62,29 +62,29 @@ public class AutoLavacast extends Module {
Vec3d placeCenter = Vec3d.of(next).add(.5, .5, .5);
if (mode.getValue() == Mode.Bypass) {
Rotations.lookAtPositionSmooth(placeCenter, 6);
if (((CoffeeClientMain.client.player.horizontalCollision && moveForwards) || CoffeeClientMain.client.player.getBoundingBox()
.intersects(Vec3d.of(next), Vec3d.of(next).add(1, 1, 1))) && CoffeeClientMain.client.player.isOnGround()) {
CoffeeClientMain.client.player.jump();
CoffeeClientMain.client.player.setOnGround(false);
if (((ShadowMain.client.player.horizontalCollision && moveForwards) || ShadowMain.client.player.getBoundingBox()
.intersects(Vec3d.of(next), Vec3d.of(next).add(1, 1, 1))) && ShadowMain.client.player.isOnGround()) {
ShadowMain.client.player.jump();
ShadowMain.client.player.setOnGround(false);
}
}
if (placeCenter.distanceTo(CoffeeClientMain.client.player.getCameraPosVec(1)) < CoffeeClientMain.client.interactionManager.getReachDistance()) {
if (placeCenter.distanceTo(ShadowMain.client.player.getCameraPosVec(1)) < ShadowMain.client.interactionManager.getReachDistance()) {
moveForwards = false;
ItemStack is = CoffeeClientMain.client.player.getInventory().getMainHandStack();
ItemStack is = ShadowMain.client.player.getInventory().getMainHandStack();
if (is.isEmpty()) {
return;
}
if (is.getItem() instanceof BlockItem bi) {
Block p = bi.getBlock();
if (p.getDefaultState().canPlaceAt(CoffeeClientMain.client.world, next)) {
CoffeeClientMain.client.execute(() -> {
if (p.getDefaultState().canPlaceAt(ShadowMain.client.world, next)) {
ShadowMain.client.execute(() -> {
BlockHitResult bhr = new BlockHitResult(placeCenter, Direction.DOWN, next, false);
CoffeeClientMain.client.interactionManager.interactBlock(CoffeeClientMain.client.player, CoffeeClientMain.client.world, Hand.MAIN_HAND, bhr);
ShadowMain.client.interactionManager.interactBlock(ShadowMain.client.player, ShadowMain.client.world, Hand.MAIN_HAND, bhr);
if (mode.getValue() == Mode.Fast) {
Vec3d goP = Vec3d.of(next).add(0.5, 1.05, 0.5);
CoffeeClientMain.client.player.updatePosition(goP.x, goP.y, goP.z);
ShadowMain.client.player.updatePosition(goP.x, goP.y, goP.z);
}
});
}
@ -103,18 +103,18 @@ public class AutoLavacast extends Module {
@Override
public void enable() {
if (original == null) {
original = CoffeeClientMain.client.player.input;
original = ShadowMain.client.player.input;
}
if (mode.getValue() == Mode.Bypass) {
CoffeeClientMain.client.player.input = new ListenInput();
ShadowMain.client.player.input = new ListenInput();
}
incr = CoffeeClientMain.client.player.getMovementDirection().getVector();
start = CoffeeClientMain.client.player.getBlockPos();
incr = ShadowMain.client.player.getMovementDirection().getVector();
start = ShadowMain.client.player.getBlockPos();
}
@Override
public void disable() {
CoffeeClientMain.client.player.input = original;
ShadowMain.client.player.input = original;
}
@Override

View file

@ -10,7 +10,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -32,7 +32,7 @@ public class AutoTnt extends Module {
public void tick() {
int tntSlot = -1;
for (int i = 0; i < 9; i++) {
ItemStack is = Objects.requireNonNull(CoffeeClientMain.client.player).getInventory().getStack(i);
ItemStack is = Objects.requireNonNull(ShadowMain.client.player).getInventory().getStack(i);
if (is.getItem() == Items.TNT) {
tntSlot = i;
break;
@ -48,42 +48,42 @@ public class AutoTnt extends Module {
missingTntAck = false;
}
Vec3d ppos = CoffeeClientMain.client.player.getPos();
Vec3d ppos = ShadowMain.client.player.getPos();
for (double x = -10; x < 11; x++) {
for (double z = -10; z < 11; z++) {
List<Map.Entry<BlockPos, Double>> airs = new ArrayList<>();
for (int y = Objects.requireNonNull(CoffeeClientMain.client.world).getTopY(); y > CoffeeClientMain.client.world.getBottomY(); y--) {
for (int y = Objects.requireNonNull(ShadowMain.client.world).getTopY(); y > ShadowMain.client.world.getBottomY(); y--) {
Vec3d currentOffset = new Vec3d(x, y, z);
BlockPos bp = new BlockPos(new Vec3d(ppos.x + currentOffset.x, y, ppos.z + currentOffset.z));
BlockState bs = CoffeeClientMain.client.world.getBlockState(bp);
BlockState bs = ShadowMain.client.world.getBlockState(bp);
double dist = Vec3d.of(bp).distanceTo(ppos);
if (bs.getMaterial().isReplaceable()) {
airs.add(new AbstractMap.SimpleEntry<>(bp, dist));
}
}
airs = airs.stream().filter(blockPosDoubleEntry -> CoffeeClientMain.client.world.getBlockState(blockPosDoubleEntry.getKey().down()).getMaterial().blocksMovement())
airs = airs.stream().filter(blockPosDoubleEntry -> ShadowMain.client.world.getBlockState(blockPosDoubleEntry.getKey().down()).getMaterial().blocksMovement())
.collect(Collectors.toList());
Map.Entry<BlockPos, Double> best1 = airs.stream().min(Comparator.comparingDouble(Map.Entry::getValue)).orElse(null);
if (best1 == null) {
continue; // just void here, cancel
}
BlockPos best = best1.getKey();
if (CoffeeClientMain.client.world.getBlockState(best.down()).getBlock() == Blocks.TNT) {
if (ShadowMain.client.world.getBlockState(best.down()).getBlock() == Blocks.TNT) {
continue; // already placed tnt, cancel
}
Vec3d lmao = Vec3d.of(best);
if (lmao.add(.5, .5, .5).distanceTo(CoffeeClientMain.client.player.getCameraPosVec(1)) >= 5) {
if (lmao.add(.5, .5, .5).distanceTo(ShadowMain.client.player.getCameraPosVec(1)) >= 5) {
continue;
}
if (shouldPlace(best)) {
int finalTntSlot = tntSlot;
CoffeeClientMain.client.execute(() -> {
int sel = CoffeeClientMain.client.player.getInventory().selectedSlot;
CoffeeClientMain.client.player.getInventory().selectedSlot = finalTntSlot;
ShadowMain.client.execute(() -> {
int sel = ShadowMain.client.player.getInventory().selectedSlot;
ShadowMain.client.player.getInventory().selectedSlot = finalTntSlot;
BlockHitResult bhr = new BlockHitResult(lmao, Direction.DOWN, best, false);
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).interactBlock(CoffeeClientMain.client.player, CoffeeClientMain.client.world, Hand.MAIN_HAND, bhr);
CoffeeClientMain.client.player.getInventory().selectedSlot = sel;
Objects.requireNonNull(ShadowMain.client.interactionManager).interactBlock(ShadowMain.client.player, ShadowMain.client.world, Hand.MAIN_HAND, bhr);
ShadowMain.client.player.getInventory().selectedSlot = sel;
});
}
}
@ -110,29 +110,29 @@ public class AutoTnt extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
Vec3d ppos = Objects.requireNonNull(CoffeeClientMain.client.player).getPos();
Vec3d ppos = Objects.requireNonNull(ShadowMain.client.player).getPos();
for (double x = -10; x < 11; x++) {
for (double z = -10; z < 11; z++) {
List<Map.Entry<BlockPos, Double>> airs = new ArrayList<>();
for (int y = Objects.requireNonNull(CoffeeClientMain.client.world).getTopY(); y > CoffeeClientMain.client.world.getBottomY(); y--) {
for (int y = Objects.requireNonNull(ShadowMain.client.world).getTopY(); y > ShadowMain.client.world.getBottomY(); y--) {
Vec3d currentOffset = new Vec3d(x, y, z);
BlockPos bp = new BlockPos(new Vec3d(ppos.x + currentOffset.x, y, ppos.z + currentOffset.z));
BlockState bs = CoffeeClientMain.client.world.getBlockState(bp);
BlockState bs = ShadowMain.client.world.getBlockState(bp);
double dist = Vec3d.of(bp).distanceTo(ppos);
if (bs.getMaterial().isReplaceable()) {
airs.add(new AbstractMap.SimpleEntry<>(bp, dist));
}
}
airs = airs.stream().filter(blockPosDoubleEntry -> CoffeeClientMain.client.world.getBlockState(blockPosDoubleEntry.getKey().down()).getMaterial().blocksMovement())
airs = airs.stream().filter(blockPosDoubleEntry -> ShadowMain.client.world.getBlockState(blockPosDoubleEntry.getKey().down()).getMaterial().blocksMovement())
.collect(Collectors.toList());
Map.Entry<BlockPos, Double> best1 = airs.stream().min(Comparator.comparingDouble(Map.Entry::getValue)).orElse(null);
if (best1 == null) {
continue; // just void here, cancel
}
BlockPos best = best1.getKey();
if (CoffeeClientMain.client.world.getBlockState(best.down()).getBlock() == Blocks.TNT) {
if (ShadowMain.client.world.getBlockState(best.down()).getBlock() == Blocks.TNT) {
continue; // already placed tnt, cancel
}
Vec3d lmao = Vec3d.of(best);

View file

@ -19,7 +19,7 @@ import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.config.EnumSetting;
import net.shadow.client.feature.gui.notifications.Notification;
@ -43,7 +43,7 @@ public class Boom extends Module {
public Boom() {
super("Boom", "Spawns fireballs wherever you click", ModuleType.WORLD);
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
if (!this.isEnabled() || CoffeeClientMain.client.currentScreen != null) {
if (!this.isEnabled() || ShadowMain.client.currentScreen != null) {
return;
}
MouseEvent me = (MouseEvent) event;
@ -66,7 +66,7 @@ public class Boom extends Module {
PacketEvent pe = (PacketEvent) event;
if (pe.getPacket() instanceof PlayerInteractEntityC2SPacket e) {
PlayerInteractEntityC2SPacketAccessor a = (PlayerInteractEntityC2SPacketAccessor) e;
Entity entity = Objects.requireNonNull(CoffeeClientMain.client.world).getEntityById(a.getEntityId());
Entity entity = Objects.requireNonNull(ShadowMain.client.world).getEntityById(a.getEntityId());
if (entity != null && entity.getType() == EntityType.FIREBALL && System.currentTimeMillis() - lastFired < 1000) {
event.setCancelled(true);
}
@ -75,49 +75,49 @@ public class Boom extends Module {
}
void fbInstant() {
if (!Objects.requireNonNull(CoffeeClientMain.client.interactionManager).hasCreativeInventory()) {
if (!Objects.requireNonNull(ShadowMain.client.interactionManager).hasCreativeInventory()) {
return;
}
HitResult hr = Objects.requireNonNull(CoffeeClientMain.client.player).raycast(200, 0, false);
HitResult hr = Objects.requireNonNull(ShadowMain.client.player).raycast(200, 0, false);
Vec3d n = hr.getPos();
String nbt = String.format("{EntityTag:{id:\"minecraft:fireball\",ExplosionPower:%db,Motion:[%sd,%sd,%sd],Pos:[%s,%s,%s],Item:{id:\"minecraft:egg\",Count:1b}}}", ((int) Math.floor(power.getValue())), 0, -2, 0, n.getX(), n.getY(), n.getZ());
ItemStack stack = Utils.generateItemStackWithMeta(nbt, Items.BAT_SPAWN_EGG);
ItemStack air = CoffeeClientMain.client.player.getInventory().getMainHandStack().copy();
Vec3d a = CoffeeClientMain.client.player.getEyePos();
ItemStack air = ShadowMain.client.player.getInventory().getMainHandStack().copy();
Vec3d a = ShadowMain.client.player.getEyePos();
BlockHitResult bhr = new BlockHitResult(a, Direction.DOWN, new BlockPos(a), false);
CreativeInventoryActionC2SPacket u1 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), stack);
CreativeInventoryActionC2SPacket u2 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), air);
CreativeInventoryActionC2SPacket u1 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), stack);
CreativeInventoryActionC2SPacket u2 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), air);
PlayerInteractBlockC2SPacket p1 = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(u1);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p1);
CoffeeClientMain.client.getNetworkHandler().sendPacket(u2);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(u1);
ShadowMain.client.getNetworkHandler().sendPacket(p1);
ShadowMain.client.getNetworkHandler().sendPacket(u2);
lastFired = System.currentTimeMillis();
}
void fbGhast() {
if (!Objects.requireNonNull(CoffeeClientMain.client.interactionManager).hasCreativeInventory()) {
if (!Objects.requireNonNull(ShadowMain.client.interactionManager).hasCreativeInventory()) {
return;
}
Vec3d v = Objects.requireNonNull(CoffeeClientMain.client.player).getRotationVector();
Vec3d v = Objects.requireNonNull(ShadowMain.client.player).getRotationVector();
v = v.multiply(speed.getValue() / 10d);
// ((int) Math.floor(power.getValue()))
String nbt = String.format("{EntityTag:{id:\"minecraft:fireball\",ExplosionPower:%db,power:[%s,%s,%s],Item:{id:\"minecraft:egg\",Count:1b}}}", ((int) Math.floor(power.getValue())), v.x, v.y, v.z);
ItemStack stack = Utils.generateItemStackWithMeta(nbt, Items.BAT_SPAWN_EGG);
ItemStack air = CoffeeClientMain.client.player.getInventory().getMainHandStack().copy();
Vec3d a = CoffeeClientMain.client.player.getEyePos();
ItemStack air = ShadowMain.client.player.getInventory().getMainHandStack().copy();
Vec3d a = ShadowMain.client.player.getEyePos();
BlockHitResult bhr = new BlockHitResult(a, Direction.DOWN, new BlockPos(a), false);
CreativeInventoryActionC2SPacket u1 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), stack);
CreativeInventoryActionC2SPacket u2 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(CoffeeClientMain.client.player.getInventory().selectedSlot), air);
CreativeInventoryActionC2SPacket u1 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), stack);
CreativeInventoryActionC2SPacket u2 = new CreativeInventoryActionC2SPacket(Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot), air);
PlayerInteractBlockC2SPacket p1 = new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, bhr);
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(u1);
CoffeeClientMain.client.getNetworkHandler().sendPacket(p1);
CoffeeClientMain.client.getNetworkHandler().sendPacket(u2);
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(u1);
ShadowMain.client.getNetworkHandler().sendPacket(p1);
ShadowMain.client.getNetworkHandler().sendPacket(u2);
lastFired = System.currentTimeMillis();
}
@Override
public void tick() {
if (!Objects.requireNonNull(CoffeeClientMain.client.interactionManager).hasCreativeInventory()) {
if (!Objects.requireNonNull(ShadowMain.client.interactionManager).hasCreativeInventory()) {
Notification.create(6000, "", true, Notification.Type.INFO, "You need to be in creative");
setEnabled(false);
}

View file

@ -10,7 +10,7 @@ import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.BooleanSetting;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.module.Module;
@ -52,8 +52,8 @@ public class ClickNuke extends Module {
HitResult hr = Objects.requireNonNull(client.player).raycast(200d, 0f, true);
Vec3d pos1 = hr.getPos();
BlockPos pos = new BlockPos(pos1);
int startY = MathHelper.clamp(r(pos.getY() - rangeY.getValue()), Objects.requireNonNull(CoffeeClientMain.client.world).getBottomY(), CoffeeClientMain.client.world.getTopY());
int endY = MathHelper.clamp(r(pos.getY() + rangeY.getValue()), CoffeeClientMain.client.world.getBottomY(), CoffeeClientMain.client.world.getTopY());
int startY = MathHelper.clamp(r(pos.getY() - rangeY.getValue()), Objects.requireNonNull(ShadowMain.client.world).getBottomY(), ShadowMain.client.world.getTopY());
int endY = MathHelper.clamp(r(pos.getY() + rangeY.getValue()), ShadowMain.client.world.getBottomY(), ShadowMain.client.world.getTopY());
String cmd = "/fill " + r(pos.getX() - rangeX.getValue()) + " " + startY + " " + r(pos.getZ() - rangeZ.getValue()) + " " + r(pos.getX() + rangeX.getValue()) + " " + endY + " " + r(pos.getZ() + rangeZ.getValue()) + " " + "minecraft:air" + (destroy.getValue() ? " destroy" : "");
System.out.println(cmd);
client.player.sendChatMessage(cmd);

View file

@ -11,7 +11,7 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -32,7 +32,7 @@ public class LetThereBeLight extends Module {
public void tick() {
int torchSlot = -1;
for (int i = 0; i < 9; i++) {
ItemStack is = Objects.requireNonNull(CoffeeClientMain.client.player).getInventory().getStack(i);
ItemStack is = Objects.requireNonNull(ShadowMain.client.player).getInventory().getStack(i);
if (is.getItem() == Items.TORCH || is.getItem() == Items.SOUL_TORCH) {
torchSlot = i;
break;
@ -46,16 +46,16 @@ public class LetThereBeLight extends Module {
} else {
noBlocksAck = false;
}
Vec3d ppos = CoffeeClientMain.client.player.getPos();
Vec3d camPos = CoffeeClientMain.client.player.getCameraPosVec(1);
Vec3d ppos = ShadowMain.client.player.getPos();
Vec3d camPos = ShadowMain.client.player.getCameraPosVec(1);
a:
for (int x = -3; x < 4; x++) {
for (int z = -3; z < 4; z++) {
List<Vec3d> blocksWithShit = new ArrayList<>();
for (int y = Objects.requireNonNull(CoffeeClientMain.client.world).getTopY(); y > CoffeeClientMain.client.world.getBottomY(); y--) {
for (int y = Objects.requireNonNull(ShadowMain.client.world).getTopY(); y > ShadowMain.client.world.getBottomY(); y--) {
BlockPos bp = new BlockPos(ppos).add(x, y, z);
BlockState bs = CoffeeClientMain.client.world.getBlockState(bp);
if (bs.getMaterial().isReplaceable() && Blocks.TORCH.getDefaultState().canPlaceAt(CoffeeClientMain.client.world, bp)) {
BlockState bs = ShadowMain.client.world.getBlockState(bp);
if (bs.getMaterial().isReplaceable() && Blocks.TORCH.getDefaultState().canPlaceAt(ShadowMain.client.world, bp)) {
blocksWithShit.add(Vec3d.of(bp));
}
}
@ -64,7 +64,7 @@ public class LetThereBeLight extends Module {
continue; // nowhere to place
}
BlockHitResult bhr = new BlockHitResult(real.get(), Direction.DOWN, new BlockPos(real.get()), false);
Objects.requireNonNull(CoffeeClientMain.client.interactionManager).interactBlock(CoffeeClientMain.client.player, CoffeeClientMain.client.world, Hand.MAIN_HAND, bhr);
Objects.requireNonNull(ShadowMain.client.interactionManager).interactBlock(ShadowMain.client.player, ShadowMain.client.world, Hand.MAIN_HAND, bhr);
break a;
}
}
@ -87,15 +87,15 @@ public class LetThereBeLight extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
Vec3d ppos = Objects.requireNonNull(CoffeeClientMain.client.player).getPos();
Vec3d camPos = CoffeeClientMain.client.player.getCameraPosVec(1);
Vec3d ppos = Objects.requireNonNull(ShadowMain.client.player).getPos();
Vec3d camPos = ShadowMain.client.player.getCameraPosVec(1);
for (int x = -3; x < 4; x++) {
for (int z = -3; z < 4; z++) {
List<Vec3d> blocksWithShit = new ArrayList<>();
for (int y = Objects.requireNonNull(CoffeeClientMain.client.world).getTopY(); y > CoffeeClientMain.client.world.getBottomY(); y--) {
for (int y = Objects.requireNonNull(ShadowMain.client.world).getTopY(); y > ShadowMain.client.world.getBottomY(); y--) {
BlockPos bp = new BlockPos(ppos).add(x, y, z);
BlockState bs = CoffeeClientMain.client.world.getBlockState(bp);
if (bs.getMaterial().isReplaceable() && Blocks.TORCH.getDefaultState().canPlaceAt(CoffeeClientMain.client.world, bp)) {
BlockState bs = ShadowMain.client.world.getBlockState(bp);
if (bs.getMaterial().isReplaceable() && Blocks.TORCH.getDefaultState().canPlaceAt(ShadowMain.client.world, bp)) {
blocksWithShit.add(Vec3d.of(bp));
}
}
@ -104,7 +104,7 @@ public class LetThereBeLight extends Module {
continue; // nowhere to place
}
Vec3d pos = real.get();
Renderer.R3D.renderShape(pos, Blocks.TORCH.getDefaultState().getOutlineShape(CoffeeClientMain.client.world, new BlockPos(real.get()), ShapeContext.absent()), matrices, Color.WHITE);
Renderer.R3D.renderShape(pos, Blocks.TORCH.getDefaultState().getOutlineShape(ShadowMain.client.world, new BlockPos(real.get()), ShapeContext.absent()), matrices, Color.WHITE);
// Renderer.R3D.renderOutline(real.get(),new Vec3d(1,1,1), Color.WHITE, matrices);
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.feature.module.impl.world;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.DoubleSetting;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
@ -41,9 +41,9 @@ public class Voider extends Module {
Vec3d root = startPos.add(ox, 0, oz);
BlockPos pp = new BlockPos(root);
latest = Vec3d.of(pp);
String chat = String.format("/fill %d %d %d %d %d %d minecraft:air", pp.getX() - 2, Objects.requireNonNull(CoffeeClientMain.client.world)
.getBottomY(), pp.getZ() - 2, pp.getX() + 2, CoffeeClientMain.client.world.getTopY() - 1, pp.getZ() + 2);
Objects.requireNonNull(CoffeeClientMain.client.player).sendChatMessage(chat);
String chat = String.format("/fill %d %d %d %d %d %d minecraft:air", pp.getX() - 2, Objects.requireNonNull(ShadowMain.client.world)
.getBottomY(), pp.getZ() - 2, pp.getX() + 2, ShadowMain.client.world.getTopY() - 1, pp.getZ() + 2);
Objects.requireNonNull(ShadowMain.client.player).sendChatMessage(chat);
Utils.sleep((long) (delay.getValue() + 0));
}
}
@ -52,7 +52,7 @@ public class Voider extends Module {
@Override
public void enable() {
startPos = Objects.requireNonNull(CoffeeClientMain.client.player).getPos();
startPos = Objects.requireNonNull(ShadowMain.client.player).getPos();
cancel.set(false);
runner = new Thread(this::run);
runner.start();
@ -72,9 +72,9 @@ public class Voider extends Module {
@Override
public void onWorldRender(MatrixStack matrices) {
if (latest != null) {
Renderer.R3D.renderFilled(new Vec3d(latest.x - 2, Objects.requireNonNull(CoffeeClientMain.client.world)
Renderer.R3D.renderFilled(new Vec3d(latest.x - 2, Objects.requireNonNull(ShadowMain.client.world)
.getBottomY(), latest.z - 2), new Vec3d(5, 0.001, 5), Utils.getCurrentRGB(), matrices);
Renderer.R3D.renderLine(new Vec3d(latest.x + .5, CoffeeClientMain.client.world.getBottomY(), latest.z + .5), new Vec3d(latest.x + .5, CoffeeClientMain.client.world.getTopY(), latest.z + .5), Color.RED, matrices);
Renderer.R3D.renderLine(new Vec3d(latest.x + .5, ShadowMain.client.world.getBottomY(), latest.z + .5), new Vec3d(latest.x + .5, ShadowMain.client.world.getTopY(), latest.z + .5), Color.RED, matrices);
}
}

View file

@ -12,7 +12,7 @@ import net.minecraft.block.OreBlock;
import net.minecraft.block.RedstoneOreBlock;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.registry.Registry;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -44,12 +44,12 @@ public class XRAY extends Module {
@Override
public void enable() {
CoffeeClientMain.client.worldRenderer.reload();
ShadowMain.client.worldRenderer.reload();
}
@Override
public void disable() {
CoffeeClientMain.client.worldRenderer.reload();
ShadowMain.client.worldRenderer.reload();
}
@Override

View file

@ -1,7 +1,7 @@
package net.shadow.client.helper;
import net.minecraft.client.util.InputUtil;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
public record Keybind(int keycode) {
@ -9,7 +9,7 @@ public record Keybind(int keycode) {
if (keycode < 0) {
return false;
}
boolean isActuallyPressed = InputUtil.isKeyPressed(CoffeeClientMain.client.getWindow().getHandle(), keycode);
return CoffeeClientMain.client.currentScreen == null && isActuallyPressed;
boolean isActuallyPressed = InputUtil.isKeyPressed(ShadowMain.client.getWindow().getHandle(), keycode);
return ShadowMain.client.currentScreen == null && isActuallyPressed;
}
}

View file

@ -3,7 +3,7 @@ package net.shadow.client.helper;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import java.util.Objects;
@ -11,11 +11,11 @@ public class Packets {
public static void sendServerSideLook(Vec3d target1) {
double vec = 57.2957763671875;
Vec3d target = target1.subtract(Objects.requireNonNull(CoffeeClientMain.client.player).getEyePos());
Vec3d target = target1.subtract(Objects.requireNonNull(ShadowMain.client.player).getEyePos());
double square = Math.sqrt(target.x * target.x + target.z * target.z);
float pitch = MathHelper.wrapDegrees((float) (-(MathHelper.atan2(target.y, square) * vec)));
float yaw = MathHelper.wrapDegrees((float) (MathHelper.atan2(target.z, target.x) * vec) - 90.0F);
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.LookAndOnGround(yaw, pitch, CoffeeClientMain.client.player.isOnGround());
Objects.requireNonNull(CoffeeClientMain.client.getNetworkHandler()).sendPacket(p);
PlayerMoveC2SPacket p = new PlayerMoveC2SPacket.LookAndOnGround(yaw, pitch, ShadowMain.client.player.isOnGround());
Objects.requireNonNull(ShadowMain.client.getNetworkHandler()).sendPacket(p);
}
}

View file

@ -9,7 +9,7 @@ import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec2f;
import net.minecraft.util.math.Vec3d;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.module.ModuleRegistry;
import net.shadow.client.feature.module.impl.render.FreeLook;
import net.shadow.client.helper.event.EventType;
@ -77,9 +77,9 @@ public class Rotations {
}
public static void lookAtPositionSmooth(Vec3d target, double laziness) {
double delX = target.x - Objects.requireNonNull(CoffeeClientMain.client.player).getX();
double delZ = target.z - CoffeeClientMain.client.player.getZ();
double delY = target.y - (CoffeeClientMain.client.player.getY() + CoffeeClientMain.client.player.getEyeHeight(CoffeeClientMain.client.player.getPose()));
double delX = target.x - Objects.requireNonNull(ShadowMain.client.player).getX();
double delZ = target.z - ShadowMain.client.player.getZ();
double delY = target.y - (ShadowMain.client.player.getY() + ShadowMain.client.player.getEyeHeight(ShadowMain.client.player.getPose()));
FreeLook fl = ModuleRegistry.getByClass(FreeLook.class);
double required = Math.toDegrees(Math.atan2(delZ, delX)) - 90, delta, add, speed;
@ -107,30 +107,30 @@ public class Rotations {
fl.newpitch = (fl.newpitch + (float) add);
} else {
// setting yaw
delta = MathHelper.wrapDegrees(required - CoffeeClientMain.client.player.getYaw());
delta = MathHelper.wrapDegrees(required - ShadowMain.client.player.getYaw());
speed = Math.abs(delta / laziness);
add = speed * (delta >= 0 ? 1 : -1);
if ((add >= 0 && add > delta) || (add < 0 && add < delta)) {
add = delta;
}
CoffeeClientMain.client.player.setYaw(CoffeeClientMain.client.player.getYaw() + (float) add);
ShadowMain.client.player.setYaw(ShadowMain.client.player.getYaw() + (float) add);
// setting pitch
double sqrt = sqrt1;
required = -Math.toDegrees(Math.atan2(delY, sqrt));
delta = MathHelper.wrapDegrees(required - CoffeeClientMain.client.player.getPitch());
delta = MathHelper.wrapDegrees(required - ShadowMain.client.player.getPitch());
speed = Math.abs(delta / laziness);
add = speed * (delta >= 0 ? 1 : -1);
if ((add >= 0 && add > delta) || (add < 0 && add < delta)) {
add = delta;
}
CoffeeClientMain.client.player.setPitch(CoffeeClientMain.client.player.getPitch() + (float) add);
ShadowMain.client.player.setPitch(ShadowMain.client.player.getPitch() + (float) add);
}
}
public static Vec2f getPitchYaw(Vec3d targetV3) {
return getPitchYawFromOtherEntity(Objects.requireNonNull(CoffeeClientMain.client.player).getEyePos(), targetV3);
return getPitchYawFromOtherEntity(Objects.requireNonNull(ShadowMain.client.player).getEyePos(), targetV3);
}
public static Vec2f getPitchYawFromOtherEntity(Vec3d eyePos, Vec3d targetV3) {

View file

@ -2,7 +2,7 @@ package net.shadow.client.helper.manager;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
public class AttackManager {
@ -11,11 +11,11 @@ public class AttackManager {
static LivingEntity lastAttacked;
public static LivingEntity getLastAttackInTimeRange() {
if (getLastAttack() + MAX_ATTACK_TIMEOUT < System.currentTimeMillis() || CoffeeClientMain.client.player == null || CoffeeClientMain.client.player.isDead()) {
if (getLastAttack() + MAX_ATTACK_TIMEOUT < System.currentTimeMillis() || ShadowMain.client.player == null || ShadowMain.client.player.isDead()) {
lastAttacked = null;
}
if (lastAttacked != null) {
if (lastAttacked.getPos().distanceTo(CoffeeClientMain.client.player.getPos()) > 16 || lastAttacked.isDead()) {
if (lastAttacked.getPos().distanceTo(ShadowMain.client.player.getPos()) > 16 || lastAttacked.isDead()) {
lastAttacked = null;
}
}
@ -26,7 +26,7 @@ public class AttackManager {
if (entity.getType() != EntityType.PLAYER) {
return;
}
if (entity.equals(CoffeeClientMain.client.player)) {
if (entity.equals(ShadowMain.client.player)) {
return;
}
lastAttacked = entity;

View file

@ -4,7 +4,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import net.shadow.client.CoffeeClientMain;
import net.shadow.client.ShadowMain;
import net.shadow.client.feature.config.SettingBase;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleRegistry;
@ -29,7 +29,7 @@ public class ConfigManager {
public static boolean enabled = false;
static {
CONFIG_FILE = new File(CoffeeClientMain.BASE, "config.sip");
CONFIG_FILE = new File(ShadowMain.BASE, "config.sip");
}
/**

Some files were not shown because too many files have changed in this diff Show more