Compare commits

...
3 Commits
Author SHA1 Message Date
retuci0 9b6d037b6c v3.0 2026-02-01 13:46:01 +01:00
retuci0 86594f1ca3 v2.9 2026-01-18 22:53:21 +01:00
retuci0 f074f05c51 v2.8 2026-01-17 17:12:54 +01:00
175 changed files with 4319 additions and 737 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# jenny's mod 2 100% real
mod para Minecraft Fabric 1.21.10 que añade algunas cosas QOL, mayormente relacionadas a la cámara.
mod para Minecraft Fabric 1.21.11 que añade algunas cosas QOL, mayormente relacionadas a la cámara.
## instalación
+2 -2
View File
@@ -1,6 +1,6 @@
plugins {
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
}
version = project.mod_version
+23 -10
View File
@@ -1,23 +1,36 @@
# v2.7
# v3.0
## novedades
### adiciones
- categoría de combate
- filtro por categoría de módulos en la barra de búsqueda
### adiciones
#### módulos nuevos:
- avioneta: vuela infinitamente usando el glitch de las elytras descubierto por Heppe, o al menos hasta que se te rompan las elytras
- triangulador de strongholds: usa geometría simple para calcular la intersección de las líneas creadas por los ojos de ender lanzados para obtener la posición aproximada de la stronghold más cercana
- discordrpc: personaliza la actividad de tu perfil de discord
- colocar en aire: te permite colocar bloques sin soporte alguno
- tobillos fuertes: evita el daño de caída, ya sea por medio de paquetes o amortiguándola con un cubo de agua, si este está disponible
- don quijote: te acelera para inflingir cantidades importantes de daño con la lanza
- auto herramienta: cambia automáticamente a la herramienta más veloz disponible para el bloque seleccionado
- autismo: da vueltas
- anti hambre: previene el hambre, cancelando los paquetes que le indican al server que empiezas a esprintar
- trayectoria: preve la trayectoria de los proyectiles (maomeno, aún lo tengo que ajustar un poco)
- hotkeys inv. creativo: te permite usar las teclas de la hotbar correctamente en la pestaña de búsqueda, por ejemplo, si tienes el slot 5 en la E, al posicionar el cursor sobre un stack del resultado de búsqueda, y darle a la E, en vez de escribir una E, actúa como las teclas del 1-9
- auto pesca: pesca por ti
#### comandos nuevos:
- `$plugins`: trata de buscar plugins del server al que estás conectado mediante la búsqueda de comandos no vanilla
- `$clickslot`: simula un clic en un slot específico, también se especifica el botón del ratón y la acción
- `$wait`: espera un delay determinado antes de enviar un mensaje / ejecutar un comando
- `$repeat`: repite un comando o mensaje x veces
### arreglos / mejoras
- ahora se puede hacer ctrl + v para pegar en los ajustes de texto
- el color por defecto de la superposición de daño ya es el color principal del mod
- arreglado el elemento del HUD de rotación
- arreglado los marcos de ajustes de selección
- delfín ahora funciona mejor (*ruidos de delfín*)
- barco volador ahora usa el ajuste de velocidad vertical
- escalones inversos ahora usa el ajuste de velocidad
- ahora puedes ver el tiempo restante hasta que una entidad de tnt explote
## problemas reconocidos
+3
View File
@@ -7,6 +7,9 @@ Trouser Streak: https://github.com/etianl/Trouser-Streak
No More Purple: https://github.com/Pepperoni-Jabroni/NoMorePurple/
bypass-resource-pack: https://github.com/emilyy-dev/bypass-resource-pack
elytra-recast: https://github.com/InLieuOfLuna/elytra-recast/
SpearHax: https://github.com/etianl/spearHax/
ProjectileTrajectoryPreview: https://github.com/maDU59/ProjectilesTrajectoryPreview
DupersUnited public addon: https://discord.gg/dupes | https://dupers.wtf
probablemente más pero como tengo demencia se me olvida
si quieres que te acredite o quite tu código de mi mod, mándame un mensaje en discord (username: retucio) y sin problemas :)
+1 -1
View File
@@ -8,6 +8,6 @@ loom_version=1.13-SNAPSHOT
fabric_api_version=0.140.2+1.21.11
mod_version=2.7
mod_version=3.0
maven_group=me.retucio
archives_base_name=sputnik
Vendored Regular → Executable
View File
File mode changed.
@@ -19,6 +19,7 @@ import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.client.HUD;
import me.retucio.sputnik.ui.hud.HudRenderer;
import me.retucio.sputnik.ui.screen.ClickGUI;
import me.retucio.sputnik.ui.hud.HudEditorScreen;
import me.retucio.sputnik.ui.widgets.buttons.settings.BindButton;
@@ -31,6 +32,7 @@ import me.retucio.sputnik.ui.widgets.Button;
import me.retucio.sputnik.util.*;
import me.retucio.sputnik.util.KeyUtil;
import me.retucio.sputnik.util.render.DrawUtil;
import me.retucio.sputnik.util.render.Pipelines;
import me.retucio.sputnik.util.render.RenderUtil;
import me.retucio.sputnik.util.render.Textures;
@@ -93,7 +95,7 @@ public class Sputnik implements ClientModInitializer {
Lists.init();
Textures.registerAll();
Textures.init();
CapeManager.INSTANCE = new CapeManager();
EVENT_BUS.post(new LoadCapeManagerEvent());
@@ -108,6 +110,8 @@ public class Sputnik implements ClientModInitializer {
HudEditorScreen.INSTANCE = new HudEditorScreen();
EVENT_BUS.post(new LoadClickGUIEvent());
mc.execute(HudRenderer::init);
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
EVENT_BUS.post(new ShutdownEvent());
}));
@@ -123,6 +127,7 @@ public class Sputnik implements ClientModInitializer {
}
ModuleManager.INSTANCE.getEnabledModules().forEach(Module::onTick);
mc.getWindow().setTitle(ClientSettingsFrame.guiSettings.windowTitle.getValue());
}
@@ -32,17 +32,21 @@ public class CommandManager {
public static void registerCommands() {
addCommand(new BindCommand());
addCommand(new ClickSlotCommand());
addCommand(new ConfigCommand());
addCommand(new CopyScreenshotCommand());
addCommand(new EnderChestCommand());
addCommand(new GarbageCleanerCommand());
addCommand(new PeekCommand());
addCommand(new PluginsCommand());
addCommand(new PrefixCommand());
addCommand(new PurgeCommand());
addCommand(new RepeatCommand());
addCommand(new SaveScreenshotCommand());
addCommand(new SendCommand());
addCommand(new SpectateCommand());
addCommand(new ToggleCommand());
addCommand(new WaitCommand());
commands.sort(Comparator.comparing(Command::getName));
@@ -0,0 +1,46 @@
package me.retucio.sputnik.command.args;
import com.mojang.brigadier.StringReader;
import com.mojang.brigadier.arguments.ArgumentType;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.command.CommandSource;
import net.minecraft.text.Text;
import java.util.Arrays;
import java.util.concurrent.CompletableFuture;
public class EnumArgumentType<T extends Enum<T>> implements ArgumentType<T> {
private static final DynamicCommandExceptionType NO_SUCH_TYPE = new DynamicCommandExceptionType((value) -> Text.of(" argumento inválido: " + value));
private final T[] values;
public EnumArgumentType(T defaultValue) {
this.values = defaultValue.getDeclaringClass().getEnumConstants();
}
public static <T extends Enum<T>> EnumArgumentType<T> enumArgument(T defaultValue) {
return new EnumArgumentType<>(defaultValue);
}
public static <T extends Enum<T>> T getEnum(CommandContext<?> context, String name, T defaultValue) {
return context.getArgument(name, defaultValue.getDeclaringClass());
}
public T parse(StringReader reader) throws CommandSyntaxException {
String argument = reader.readString();
return Arrays.stream(this.values)
.filter((value) -> value.toString().equals(argument))
.findFirst()
.orElseThrow(() -> NO_SUCH_TYPE.create(argument)
);
}
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) {
return CommandSource.suggestMatching(Arrays.stream(this.values).map(e -> e.toString().toLowerCase()), builder);
}
}
@@ -0,0 +1,35 @@
package me.retucio.sputnik.command.commands;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import me.retucio.sputnik.command.Command;
import me.retucio.sputnik.command.args.EnumArgumentType;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen;
import net.minecraft.command.CommandSource;
import net.minecraft.screen.slot.SlotActionType;
// https://cdn.discordapp.com/attachments/1456079799045980400/1457154232737206375/dupersunited-public-addon-1.21.11-3.1.3.jar?ex=69735be1&is=69720a61&hm=77fb6faee49762e0a812661f0d98931e89cb725db711c45722249d0efe3b91e4&
public class ClickSlotCommand extends Command {
public ClickSlotCommand() {
super("clickslot", "simula un clic a un slot");
}
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.then(argument("slot", IntegerArgumentType.integer())
.then(argument("botón", IntegerArgumentType.integer())
.then(argument("acción", EnumArgumentType.enumArgument(SlotActionType.SWAP))
.executes(context -> {
int slot = context.getArgument("slot", Integer.class), button = context.getArgument("botón", Integer.class);
SlotActionType action = context.getArgument("acción", SlotActionType.class);
Screen screen = mc.currentScreen;
int syncId = (screen instanceof GenericContainerScreen gcScreen) ? gcScreen.getScreenHandler().syncId : 0;
mc.interactionManager.clickSlot(syncId, slot, button, action, mc.player);
return SUCCESS;
})
)
)
);
}
}
@@ -0,0 +1,113 @@
package me.retucio.sputnik.command.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.tree.CommandNode;
import com.mojang.brigadier.tree.RootCommandNode;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.command.Command;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.client.network.ClientCommandSource;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.command.CommandSource;
import net.minecraft.network.packet.s2c.play.CommandTreeS2CPacket;
import java.util.HashSet;
import java.util.Set;
public class PluginsCommand extends Command {
private final Set<String> plugins = new HashSet<>();
private boolean scanning = false;
public PluginsCommand() {
super("plugins", "busca los plugins que tenga el server", "pl", "serverplugins");
Sputnik.EVENT_BUS.subscribe(this);
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
if (mc.isIntegratedServerRunning()) {
ChatUtil.error("estás en un solo jugador");
return SUCCESS;
}
if (scanning) {
ChatUtil.error("calmaaa");
return SUCCESS;
}
plugins.clear();
scanning = true;
findNamespaces();
return SUCCESS;
});
}
private void findNamespaces() {
try {
ClientPlayNetworkHandler networkHandler = mc.getNetworkHandler();
if (networkHandler == null || networkHandler.getCommandDispatcher() == null) {
return;
}
RootCommandNode<ClientCommandSource> root = networkHandler.getCommandDispatcher().getRoot();
root.getChildren().forEach(this::checkNodeForPlugins);
if (!plugins.isEmpty()) {
ChatUtil.info(plugins.size() + " namespace(s) encontrado(s) de comandos:");
plugins.stream()
.sorted()
.forEach(plugin -> ChatUtil.info(" - " + plugin));
}
displayResults();
} catch (Exception e) {
ChatUtil.error("error analizando comandos: " + e.getMessage());
}
}
private void checkNodeForPlugins(CommandNode<ClientCommandSource> node) {
String name = node.getName();
if (name.contains(":")) {
String namespace = name.split(":")[0];
if (!namespace.equalsIgnoreCase("minecraft")
&& !namespace.equalsIgnoreCase("bukkit")
&& !namespace.equalsIgnoreCase("spigot")
&& !namespace.equalsIgnoreCase("paper")) {
plugins.add(namespace);
}
}
node.getChildren().forEach(this::checkNodeForPlugins);
}
@SubscribeEvent
private void onPacketReceive(PacketEvent.Receive event) {
if (!scanning) return;
if (event.getPacket() instanceof CommandTreeS2CPacket) {
findNamespaces();
}
}
private void displayResults() {
if (!plugins.isEmpty()) {
ChatUtil.info(plugins.size() + " plugin(s) encontrado(s)");
plugins.stream().sorted()
.forEach(plugin -> ChatUtil.info(" - " + plugin));
} else {
ChatUtil.warn("sin plugins (probablemente)");
}
scanning = false;
}
}
@@ -0,0 +1,32 @@
package me.retucio.sputnik.command.commands;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import me.retucio.sputnik.command.Command;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.command.CommandSource;
public class RepeatCommand extends Command {
public RepeatCommand() {
super("repetir", "repite un comando x veces", "repeat");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder
.then(argument("veces", IntegerArgumentType.integer(1))
.then(argument("comando", StringArgumentType.greedyString())
.executes(ctx -> {
int j = ctx.getArgument("veces", Integer.class);
String command = ctx.getArgument("comando", String.class);
for (int i = 0; i < j; i++) {
ChatUtil.simulateChatMessage(command);
}
return SUCCESS;
})
)
);
}
}
@@ -4,7 +4,7 @@ import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import me.retucio.sputnik.command.Command;
import me.retucio.sputnik.command.args.EntityArgumentType;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.KeyEvent;
import me.retucio.sputnik.event.events.input.KeyEvent;
import me.retucio.sputnik.util.EntityUtil;
import net.minecraft.command.CommandSource;
import net.minecraft.entity.Entity;
@@ -0,0 +1,40 @@
package me.retucio.sputnik.command.commands;
import com.mojang.brigadier.arguments.IntegerArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.sputnik.command.Command;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.ui.widgets.frames.settings.ClientSettingsFrame;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.command.CommandSource;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class WaitCommand extends Command {
private static final ScheduledExecutorService DELAYED_EXECUTOR = new ScheduledThreadPoolExecutor(2);
public WaitCommand() {
super("wait", "espera un tiempo determinado antes de ejecutar otro comando", "esperar", "sleep", "delay");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder
.then(argument("delay", IntegerArgumentType.integer(0))
.then(argument("comando", StringArgumentType.greedyString())
.executes(ctx -> {
int delay = ctx.getArgument("delay", Integer.class);
String command = ctx.getArgument("comando", String.class);
DELAYED_EXECUTOR.schedule(() -> ChatUtil.simulateChatMessage(command), delay, TimeUnit.MILLISECONDS);
return SUCCESS;
})
)
);
}
}
@@ -343,7 +343,7 @@ public class ConfigManager {
}
private static String getSettingKey(Setting<?> setting) {
return setting.getSg().getModule().getName() + ":" + setting.getName();
return setting.getSg().getModule().getName() + ":" + setting.getTrueName();
}
public static boolean hasLoaded() {
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.input;
import me.retucio.sputnik.module.modules.misc.ChatPlus;
import net.minecraft.text.ClickEvent;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.input;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.input;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.input;
import me.retucio.sputnik.event.Event;
@@ -0,0 +1,24 @@
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
public class AttackBlockEvent extends Event {
private final BlockPos pos;
private final Direction dir;
public AttackBlockEvent(BlockPos pos, Direction dir) {
this.pos = pos;
this.dir = dir;
}
public BlockPos getPos() {
return pos;
}
public Direction getDir() {
return dir;
}
}
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity;
@@ -0,0 +1,43 @@
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;
public class BlockShapeEvent extends Event {
private BlockState state;
private BlockPos pos;
private VoxelShape shape;
public BlockShapeEvent(BlockState state, BlockPos pos, VoxelShape shape) {
this.state = state;
this.pos = pos;
this.setShape(shape);
}
public BlockState getState() {
return state;
}
public void setState(BlockState state) {
this.state = state;
}
public BlockPos getPos() {
return pos;
}
public void setPos(BlockPos pos) {
this.pos = pos;
}
public VoxelShape getShape() {
return shape;
}
public void setShape(VoxelShape shape) {
this.shape = shape;
}
}
@@ -0,0 +1,28 @@
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.vehicle.AbstractBoatEntity;
import net.minecraft.util.math.Vec3d;
public class BoatMoveEvent extends Event {
private final AbstractBoatEntity boat;
private Vec3d pos;
public BoatMoveEvent(AbstractBoatEntity boat, Vec3d pos) {
this.boat = boat;
this.pos = pos;
}
public AbstractBoatEntity getBoat() {
return boat;
}
public Vec3d getPos() {
return pos;
}
public void setPos(Vec3d pos) {
this.pos = pos;
}
}
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.util.math.BlockPos;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.item.ItemStack;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.screen.Screen;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.util.Hand;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.item.ItemStack;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.network.ServerInfo;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.world.ClientWorld;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import me.retucio.sputnik.event.Stage;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.hud.MessageIndicator;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.network;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.option.Perspective;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.DrawContext;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.render.Camera;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.util.math.MatrixStack;
@@ -0,0 +1,30 @@
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
public class RenderBlockOutlineEvent extends Event {
private int color;
private float lineWidth;
public RenderBlockOutlineEvent(int color, float lineWidth) {
this.color = color;
this.lineWidth = lineWidth;
}
public int getColor() {
return color;
}
public void setColor(int color) {
this.color = color;
}
public float getLineWidth() {
return lineWidth;
}
public void setLineWidth(float lineWidth) {
this.lineWidth = lineWidth;
}
}
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.hud.ClientBossBar;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events;
package me.retucio.sputnik.event.events.render;
import me.retucio.sputnik.event.Event;
import net.minecraft.client.util.math.MatrixStack;
@@ -0,0 +1,31 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.movement.BoatFly;
import net.minecraft.entity.MovementType;
import net.minecraft.entity.vehicle.AbstractBoatEntity;
import net.minecraft.util.math.Vec3d;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(AbstractBoatEntity.class)
public abstract class AbstractBoatEntityMixin {
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/AbstractBoatEntity;move(Lnet/minecraft/entity/MovementType;Lnet/minecraft/util/math/Vec3d;)V"))
private void onMove(AbstractBoatEntity instance, MovementType movementType, Vec3d vec3d) {
BoatMoveEvent event = Sputnik.EVENT_BUS.post(new BoatMoveEvent(instance, vec3d));
if(!event.isCancelled()) instance.move(movementType, event.getPos());
}
@Inject(method = "updatePaddles", at = @At("HEAD"), cancellable = true)
private void onPaddle(CallbackInfo ci) {
if (ModuleManager.INSTANCE.getModuleByClass(BoatFly.class).isEnabled()) {
ci.cancel();
}
}
}
@@ -0,0 +1,33 @@
package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.interact.BlockShapeEvent;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockCollisionSpliterator;
import net.minecraft.world.CollisionView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import static me.retucio.sputnik.Sputnik.mc;
@Mixin(BlockCollisionSpliterator.class)
public abstract class BlockCollisionSpliteratorMixin {
@WrapOperation(method = "computeNext", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/ShapeContext;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/CollisionView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;"))
private VoxelShape onGetBlockShape(ShapeContext instance, BlockState state, CollisionView collisionView, BlockPos pos, Operation<VoxelShape> original) {
VoxelShape shape = original.call(instance, state, collisionView, pos);
if (collisionView != mc.world) {
return shape;
}
BlockShapeEvent event = Sputnik.EVENT_BUS.post(new BlockShapeEvent(state, pos, shape));
return event.isCancelled() ? VoxelShapes.empty() : event.getShape();
}
}
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import me.retucio.sputnik.event.events.RenderBossbarEvent;
import me.retucio.sputnik.event.events.render.RenderBossbarEvent;
import net.minecraft.client.gui.hud.BossBarHud;
import net.minecraft.client.gui.hud.ClientBossBar;
import net.minecraft.text.Text;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import me.retucio.sputnik.event.events.ReceiveMessageEvent;
import me.retucio.sputnik.event.events.network.ReceiveMessageEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.misc.ChatPlus;
import me.retucio.sputnik.util.interfaces.IChatHud;
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.ChunkOcclusionEvent;
import me.retucio.sputnik.event.events.network.ChunkOcclusionEvent;
import net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder;
import net.minecraft.util.math.BlockPos;
import org.spongepowered.asm.mixin.Mixin;
@@ -3,8 +3,8 @@ package me.retucio.sputnik.mixin;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import me.retucio.sputnik.event.Stage;
import me.retucio.sputnik.event.events.DisconnectEvent;
import me.retucio.sputnik.event.events.PacketEvent;
import me.retucio.sputnik.event.events.network.DisconnectEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.DisconnectionInfo;
import net.minecraft.network.packet.Packet;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.event.events.SendMessageEvent;
import me.retucio.sputnik.event.events.network.SendMessageEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.render.NoRender;
import me.retucio.sputnik.util.ChatUtil;
@@ -1,12 +1,10 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.AttackEntityEvent;
import me.retucio.sputnik.event.events.BreakBlockEvent;
import me.retucio.sputnik.event.events.InteractEntityEvent;
import me.retucio.sputnik.event.events.PlaceBlockEvent;
import me.retucio.sputnik.event.events.interact.*;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.player.FastUse;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.ClientPlayerEntity;
@@ -18,6 +16,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
@@ -29,6 +28,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import static me.retucio.sputnik.Sputnik.EVENT_BUS;
import static me.retucio.sputnik.Sputnik.mc;
@Mixin(ClientPlayerInteractionManager.class)
public abstract class ClientPlayerInteractionManagerMixin {
@@ -38,12 +38,15 @@ public abstract class ClientPlayerInteractionManagerMixin {
@Unique
Freecam freecam;
@Unique
FastUse fastUse;
@Inject(method = "<init>", at = @At("TAIL"))
private void getModules(MinecraftClient client, ClientPlayNetworkHandler networkHandler, CallbackInfo ci) {
freecam = ModuleManager.INSTANCE.getModuleByClass(Freecam.class);
fastUse = ModuleManager.INSTANCE.getModuleByClass(FastUse.class);
}
@Inject(method = "breakBlock", at = @At("HEAD"), cancellable = true)
private void onBlockBreak(BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
BreakBlockEvent event = EVENT_BUS.post(new BreakBlockEvent(pos));
@@ -57,6 +60,12 @@ public abstract class ClientPlayerInteractionManagerMixin {
if (event.isCancelled()) cir.cancel();
}
@Inject(method = "attackBlock", at = @At("HEAD"), cancellable = true)
private void onAttackBlock(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> cir) {
AttackBlockEvent event = EVENT_BUS.post(new AttackBlockEvent(pos, direction));
if (event.isCancelled()) cir.cancel();
}
@Inject(method = "interactEntity", at = @At("HEAD"), cancellable = true)
private void onEntityInteract(PlayerEntity player, Entity entity, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
if (mc.player != player) return;
@@ -72,10 +81,8 @@ public abstract class ClientPlayerInteractionManagerMixin {
}
@Inject(method = "updateBlockBreakingProgress", at = @At(value = "FIELD", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;blockBreakingCooldown:I"))
@Inject(method = "updateBlockBreakingProgress", at = @At("HEAD"))
private void modifyBlockBreakingCooldown(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> cir) {
FastUse fastUse = ModuleManager.INSTANCE.getModuleByClass(FastUse.class);
if (!fastUse.isEnabled() || !fastUse.mining.getValue()) return;
blockBreakingCooldown = fastUse.miningCooldown.getIntValue();
}
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.AddEntityEvent;
import me.retucio.sputnik.event.events.RemoveEntityEvent;
import me.retucio.sputnik.event.events.network.AddEntityEvent;
import me.retucio.sputnik.event.events.network.RemoveEntityEvent;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity;
import org.jetbrains.annotations.Nullable;
@@ -0,0 +1,28 @@
package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import me.retucio.sputnik.mixin.accessor.KeyBindingAccessor;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.misc.CreativeInventoryHotbarKeybinds;
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
import net.minecraft.client.input.KeyInput;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import java.util.Arrays;
import static me.retucio.sputnik.Sputnik.mc;
@Mixin(CreativeInventoryScreen.class)
public abstract class CreativeInventoryScreenMixin {
@ModifyExpressionValue(method = "keyPressed", at = @At(value = "INVOKE", target = "Ljava/util/OptionalInt;isPresent()Z"))
private boolean makeHotkeysWork(boolean original, @Local(argsOnly = true) KeyInput input) {
if (ModuleManager.INSTANCE.getModuleByClass(CreativeInventoryHotbarKeybinds.class).isEnabled())
return Arrays.stream(mc.options.hotbarKeys).anyMatch(
keyBinding -> ((KeyBindingAccessor) keyBinding).getBoundKey().getCode() == input.getKeycode()
);
return original;
}
}
@@ -1,17 +1,19 @@
package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.sputnik.event.events.ChangeRotationEvent;
import me.retucio.sputnik.event.events.render.ChangeRotationEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.camera.Freelook;
import me.retucio.sputnik.module.modules.camera.Rotations;
import me.retucio.sputnik.module.modules.misc.AntiInvis;
import me.retucio.sputnik.module.modules.movement.BoatFly;
import me.retucio.sputnik.module.modules.render.Nametags;
import net.minecraft.entity.*;
import net.minecraft.entity.passive.TameableEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.PersistentProjectileEntity;
import net.minecraft.entity.vehicle.AbstractBoatEntity;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.world.World;
@@ -98,6 +100,15 @@ public abstract class EntityMixin {
return original;
}
@ModifyReturnValue(method = "getName", at = @At("RETURN"))
private Text showTntPrimeTime(Text original) {
if (!nametags.isEnabled() || !nametags.tntPrime.getValue()) return original;
if ((Object) this instanceof TntEntity tnt) {
return Text.of(nametags.getTntPrimeTime(tnt));
}
return original;
}
@SuppressWarnings("ConstantConditions")
@ModifyReturnValue(method = "getCustomName", at = @At("RETURN"))
private Text displayEntityOwner(Text original) {
@@ -146,7 +157,16 @@ public abstract class EntityMixin {
// otros
@Inject(method = "isInvisibleTo", at = @At("RETURN"), cancellable = true)
public void renderInvisPlayers(PlayerEntity player, CallbackInfoReturnable<Boolean> cir) {
private void renderInvisPlayers(PlayerEntity player, CallbackInfoReturnable<Boolean> cir) {
if (ModuleManager.INSTANCE.getModuleByClass(AntiInvis.class).isEnabled()) cir.setReturnValue(false);
}
@SuppressWarnings("ConstantConditions")
@Inject(method = "getStepHeight", at = @At("RETURN"), cancellable = true)
private void modifyBoatStepHeight(CallbackInfoReturnable<Float> cir) {
BoatFly boatFly = ModuleManager.INSTANCE.getModuleByClass(BoatFly.class);
if (((Object) this) instanceof AbstractBoatEntity && boatFly.isEnabled()) {
cir.setReturnValue(boatFly.stepHeight.getFloatValue());
}
}
}
@@ -30,8 +30,9 @@ public abstract class FontManagerMixin {
if (id.equals(StyleSpriteSource.Font.DEFAULT.id())) {
cir.setReturnValue(getStorageInternal(
Identifier.of(
Sputnik.MOD_ID,
fonts.font.getValue())
Sputnik.MOD_ID,
fonts.getFont()
)
));
}
}
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.PerspectiveChangeEvent;
import me.retucio.sputnik.event.events.render.PerspectiveChangeEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam;
import net.minecraft.client.option.GameOptions;
@@ -1,9 +1,10 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.GetFOVEvent;
import me.retucio.sputnik.event.events.render.GetFOVEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.misc.UnfocusedCpu;
import me.retucio.sputnik.module.modules.render.NoRender;
import me.retucio.sputnik.module.modules.camera.Zoom;
import me.retucio.sputnik.util.interfaces.IVec3d;
@@ -11,6 +12,7 @@ import me.retucio.sputnik.util.interfaces.IVec3d;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.BufferBuilderStorage;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.render.RenderTickCounter;
import net.minecraft.client.render.block.BlockRenderManager;
import net.minecraft.client.render.item.HeldItemRenderer;
import net.minecraft.entity.Entity;
@@ -29,6 +31,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import static me.retucio.sputnik.Sputnik.EVENT_BUS;
import static me.retucio.sputnik.Sputnik.mc;
@Mixin(GameRenderer.class)
@@ -64,6 +67,12 @@ public abstract class GameRendererMixin {
return EVENT_BUS.post(new GetFOVEvent(original)).getFov();
}
@Inject(method = "render", at = @At("HEAD"), cancellable = true)
private void avoidRenderingUnfocusedCpu(RenderTickCounter tickCounter, boolean tick, CallbackInfo ci) {
if (ModuleManager.INSTANCE.getModuleByClass(UnfocusedCpu.class).isEnabled() && !mc.isWindowFocused())
ci.cancel();
}
@Inject(method = "updateCrosshairTarget", at = @At("HEAD"), cancellable = true)
private void updateTargetedEntityInvoke(float tickDelta, CallbackInfo ci) {
if ((freecam.isEnabled()) && client.getCameraEntity() != null && !freecamDone) {
@@ -1,8 +1,8 @@
package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.sputnik.event.events.RenderHeldItemEvent;
import me.retucio.sputnik.event.events.RenderArmEvent;
import me.retucio.sputnik.event.events.render.RenderHeldItemEvent;
import me.retucio.sputnik.event.events.render.RenderArmEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.player.HandView;
import net.minecraft.client.MinecraftClient;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.Render2DEvent;
import me.retucio.sputnik.event.events.render.Render2DEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.misc.ChatPlus;
import me.retucio.sputnik.module.modules.camera.Freecam;
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.DamageItemEvent;
import me.retucio.sputnik.event.events.interact.DamageItemEvent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.KeyEvent;
import me.retucio.sputnik.event.events.input.KeyEvent;
import net.minecraft.client.Keyboard;
import net.minecraft.client.input.KeyInput;
import org.spongepowered.asm.mixin.Mixin;
@@ -1,8 +1,8 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.player.ElytraBounce;
import me.retucio.sputnik.module.modules.player.Step;
import me.retucio.sputnik.module.modules.movement.ElytraBounce;
import me.retucio.sputnik.module.modules.movement.Step;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.sound.SoundCategory;
@@ -2,11 +2,11 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.sugar.Local;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.JoinWorldEvent;
import me.retucio.sputnik.event.events.OpenScreenEvent;
import me.retucio.sputnik.event.events.network.JoinWorldEvent;
import me.retucio.sputnik.event.events.interact.OpenScreenEvent;
import me.retucio.sputnik.event.events.ShutdownEvent;
import me.retucio.sputnik.event.events.TickEvent;
import me.retucio.sputnik.event.events.UseItemEvent;
import me.retucio.sputnik.event.events.interact.UseItemEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.player.FastUse;
import net.minecraft.client.MinecraftClient;
@@ -14,7 +14,6 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.MouseClickEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent;
import me.retucio.sputnik.event.events.input.MouseClickEvent;
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import net.minecraft.client.Mouse;
import net.minecraft.client.input.MouseInput;
import org.spongepowered.asm.mixin.Mixin;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.ClipAtLedgeEvent;
import me.retucio.sputnik.event.events.interact.ClipAtLedgeEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.render.Nametags;
import net.minecraft.entity.EntityType;
@@ -3,7 +3,7 @@ package me.retucio.sputnik.mixin;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.config.ConfigManager;
import me.retucio.sputnik.event.events.ClientClickEvent;
import me.retucio.sputnik.event.events.input.ClientClickEvent;
import me.retucio.sputnik.ui.widgets.frames.settings.ClientSettingsFrame;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
@@ -0,0 +1,17 @@
package me.retucio.sputnik.mixin;
import me.retucio.sputnik.util.render.Pipelines;
import net.minecraft.client.gl.ShaderLoader;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ShaderLoader.class)
public abstract class ShaderLoaderMixin {
@Inject(method = "apply(Lnet/minecraft/client/gl/ShaderLoader$Definitions;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)V", at = @At("TAIL"))
private void onReload(CallbackInfo ci) {
Pipelines.init();
}
}
@@ -0,0 +1,39 @@
package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.movement.TridentBoost;
import net.minecraft.item.Item;
import net.minecraft.item.TridentItem;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
@Mixin(TridentItem.class)
public abstract class TridentItemMixin {
@ModifyArgs(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;addVelocity(DDD)V"))
private void modifyVelocity(Args args) {
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
if (!tridentBoost.isEnabled()) return;
args.set(0, (double) args.get(0) * tridentBoost.multiplier.getValue());
args.set(1, (double) args.get(1) * tridentBoost.multiplier.getValue());
args.set(2, (double) args.get(2) * tridentBoost.multiplier.getValue());
}
@ModifyExpressionValue(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isTouchingWaterOrRain()Z"))
private boolean allowUseOutOfWaterPre(boolean original) {
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
return (tridentBoost.outOfWater.getValue() && tridentBoost.isEnabled()) || original;
}
@ModifyExpressionValue(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isTouchingWaterOrRain()Z"))
private boolean allowUseOutOfWaterPost(boolean original) {
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
return (tridentBoost.outOfWater.getValue() && tridentBoost.isEnabled()) || original;
}
}
@@ -3,9 +3,9 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.buffers.GpuBufferSlice;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.Render3DEvent;
import me.retucio.sputnik.event.events.render.Render3DEvent;
import me.retucio.sputnik.event.events.render.RenderBlockOutlineEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.render.BlockOutline;
import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.render.NoRender;
import net.minecraft.client.render.*;
@@ -20,6 +20,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
import static me.retucio.sputnik.Sputnik.EVENT_BUS;
import static me.retucio.sputnik.Sputnik.mc;
@@ -62,18 +63,29 @@ public abstract class WorldRendererMixin {
if (!noRender.blindnessEffect.getValue() || !noRender.darknessEffect.getValue()) cir.setReturnValue(null);
}
@ModifyArg(method = "renderTargetBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"))
private int modifyBlockOutlineColor(int original) {
BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class);
if (!outline.isEnabled()) return original;
return outline.color.getRGB();
@ModifyArgs(method = "renderTargetBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"))
private void modifyBlockOutline(Args args) {
// SIX SEVEN!!! (me pegan en casa)
RenderBlockOutlineEvent event = EVENT_BUS.post(new RenderBlockOutlineEvent(args.get(6), args.get(7)));
if (event.getColor() != (int) args.get(6))
args.set(6, event.getColor());
if (event.getLineWidth() != (float) args.get(7))
args.set(7, event.getLineWidth());
}
@ModifyArg(method = "renderTargetBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"))
private float modifyBlockOutlineLineWidth(float original) {
BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class);
if (!outline.isEnabled()) return original;
return outline.lineWidth.getFloatValue();
}
// @ModifyArg(method = "renderTargetBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"))
// private int modifyBlockOutlineColor(int original) {
// RenderBlockOutlineEvent event = EVENT_BUS.post(new RenderBlockOutlineEvent(original, ))
//
// BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class);
// if (!outline.isEnabled()) return original;
// return outline.color.getRGB();
// }
//
// @ModifyArg(method = "renderTargetBlockOutline", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/WorldRenderer;drawBlockOutline(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;DDDLnet/minecraft/client/render/state/OutlineRenderState;IF)V"))
// private float modifyBlockOutlineLineWidth(float original) {
// BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class);
// if (!outline.isEnabled()) return original;
// return outline.lineWidth.getFloatValue();
// }
}
@@ -0,0 +1,13 @@
package me.retucio.sputnik.mixin.accessor;
import net.minecraft.block.AbstractBlock;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(AbstractBlock.class)
public interface AbstractBlockAccessor {
@Mutable @Accessor("slipperiness")
void setSlipperiness(float slipperiness);
}
@@ -0,0 +1,15 @@
package me.retucio.sputnik.mixin.accessor;
import net.minecraft.entity.projectile.FishingBobberEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(FishingBobberEntity.class)
public interface FishingBobberEntityAccessor {
@Accessor("caughtFish")
boolean caughtFish();
@Accessor("state")
FishingBobberEntity.State getState();
}
@@ -2,7 +2,10 @@ package me.retucio.sputnik.module;
public enum Category {
COMBAT("combate"),
PLAYER("jugador"),
MOVEMENT("movimiento"),
WORLD("mundo"),
CAMERA("cámara"),
@@ -5,7 +5,12 @@ import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.module.modules.client.DiscordRPC;
import me.retucio.sputnik.module.modules.client.HUD;
import me.retucio.sputnik.module.modules.camera.*;
import me.retucio.sputnik.module.modules.combat.AttributeSwapper;
import me.retucio.sputnik.module.modules.combat.MaceKill;
import me.retucio.sputnik.module.modules.combat.ProjectileTrajectories;
import me.retucio.sputnik.module.modules.combat.SpearKill;
import me.retucio.sputnik.module.modules.misc.*;
import me.retucio.sputnik.module.modules.movement.*;
import me.retucio.sputnik.module.modules.network.*;
import me.retucio.sputnik.module.modules.player.*;
import me.retucio.sputnik.module.modules.render.*;
@@ -30,60 +35,16 @@ public class ModuleManager {
addModules();
}
// por orden alfabético y todo, flipas
private void addModules() {
modules.add(new AntiInvis());
modules.add(new AnvilFont());
modules.add(new AttributeSwapper());
modules.add(new AutoSign());
modules.add(new BlockESP());
modules.add(new BlockOutline());
modules.add(new BossbarStack());
modules.add(new BreakingProgress());
modules.add(new BungeecordSpoofer());
modules.add(new Capes());
modules.add(new ChatPlus());
modules.add(new ColoredSigns());
modules.add(new CritsPlus());
modules.add(new DamageOverlay());
modules.add(new DiscordRPC());
modules.add(new ElytraBounce());
modules.add(new FakePlayer());
modules.add(new FastUse());
modules.add(new Fonts());
modules.add(new Freecam());
modules.add(new Freelook());
modules.add(new Fullbright());
modules.add(new GlintPlus());
modules.add(new HandView());
modules.add(new Headhitters());
modules.add(new HUD());
modules.add(new InfiniteElytra());
modules.add(new InventoryPlus());
modules.add(new LightOverlay());
modules.add(new LogoutSpots());
modules.add(new Nametags());
modules.add(new NoMiningInterruptions());
modules.add(new NoRender());
modules.add(new Offhand());
modules.add(new PacketDelay());
modules.add(new Particles());
modules.add(new PerspectivePlus());
modules.add(new PortalGUI());
modules.add(new Racist());
modules.add(new Reconnect());
modules.add(new ReverseStep());
modules.add(new Rotations());
modules.add(new RPackBypass());
modules.add(new SafeWalk());
modules.add(new ScreenshotPlus());
modules.add(new ShulkerPeek());
modules.add(new Step());
modules.add(new StrongholdTriangulator());
modules.add(new TimeChanger());
modules.add(new UIMove());
modules.add(new WarnLowDurability());
modules.add(new Zoom());
// añadir los módulos
addCamera();
addClient();
addMisc();
addMovement();
addNetwork();
addPlayer();
addRender();
addWorld();
modules.sort(Comparator.comparing(module -> MiscUtil.removeAccentMarks(module.getName().toLowerCase())));
@@ -98,6 +59,110 @@ public class ModuleManager {
}
}
private void add(Module module) {
modules.add(module);
}
private void addCamera() {
add(new Autism());
add(new Freecam());
add(new Freelook());
add(new Fullbright());
add(new PerspectivePlus());
add(new Rotations());
add(new Zoom());
}
private void addClient() {
add(new DiscordRPC());
add(new HUD());
}
private void addMisc() {
add(new AntiInvis());
add(new AnvilFont());
add(new BossbarStack());
add(new ChatPlus());
add(new CreativeInventoryHotbarKeybinds());
add(new FakePlayer());
add(new ScreenshotPlus());
add(new ShulkerPeek());
add(new UnfocusedCpu());
}
private void addMovement() {
add(new BoatFly());
add(new Dolphin());
add(new ElytraBounce());
add(new ElytraFly());
add(new Headhitters());
add(new InfiniteElytra());
add(new Jesus());
add(new ReverseStep());
add(new SafeWalk());
add(new Slippy());
add(new Step());
add(new TridentBoost());
}
private void addNetwork() {
add(new BungeecordSpoofer());
add(new LogoutSpots());
add(new PacketDelay());
add(new PacketMine());
add(new Reconnect());
add(new RPackBypass());
}
private void addPlayer() {
add(new AirPlace());
add(new AntiHunger());
add(new AttributeSwapper());
add(new AutoFish());
add(new Capes());
add(new FastUse());
add(new HandView());
add(new InventoryPlus());
add(new MaceKill());
add(new NoFall());
add(new Offhand());
add(new PortalGUI());
add(new UIMove());
add(new SpearKill());
add(new WarnLowDurability());
}
private void addRender() {
add(new BlockESP());
add(new BlockOutline());
add(new BreakingProgress());
add(new CritsPlus());
add(new DamageOverlay());
add(new Fonts());
add(new GlintPlus());
add(new Nametags());
add(new NoRender());
add(new Particles());
}
private void addWorld() {
add(new AutoSign());
add(new AutoTool());
add(new BlockInfo());
add(new ColoredSigns());
add(new LightOverlay());
add(new NoMiningInterruptions());
add(new ProjectileTrajectories());
add(new Racist());
add(new StrongholdTriangulator());
add(new TimeChanger());
}
// para obtener módulos más fácilmente (por nombre, clase, o la lista completa)
public List<Module> getModules() {
@@ -0,0 +1,67 @@
package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.EnumSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
public class Autism extends Module {
private final NumberSetting interval = sgGeneral.add(new NumberSetting(
"intervalo",
"intervalo de rotación",
18,
1,
90,
1
));
private final EnumSetting<RotationDirection> direction = sgGeneral.add(new EnumSetting<>(
"dirección",
"dirección de la rotación",
RotationDirection.class,
RotationDirection.CLOCKWISE
));
private float yaw;
public Autism() {
super("autismo", "jeje", Category.CAMERA);
}
@Override
public void onTick() {
if (mc.player == null || mc.getNetworkHandler() == null) return;
if (direction.is(RotationDirection.CLOCKWISE))
yaw += interval.getFloatValue();
if (direction.is(RotationDirection.COUNTERCLOCKWISE))
yaw -= interval.getFloatValue();
mc.getNetworkHandler().sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(
yaw,
mc.player.getPitch(),
mc.player.isOnGround(),
mc.player.horizontalCollision
));
}
@SubscribeEvent
private void onPacketSend(PacketEvent.Send event) {
if (event.getPacket() instanceof PlayerMoveC2SPacket.LookAndOnGround packet
&& packet.getYaw(yaw) != yaw) event.cancel();
}
private enum RotationDirection {
CLOCKWISE("sentido horario"),
COUNTERCLOCKWISE("sentido antihorario");
private final String name;
RotationDirection(String name) { this.name = name; }
@Override public String toString() { return name; }
}
}
@@ -2,7 +2,13 @@ package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.Stage;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.*;
import me.retucio.sputnik.event.events.input.KeyEvent;
import me.retucio.sputnik.event.events.input.MouseClickEvent;
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import me.retucio.sputnik.event.events.interact.*;
import me.retucio.sputnik.event.events.network.ChunkOcclusionEvent;
import me.retucio.sputnik.event.events.network.DisconnectEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
@@ -42,22 +48,22 @@ import org.lwjgl.glfw.GLFW;
public class Freecam extends Module {
// ajustes
SettingGroup sgSpeed = addSg(new SettingGroup("velocidad", true));
private final SettingGroup sgSpeed = addSg(new SettingGroup("velocidad", true));
public BooleanSetting toggleOnDamage = sgGeneral.add(new BooleanSetting("desactivar al recibir daño", "desactiva el módulo tras recibir daño", true));
public BooleanSetting reloadChunks = sgGeneral.add(new BooleanSetting("recargar chunks", "recargar chunks para arreglar el culling de las cuevas", true));
public BooleanSetting renderHands = sgGeneral.add(new BooleanSetting("manos visibles", "decide si se renderizan las manos mientras la cámara esté libre", true));
public BooleanSetting stayCrouching = sgGeneral.add(new BooleanSetting("mantenerse agachado", "mantener al jugador agachado tras entrar en el modo de cámara libre", false));
public BooleanSetting staticView = sgGeneral.add(new BooleanSetting("visión estática", "desactiva ajustes que muevan la cámara", true));
public BooleanSetting cancelActionPackets = sgGeneral.add(new BooleanSetting("cancelar paquetes", "evita flaggear el anticheat al interactuar con bloques / entidades", true));
public BooleanSetting blockOutlines = sgGeneral.add(new BooleanSetting("contorno de bloques", "mostrar el contorno de los bloques estando en el modo de cámara libre", true));
private final BooleanSetting toggleOnDamage = sgGeneral.add(new BooleanSetting("desactivar al recibir daño", "desactiva el módulo tras recibir daño", true));
private final BooleanSetting reloadChunks = sgGeneral.add(new BooleanSetting("recargar chunks", "recargar chunks para arreglar el culling de las cuevas", true));
public final BooleanSetting renderHands = sgGeneral.add(new BooleanSetting("manos visibles", "decide si se renderizan las manos mientras la cámara esté libre", true));
public final BooleanSetting stayCrouching = sgGeneral.add(new BooleanSetting("mantenerse agachado", "mantener al jugador agachado tras entrar en el modo de cámara libre", false));
private final BooleanSetting staticView = sgGeneral.add(new BooleanSetting("visión estática", "desactiva ajustes que muevan la cámara", true));
private final BooleanSetting cancelActionPackets = sgGeneral.add(new BooleanSetting("cancelar paquetes", "evita flaggear el anticheat al interactuar con bloques / entidades", true));
public final BooleanSetting blockOutlines = sgGeneral.add(new BooleanSetting("contorno de bloques", "mostrar el contorno de los bloques estando en el modo de cámara libre", true));
public NumberSetting speedSetting = sgSpeed.add(new NumberSetting(
private final NumberSetting speedSetting = sgSpeed.add(new NumberSetting(
"velocidad", "velocidad de movimiento de la cámara",
1, 0, 10, 0.2));
public KeySetting scrollKey = sgSpeed.add(new KeySetting("tecla del scroll", "tecla a mantener pulsada para cambiar velocidad con el scroll", GLFW.GLFW_KEY_LEFT_CONTROL));
public NumberSetting scrollSens = sgSpeed.add(new NumberSetting(
private final KeySetting scrollKey = sgSpeed.add(new KeySetting("tecla del scroll", "tecla a mantener pulsada para cambiar velocidad con el scroll", GLFW.GLFW_KEY_LEFT_CONTROL));
private final NumberSetting scrollSens = sgSpeed.add(new NumberSetting(
"sensibilidad del scroll", "sensibilidad de la rueda del ratón para modificar la velocidad, 0 para desactivar",
1, 0, 2, 0.1));
@@ -198,7 +204,7 @@ public class Freecam extends Module {
}
@SubscribeEvent
public void onSendPacket(PacketEvent.Send event) {
private void onSendPacket(PacketEvent.Send event) {
if (!isEnabled() || !cancelActionPackets.getValue()) return;
if (event.getStage() != Stage.PRE) return;
@@ -212,7 +218,7 @@ public class Freecam extends Module {
}
@SubscribeEvent
public void onKey(KeyEvent event) {
private void onKey(KeyEvent event) {
if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
if (mc.currentScreen != null) return;
@@ -245,7 +251,7 @@ public class Freecam extends Module {
}
@SubscribeEvent
public void onMouseClick(MouseClickEvent event) { // por si el restrasado del usuario usa el ratón para moverse
private void onMouseClick(MouseClickEvent event) { // por si el restrasado del usuario usa el ratón para moverse
if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
if (mc.currentScreen != null) return;
@@ -279,7 +285,7 @@ public class Freecam extends Module {
@SubscribeEvent
private void onMouseScroll(MouseScrollEvent event) {
if (scrollSens.getValue() > 0 && mc.currentScreen == null && KeyUtil.isKeyDown(scrollKey.getValue())) {
if (scrollSens.getValue() > 0 && mc.currentScreen == null && scrollKey.isDown()) {
speed += event.getVertical() / 4 * (scrollSens.getValue() * speed);
if (speed < 0.1) speed = 0.1;
event.cancel();
@@ -292,12 +298,12 @@ public class Freecam extends Module {
}
@SubscribeEvent
public void onLeaveGame(DisconnectEvent event) {
private void onLeaveGame(DisconnectEvent event) {
toggle();
}
@SubscribeEvent
public void onPacketReceive(PacketEvent.Receive event) {
private void onPacketReceive(PacketEvent.Receive event) {
if (mc.player == null) return; // el jugador probablemente nunca sea nulo bajo estas circunstancias pero quién sabe
if (event.getPacket() instanceof DeathMessageS2CPacket packet) {
@@ -312,7 +318,7 @@ public class Freecam extends Module {
}
@SubscribeEvent
public void onOpenScreen(OpenScreenEvent event) {
private void onOpenScreen(OpenScreenEvent event) {
unpress();
stopMoving();
prevPos.set(pos);
@@ -323,22 +329,22 @@ public class Freecam extends Module {
// los paquetes ya se cancelan, pero visualmente estos eventos se siguen dando
@SubscribeEvent
public void onBreakBlock(BreakBlockEvent event) {
private void onBreakBlock(BreakBlockEvent event) {
if (cancelActionPackets.getValue()) event.cancel();
}
@SubscribeEvent
public void onPlaceBlock(PlaceBlockEvent event) {
private void onPlaceBlock(PlaceBlockEvent event) {
if (cancelActionPackets.getValue()) event.cancel();
}
@SubscribeEvent
public void onInteractEntity(InteractEntityEvent event) {
private void onInteractEntity(InteractEntityEvent event) {
if (cancelActionPackets.getValue()) event.cancel();
}
@SubscribeEvent
public void onAttack(AttackEntityEvent event) {
private void onAttack(AttackEntityEvent event) {
if (cancelActionPackets.getValue()) event.cancel();
}
@@ -16,13 +16,13 @@ import org.lwjgl.glfw.GLFW;
public class Freelook extends Module {
public EnumSetting<CameraMode> mode = sgGeneral.add(new EnumSetting<>("cámara a mover", "elige cual cámara mover con el ratón y cuál se queda estática",
public final EnumSetting<CameraMode> mode = sgGeneral.add(new EnumSetting<>("cámara a mover", "elige cual cámara mover con el ratón y cuál se queda estática",
CameraMode.class, CameraMode.CAMERA));
public NumberSetting arrowSens = sgGeneral.add(new NumberSetting("sensibilidad de las flechas", "cuánto rotan la cámara estática las flechas (0 para desactivar)",
private final NumberSetting arrowSens = sgGeneral.add(new NumberSetting("sensibilidad de las flechas", "cuánto rotan la cámara estática las flechas (0 para desactivar)",
4, 0, 10, 0.1));
public NumberSetting mouseSens = sgGeneral.add(new NumberSetting("sensibilidad del ratón", ".",
public final NumberSetting mouseSens = sgGeneral.add(new NumberSetting("sensibilidad del ratón", ".",
0.1, 0, 2, 0.05));
private float yaw;
@@ -18,20 +18,20 @@ import java.awt.*;
public class Fullbright extends Module {
public EnumSetting<Modes> mode = sgGeneral.add(new EnumSetting<>("modo", "qué modo de iluminación emplear (usar poción con shaders)", Modes.class, Modes.GAMMA));
public final EnumSetting<Modes> mode = sgGeneral.add(new EnumSetting<>("modo", "qué modo de iluminación emplear (usar poción con shaders)", Modes.class, Modes.GAMMA));
public ColorSetting color = sgGeneral.add(new ColorSetting("filtro", "filtro de color", new Color(255, 255, 255, 255), false));
public final ColorSetting color = sgGeneral.add(new ColorSetting("filtro", "filtro de color", new Color(255, 255, 255, 255), false));
public Fullbright() {
super("brilli brilli",
"deshabilita la oscuridad (y aplica colores a los shaders)",
Category.CAMERA,
GLFW.GLFW_KEY_K);
mode.onUpdate(mode -> { if (mode != Modes.POTION) disableNightVision(); });
mode.onUpdate(mode -> {
boolean v = mode.equals(Modes.GAMMA);
color.setVisible(v);
if (v) disableNightVision();
});
}
@@ -1,36 +1,34 @@
package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent;
import me.retucio.sputnik.event.events.PerspectiveChangeEvent;
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import me.retucio.sputnik.event.events.render.PerspectiveChangeEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.KeySetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.KeyUtil;
import org.lwjgl.glfw.GLFW;
// continúa en CameraMixin
public class PerspectivePlus extends Module {
// ajustes
private final SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
public BooleanSetting clip = sgGeneral.add(new BooleanSetting(
public final BooleanSetting clip = sgGeneral.add(new BooleanSetting(
"clip", "atravesar bloques con la cámara", true));
public NumberSetting defaultDistance = sgGeneral.add(new NumberSetting(
private final NumberSetting defaultDistance = sgGeneral.add(new NumberSetting(
"distancia", "distancia a la que está la cámara del jugador por defecto",
4, 1, 20, 0.2));
public NumberSetting scrollSens = sgScroll.add(new NumberSetting(
private final NumberSetting scrollSens = sgScroll.add(new NumberSetting(
"sensibilidad del scroll", "sensibilidad de la rueda del ratón (0 para desactivar)",
1, 0, 8, 0.1));
public KeySetting scrollKey = sgScroll.add(new KeySetting("tecla del scroll", "qué tecla mantener para usar la rueda del ratón",
private final KeySetting scrollKey = sgScroll.add(new KeySetting("tecla del scroll", "qué tecla mantener para usar la rueda del ratón",
GLFW.GLFW_KEY_LEFT_ALT));
private double distance;
@@ -48,16 +46,16 @@ public class PerspectivePlus extends Module {
}
@SubscribeEvent
public void onPerspectiveChange(PerspectiveChangeEvent event) {
private void onPerspectiveChange(PerspectiveChangeEvent event) {
distance = defaultDistance.getValue();
}
@SubscribeEvent
public void onMouseScroll(MouseScrollEvent event) {
private void onMouseScroll(MouseScrollEvent event) {
if (mc.options.getPerspective() == net.minecraft.client.option.Perspective.FIRST_PERSON
|| mc.currentScreen != null || scrollSens.getValue() <= 0) return;
if (KeyUtil.isKeyDown(scrollKey.getValue())) {
if (scrollKey.isDown()) {
distance -= event.getVertical() / 4 * (scrollSens.getValue() * distance);
event.cancel();
}
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.ChangeRotationEvent;
import me.retucio.sputnik.event.events.render.ChangeRotationEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
@@ -10,11 +10,11 @@ import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
public class Rotations extends Module {
public NumberSetting yaw = sgGeneral.add(new NumberSetting("guiñada", "eje vertical - giro horizontal (yaw)", 0, -180, 180, 1));
public NumberSetting pitch = sgGeneral.add(new NumberSetting("cabeceo", "eje horizontal - giro vertical (pitch)", 0, -90, 90, 1));
private final NumberSetting yaw = sgGeneral.add(new NumberSetting("guiñada", "eje vertical - giro horizontal (yaw)", 0, -180, 180, 1));
private final NumberSetting pitch = sgGeneral.add(new NumberSetting("cabeceo", "eje horizontal - giro vertical (pitch)", 0, -90, 90, 1));
public BooleanSetting smooth = sgGeneral.add(new BooleanSetting("evitar movimiento", "cancela todo movimiento de la cámara", false));
public BooleanSetting serverSide = sgGeneral.add(new BooleanSetting("serverside", "espamea paquetes de rotación al servidor", false));
private final BooleanSetting smooth = sgGeneral.add(new BooleanSetting("evitar movimiento", "cancela todo movimiento de la cámara", false));
private final BooleanSetting serverSide = sgGeneral.add(new BooleanSetting("serverside", "espamea paquetes de rotación al servidor", false));
public Rotations() {
super("rotaciones",
@@ -30,15 +30,21 @@ public class Rotations extends Module {
mc.player.setPitch(pitch.getFloatValue());
if (serverSide.getValue())
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(
yaw.getFloatValue(), pitch.getFloatValue(), mc.player.isOnGround(), mc.player.horizontalCollision));
mc.player.networkHandler.sendPacket(
new PlayerMoveC2SPacket.LookAndOnGround(
yaw.getFloatValue(),
pitch.getFloatValue(),
mc.player.isOnGround(),
mc.player.horizontalCollision
)
);
}
@SubscribeEvent
public void onChangeRotation(ChangeRotationEvent event) {
private void onChangeRotation(ChangeRotationEvent event) {
if (smooth.getValue()
&& (event.getYaw() != yaw.getFloatValue() || event.getPitch() != pitch.getFloatValue())){
event.cancel();
}}
}
}
}
@@ -1,38 +1,37 @@
package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.GetFOVEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent;
import me.retucio.sputnik.event.events.render.GetFOVEvent;
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.KeySetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.KeyUtil;
import org.lwjgl.glfw.GLFW;
// continúa en GameRendererMixin
public class Zoom extends Module {
SettingGroup sgVisual = addSg(new SettingGroup("visual", true));
SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
SettingGroup sgCam = addSg(new SettingGroup("cámara", true));
private final SettingGroup sgVisual = addSg(new SettingGroup("visual", true));
private final SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
private final SettingGroup sgCam = addSg(new SettingGroup("cámara", true));
public NumberSetting defaultZoom = sgGeneral.add(new NumberSetting("zoom", "cantidad de zoom",
private final NumberSetting defaultZoom = sgGeneral.add(new NumberSetting("zoom", "cantidad de zoom",
6, 1, 10, 0.1));
public BooleanSetting showHands = sgVisual.add(new BooleanSetting("mostrar manos", "esconde o muestra las manos al hacer zoom", true));
public BooleanSetting showHUD = sgVisual.add(new BooleanSetting("mostrar HUD", "esconde o muestra los indicadores en pantalla", true));
public final BooleanSetting showHands = sgVisual.add(new BooleanSetting("mostrar manos", "esconde o muestra las manos al hacer zoom", true));
private final BooleanSetting showHUD = sgVisual.add(new BooleanSetting("mostrar HUD", "esconde o muestra los indicadores en pantalla", true));
public NumberSetting scrollSens = sgScroll.add(new NumberSetting("sensibilidad del scroll", "sensibilidad de la rueda del ratón (0 para desactivar)",
private final NumberSetting scrollSens = sgScroll.add(new NumberSetting("sensibilidad del scroll", "sensibilidad de la rueda del ratón (0 para desactivar)",
0.4, 0, 8, 0.1));
public KeySetting scrollKey = sgScroll.add(new KeySetting("tecla del scroll", "qué tecla mantener para usar la rueda del ratón",
private final KeySetting scrollKey = sgScroll.add(new KeySetting("tecla del scroll", "qué tecla mantener para usar la rueda del ratón",
GLFW.GLFW_KEY_LEFT_CONTROL));
public NumberSetting mouseSensMultiplier = sgCam.add(new NumberSetting("sensibilidad", "multiplicador de la sensibilidad del ratón",
private final NumberSetting mouseSensMultiplier = sgCam.add(new NumberSetting("sensibilidad", "multiplicador de la sensibilidad del ratón",
0.4, 0, 1, 0.05));
public BooleanSetting smoothCam = sgCam.add(new BooleanSetting("cámara cinemática", "usa la cámara cinemática mientras hagas zoom", false));
private final BooleanSetting smoothCam = sgCam.add(new BooleanSetting("cámara cinemática", "usa la cámara cinemática mientras hagas zoom", false));
private boolean prevSmoothCam;
private double prevMouseSens;
@@ -90,7 +89,7 @@ public class Zoom extends Module {
@SubscribeEvent
private void onMouseScroll(MouseScrollEvent event) {
boolean key = scrollKey.getValue() == GLFW.GLFW_KEY_UNKNOWN || KeyUtil.isKeyDown(scrollKey.getValue());
boolean key = scrollKey.getValue() == GLFW.GLFW_KEY_UNKNOWN || scrollKey.isDown();
if (isEnabled() && scrollSens.getValue() > 0 && key) {
value += event.getVertical() * 0.25 * (scrollSens.getValue() * value);
if (value < 1) value = 1;
@@ -19,36 +19,36 @@ import me.retucio.sputnik.util.ChatUtil;
public class DiscordRPC extends Module {
SettingGroup sgImage = addSg(new SettingGroup("imágenes", false));
SettingGroup sgButton = addSg(new SettingGroup("botón", false));
private final SettingGroup sgImage = addSg(new SettingGroup("imágenes", false));
private final SettingGroup sgButton = addSg(new SettingGroup("botón", false));
// general
public StringSetting details = sgGeneral.add(new StringSetting(
private final StringSetting details = sgGeneral.add(new StringSetting(
"detalles", "título",
"usando el mod de putas de retucio",
40
));
public StringSetting state = sgGeneral.add(new StringSetting(
private final StringSetting state = sgGeneral.add(new StringSetting(
"estado", "subtítulo",
"(se lo está pasando en grande)",
40
));
public StringSetting startTimestamp = sgGeneral.add(new StringSetting(
"sello de tiempo", "sello de tiempo del comienzo de la actividad, siguiendo el unix epoch (. para ahora)",
".",
private final StringSetting startTimestamp = sgGeneral.add(new StringSetting(
"sello de tiempo", "sello de tiempo del comienzo de la actividad, siguiendo el unix epoch (dejar vacío para ahora)",
"",
20
));
public EnumSetting<ActivityTypes> activityType = sgGeneral.add(new EnumSetting<>(
private final EnumSetting<ActivityTypes> activityType = sgGeneral.add(new EnumSetting<>(
"tipo de actividad", "qué tipo de actividad se está llevando a cabo",
ActivityTypes.class, ActivityTypes.PLAYING
));
public StringSetting appId = sgGeneral.add(new StringSetting(
private final StringSetting appId = sgGeneral.add(new StringSetting(
"id del bot", "id del bot a usar (obtener de discord.dev)",
"1314254766150258729", 20
));
@@ -56,25 +56,25 @@ public class DiscordRPC extends Module {
// imágenes
public StringSetting largeImageKey = sgImage.add(new StringSetting(
private final StringSetting largeImageKey = sgImage.add(new StringSetting(
"imagen grande", "clave de la imagen grande",
"pengiun",
40
));
public StringSetting largeImageText = sgImage.add(new StringSetting(
private final StringSetting largeImageText = sgImage.add(new StringSetting(
"texto de la imagen grande", "texto mostrado junto a la imagen grande",
"pengüino",
40
));
public StringSetting smallImageKey = sgImage.add(new StringSetting(
private final StringSetting smallImageKey = sgImage.add(new StringSetting(
"imagen pequeña", "clave de la imagen pequeña",
"pengiun",
40
));
public StringSetting smallImageText = sgImage.add(new StringSetting(
private final StringSetting smallImageText = sgImage.add(new StringSetting(
"texto de la imagen pequeña", "texto mostrado junto a la imagen pequeña",
"pengüino",
40
@@ -83,13 +83,13 @@ public class DiscordRPC extends Module {
// botón
public StringSetting buttonText = sgButton.add(new StringSetting(
private final StringSetting buttonText = sgButton.add(new StringSetting(
"texto del botón", "texto a mostrar en el botón",
"hola",
20
));
public StringSetting buttonUrl = sgButton.add(new StringSetting(
private final StringSetting buttonUrl = sgButton.add(new StringSetting(
"url del botón", "rickroll en gran 26 :wilted_rose:",
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
20
@@ -124,6 +124,8 @@ public class DiscordRPC extends Module {
"personaliza la actividad de tu perfil en dishkor",
Category.CLIENT);
rpc.setDebugMode(false);
for (Setting<?> s : getSettings()) {
s.onUpdate(v -> update());
}
@@ -190,7 +192,7 @@ public class DiscordRPC extends Module {
}
}
public void reload() {
private void reload() {
if (initialized && isEnabled()) {
rpc.shutdown();
try {
@@ -202,20 +204,22 @@ public class DiscordRPC extends Module {
}
private long getTimestamp() {
long timestamp = System.currentTimeMillis();
if (!startTimestamp.getValue().equals(".")) {
long timestamp;
if (startTimestamp.getValue().trim().isEmpty()) {
timestamp = System.currentTimeMillis();
} else {
try {
timestamp = Long.parseLong(startTimestamp.getValue());
} catch (NumberFormatException e) {
ChatUtil.error("introduce un NÚMERO (o .)");
ChatUtil.error("introduce un NÚMERO (o déjalo vacío)");
timestamp = System.currentTimeMillis();
}
}
return timestamp / 1000;
}
public enum ActivityTypes {
private enum ActivityTypes {
PLAYING("jugando"),
STREAMING("streameando"),
LISTENING("escuchando"),
@@ -1,5 +1,6 @@
package me.retucio.sputnik.module.modules.client;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.TickEvent;
@@ -23,30 +24,86 @@ import java.awt.*;
// módulo no visible solo para los ajustes de la interfaz (y del cliente en general)
public class GUI extends Module {
SettingGroup sgWidgets = addSg(new SettingGroup("widgets", true));
SettingGroup sgUi = addSg(new SettingGroup("interfaz", true));
SettingGroup sgChat = addSg(new SettingGroup("chat", true));
SettingGroup sgMisc = addSg(new SettingGroup("misc.", true));
private final SettingGroup sgWidgets = addSg(new SettingGroup("widgets", true));
private final SettingGroup sgUi = addSg(new SettingGroup("interfaz", true));
private final SettingGroup sgChat = addSg(new SettingGroup("chat", true));
private final SettingGroup sgMisc = addSg(new SettingGroup("misc.", true));
public ColorSetting color = sgGeneral.add(new ColorSetting("color", "color principal de la interfaz y el mod",
new Color(70, 20, 210, 230), false));
public final ColorSetting color = sgGeneral.add(new ColorSetting(
"color",
"color principal de la interfaz y el mod",
new Color(70, 20, 210, 230),
false
));
// números negativos para deslizamiento inverso, 0 para desactivar
public NumberSetting scrollSens = sgWidgets.add(new NumberSetting("sensibilidad del scroll", "qué tan sensible es la interfaz a la rueda del ratón",
5, -15, 15, 0.5));
public BooleanSetting scrollBar = sgWidgets.add(new BooleanSetting("barra de desplazamiento", "renderizar una barra de desplazamiento a la derecha de la interfaz", true));
public final NumberSetting scrollSens = sgWidgets.add(new NumberSetting(
"sensibilidad del scroll",
"qué tan sensible es la interfaz a la rueda del ratón",
5,
-15,
15,
0.5
));
public BooleanSetting searchBar = sgWidgets.add(new BooleanSetting("barra de búsqueda", "renderizar una barra de búsqueda que filtra resultados en todos los marcos abiertos", true));
public BooleanSetting matchCase = sgWidgets.add(new BooleanSetting("distinguir mayúsculas", "la búsqueda es sensible a mayúsculas y minúsculas", false));
public final BooleanSetting scrollBar = sgWidgets.add(new BooleanSetting(
"barra de desplazamiento",
"renderizar una barra de desplazamiento a la derecha de la interfaz",
true
));
public final BooleanSetting searchBar = sgWidgets.add(new BooleanSetting(
"barra de búsqueda",
"renderizar una barra de búsqueda que filtra resultados en todos los marcos abiertos",
true
));
public final BooleanSetting matchCase = sgWidgets.add(new BooleanSetting(
"distinguir mayúsculas",
"la búsqueda es sensible a mayúsculas y minúsculas",
false
));
// ^^^ no sé de qué sirve porque está todo en minúsculas pero bueno
public BooleanSetting blur = sgUi.add(new BooleanSetting("desenfoque", "desenfocar el fondo mientras la interfaz está abierta", true));
public StringSetting watermark = sgUi.add(new StringSetting("marca de agua", "marca de agua para interfaces (dejar vacío para desactivar)", me.retucio.sputnik.Sputnik.getVersionName(), 40));
public final BooleanSetting blur = sgUi.add(new BooleanSetting(
"desenfoque",
"desenfocar el fondo mientras la interfaz está abierta",
true
));
public StringSetting commandPrefix = sgChat.add(new StringSetting("prefijo", "prefijo de los comandos", "$", 10));
public StringSetting chatName = sgChat.add(new StringSetting("nombre", "qué nombre usar en notificaciones por el chat", "smegma", 20));
public final StringSetting watermark = sgUi.add(new StringSetting(
"marca de agua",
"marca de agua para interfaces (dejar vacío para desactivar)",
Sputnik.getVersionName(),
40
));
public BooleanSetting multipleKeybinds = sgMisc.add(new BooleanSetting("teclas multimódulo", "permitir asignar la misma tecla a más de un módulo", false));
public final StringSetting commandPrefix = sgChat.add(new StringSetting(
"prefijo",
"prefijo de los comandos",
"$",
10
));
public final StringSetting chatName = sgChat.add(new StringSetting(
"nombre",
"qué nombre usar en notificaciones por el chat",
"smegma",
20
));
public final BooleanSetting multipleKeybinds = sgMisc.add(new BooleanSetting(
"teclas multimódulo",
"permitir asignar la misma tecla a más de un módulo o acción",
false
));
public final StringSetting windowTitle = sgMisc.add(new StringSetting(
"título",
"título de la ventana",
Sputnik.getVersionName(),
50
));
public GUI() {
super("interfaz",
@@ -20,26 +20,97 @@ import java.awt.*;
public class HUD extends Module {
SettingGroup sgEditor = addSg(new SettingGroup("editor", true));
SettingGroup sgDisplay = addSg(new SettingGroup("visualización", true));
SettingGroup sgElements = addSg(new SettingGroup("elementos", false));
private final SettingGroup sgEditor = addSg(new SettingGroup("editor", true));
private final SettingGroup sgDisplay = addSg(new SettingGroup("visualización", true));
private final SettingGroup sgElements = addSg(new SettingGroup("elementos", false));
// editor
public KeySetting editorKey = sgEditor.add(new KeySetting("tecla del editor", "tecla asignada al editor de elementos del hud", GLFW.GLFW_KEY_PAGE_UP));
public KeySetting editorKey = sgEditor.add(new KeySetting(
"tecla del editor",
"tecla asignada al editor de elementos del hud",
GLFW.GLFW_KEY_PAGE_UP
));
public BooleanSetting axialMovement = sgEditor.add(new BooleanSetting(
"movimiento axial",
"te permite mover los elementos sobre los ejes más fácilmente",
true
));
public NumberSetting axisOffset = sgEditor.add(new NumberSetting(
"offset de los ejes",
"offset a tener en cuenta al usar el movimiento axial",
10,
0,
50,
1
));
public BooleanSetting arrowMovement = sgEditor.add(new BooleanSetting(
"movimiento con flechas",
"te permite mover el elemento seleccionado con las teclas de las flechas",
true
));
public NumberSetting arrowOffset = sgEditor.add(new NumberSetting(
"cuánto mover con las flechas",
"cuántos píxeles mover el elemento seleccionado al usar las flechas",
2,
1,
20,
1
));
// ajustes
public ColorSetting color = sgDisplay.add(new ColorSetting("color", "color del texto de los elementos del HUD",
new Color(255, 255, 255, 255), false));
public BooleanSetting shadow = sgDisplay.add(new BooleanSetting("sombra", "texto con sombra", true));
public BooleanSetting showOnF3 = sgDisplay.add(new BooleanSetting("mostrar en F3", "renderizar HUD en el menú de debug", false));
public BooleanSetting showOnChat = sgDisplay.add(new BooleanSetting("mostrar en chat", "renderizar HUD en la pantalla del chat", false));
// renderizado
public ColorSetting color = sgDisplay.add(new ColorSetting(
"color",
"color del texto de los elementos del HUD",
new Color(255, 255, 255, 255), false)
);
public BooleanSetting shadow = sgDisplay.add(new BooleanSetting(
"sombra",
"texto con sombra",
true
));
public BooleanSetting showOnF3 = sgDisplay.add(new BooleanSetting(
"mostrar en F3",
"renderizar HUD en el menú de debug",
false
));
public BooleanSetting showOnChat = sgDisplay.add(new BooleanSetting(
"mostrar en chat",
"renderizar HUD en la pantalla del chat",
false
));
public NumberSetting timezone = sgElements.add(new NumberSetting("zona horaria", "zona horaria en UTC+n", 1, -6, 6, 1));
public EnumSetting<TimeFormat> timeFormat = sgElements.add(new EnumSetting<>("formato de la hora", "12h o 24h", TimeFormat.class, TimeFormat.TWENTY_FOUR_HOUR));
public StringSetting customText = sgElements.add(new StringSetting("texto custom", "marca de agua (dejar vacío para quitar)", "adolf jitler inshtagram feishbuc twiter", 40));
public EnumSetting<CoordsMode> coordsMode = sgElements.add(new EnumSetting<>("modo de coordenadas", "qué coordenadas mostrar", CoordsMode.class, CoordsMode.OVERWORLD));
public EnumSetting<Dynosaurs> dyno = sgElements.add(new EnumSetting<>("dinosaurio", "qué dinosaurio mostrar",
Dynosaurs.class, Dynosaurs.SPINOSAURUS));
// elementos
public NumberSetting timezone = sgElements.add(new NumberSetting(
"zona horaria",
"zona horaria en UTC+n",
1,
-6,
6,
1
));
public EnumSetting<TimeFormat> timeFormat = sgElements.add(new EnumSetting<>(
"formato de la hora",
"12h o 24h",
TimeFormat.class,
TimeFormat.TWENTY_FOUR_HOUR
));
public StringSetting customText = sgElements.add(new StringSetting(
"texto custom",
"marca de agua (dejar vacío para quitar)",
"adolf jitler inshtagram feishbuc twiter",
40
));
public EnumSetting<CoordsMode> coordsMode = sgElements.add(new EnumSetting<>(
"modo de coordenadas",
"qué coordenadas mostrar",
CoordsMode.class,
CoordsMode.OVERWORLD
));
public EnumSetting<Dynosaurs> dyno = sgElements.add(new EnumSetting<>(
"dinosaurio",
"qué dinosaurio mostrar",
Dynosaurs.class, Dynosaurs.SPINOSAURUS
));
public HUD() {
super("HUD",
@@ -48,6 +119,9 @@ public class HUD extends Module {
GLFW.GLFW_KEY_F12
);
axialMovement.onUpdate(v -> axisOffset.setVisible(v));
arrowMovement.onUpdate(v -> arrowOffset.setVisible(v));
dyno.onUpdate(v -> {
DynoElement element = (DynoElement) HudRenderer.getElement(DynoElement.class);
if (element != null) element.reloadTexture();
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.player;
package me.retucio.sputnik.module.modules.combat;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.AttackEntityEvent;
import me.retucio.sputnik.event.events.interact.AttackEntityEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
@@ -9,9 +9,9 @@ import me.retucio.sputnik.module.setting.settings.NumberSetting;
public class AttributeSwapper extends Module {
public NumberSetting slot = sgGeneral.add(new NumberSetting("slot", "slot al que cambiar", 1, 1, 9, 1));
public BooleanSetting swap = sgGeneral.add(new BooleanSetting("cambiar de vuelta", "volver al slot inicial tras haber aplicado el swapping", true));
public NumberSetting swapDelay = sgGeneral.add(new NumberSetting("delay de cambio de vuelta", "tiempo que se tarda en volver al slot inicial", 1, 1, 20, 1));
private final NumberSetting slot = sgGeneral.add(new NumberSetting("slot", "slot al que cambiar", 1, 1, 9, 1));
private final BooleanSetting swap = sgGeneral.add(new BooleanSetting("cambiar de vuelta", "volver al slot inicial tras haber aplicado el swapping", true));
private final NumberSetting swapDelay = sgGeneral.add(new NumberSetting("delay de cambio de vuelta", "tiempo que se tarda en volver al slot inicial", 1, 1, 20, 1));
private int delay = 0;
private int prevSlot = -1;
@@ -19,7 +19,7 @@ public class AttributeSwapper extends Module {
public AttributeSwapper() {
super("attribute-swapper",
"utiliza el \"attribute swapping\" entre dos herramientas para negar daño de durabilidad o aplicar encantamientos adicionales a estas",
Category.PLAYER);
Category.COMBAT);
}
@Override
@@ -0,0 +1,184 @@
package me.retucio.sputnik.module.modules.combat;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.block.Blocks;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
import net.minecraft.network.packet.c2s.play.VehicleMoveC2SPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
// https://github.com/etianl/Trouser-Streak/blob/ce27abd30435ca2b43a5e5546f5b070c07c6291a/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java
public class MaceKill extends Module {
private final BooleanSetting max = sgGeneral.add(new BooleanSetting(
"máxima potencia",
"simular caída desde el hueco con aire más cercano en un rango de 170 bloques",
false
));
private final NumberSetting height = sgGeneral.add(new NumberSetting(
"altura",
"altura de la que simular la caída",
22,
1,
170,
1
));
private final BooleanSetting preventDeath = sgGeneral.add(new BooleanSetting(
"prevenir muerte",
"prevenir la muerte por daño de caída si el ataque fue bloqueado, cancelando los paquetes de movimiento",
true
));
public MaceKill() {
super("estampaescrotos", "estampa escrotos ajenos", Category.COMBAT);
max.onUpdate(v -> height.setVisible(!v));
}
@SubscribeEvent
@SuppressWarnings("ConstantConditions")
public void onPacketSend(PacketEvent.Send event) {
if (mc.player == null) return;
if (mc.player.getMainHandStack().getItem() == Items.MACE
&& event.getPacket() instanceof PlayerInteractEntityC2SPacket packet
&& packet.type.getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) {
// que te follen marcos
if (mc.player.getName().getString().equals("Ninjaesqueleto")) {
mc.getNetworkHandler().sendChatMessage("ME ENCANTA VER FEMBOYS CON EL PITO PEQUEÑO");
return;
}
try {
if (mc.world.getEntityById(packet.entityId) instanceof LivingEntity target) {
if (preventDeath.getValue()
&& (target.isBlocking()
|| target.isInvulnerable()
|| target.isInCreativeMode()
)) {
return;
}
Vec3d previouspos = mc.player.getEntityPos();
int blocks = getMaxHeightAbovePlayer();
int packetsRequired = (int) (double) Math.abs(blocks / 10);
if (packetsRequired > 20) {
packetsRequired = 1;
}
BlockPos gap1 = (mc.player.getBlockPos().add(0, blocks, 0));
BlockPos gap2 = (mc.player.getBlockPos().add(0, blocks + 1, 0));
if (isSafeBlock(gap1) && isSafeBlock(gap2)) {
if (blocks <= 22) {
if (mc.player.hasVehicle()) {
for (int i = 0; i < 4; i++) {
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
}
double maxHeight = Math.min(mc.player.getVehicle().getY() + 22, mc.player.getVehicle().getY() + blocks);
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), maxHeight + blocks, mc.player.getVehicle().getZ());
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
mc.player.getVehicle().setPosition(previouspos);
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
} else {
for (int i = 0; i < 4; i++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(false, mc.player.horizontalCollision));
}
double maxHeight = Math.min(mc.player.getY() + 22, mc.player.getY() + blocks);
PlayerMoveC2SPacket movePacket = new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), maxHeight, mc.player.getZ(), false, mc.player.horizontalCollision);
mc.player.networkHandler.sendPacket(movePacket);
PlayerMoveC2SPacket returnPacket = new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false, mc.player.horizontalCollision);
mc.player.networkHandler.sendPacket(returnPacket);
}
} else {
if (mc.player.hasVehicle()) {
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
}
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), mc.player.getVehicle().getY() + blocks, mc.player.getVehicle().getZ());
double maxHeight = mc.player.getVehicle().getY() + blocks;
mc.player.getVehicle().setPosition(mc.player.getVehicle().getX(), maxHeight + blocks, mc.player.getVehicle().getZ());
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
mc.player.getVehicle().setPosition(previouspos);
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
} else {
for (int packetNumber = 0; packetNumber < (packetsRequired - 1); packetNumber++) {
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.OnGroundOnly(false, mc.player.horizontalCollision));
}
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + blocks, mc.player.getZ(), false, mc.player.horizontalCollision));
PlayerMoveC2SPacket movePacket = new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + blocks, mc.player.getZ(), false, mc.player.horizontalCollision);
mc.player.networkHandler.sendPacket(movePacket);
}
if (mc.player.hasVehicle()) {
mc.player.getVehicle().setPosition(previouspos);
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
mc.player.getVehicle().setPosition(previouspos);
mc.player.networkHandler.sendPacket(VehicleMoveC2SPacket.fromVehicle(mc.player.getVehicle()));
} else {
double maxHeight = mc.player.getY() + blocks;
PlayerMoveC2SPacket movePacket = new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), maxHeight, mc.player.getZ(), false, mc.player.horizontalCollision);
PlayerMoveC2SPacket returnPacket = new PlayerMoveC2SPacket.PositionAndOnGround(previouspos.getX(), previouspos.getY(), previouspos.getZ(), false, mc.player.horizontalCollision);
mc.player.networkHandler.sendPacket(returnPacket);
mc.player.networkHandler.sendPacket(movePacket);
mc.player.networkHandler.sendPacket(returnPacket);
}
}
}
}
} catch (Exception e) {
ChatUtil.error("upsi: " + e.getMessage());
}
}
}
private int getMaxHeightAbovePlayer() {
BlockPos playerPos = mc.player.getBlockPos();
int maxHeight = playerPos.getY() + (max.getValue() ? 170 : height.getIntValue());
for (int i = maxHeight; i > playerPos.getY(); i--) {
BlockPos isopenair1 = new BlockPos(playerPos.getX(), i, playerPos.getZ());
BlockPos isopenair2 = isopenair1.up(1);
if (isSafeBlock(isopenair1) && isSafeBlock(isopenair2)) {
return i - playerPos.getY();
}
}
return 0;
}
private boolean isSafeBlock(BlockPos pos) {
return mc.world.getBlockState(pos).isReplaceable()
&& mc.world.getFluidState(pos).isEmpty()
&& !mc.world.getBlockState(pos).isOf(Blocks.POWDER_SNOW);
}
}
@@ -0,0 +1,414 @@
package me.retucio.sputnik.module.modules.combat;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.render.Render3DEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.*;
import me.retucio.sputnik.util.Colors;
import me.retucio.sputnik.util.misc.ProjectileInfo;
import me.retucio.sputnik.util.render.RenderUtil;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.AreaEffectCloudEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ExperienceOrbEntity;
import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.boss.dragon.EnderDragonEntity;
import net.minecraft.entity.projectile.ProjectileEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Arm;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import org.joml.Vector3f;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
// https://github.com/maDU59/ProjectilesTrajectoryPreview
public class ProjectileTrajectories extends Module {
private final SettingGroup sgTrajectory = addSg(new SettingGroup("trayectoria", true));
private final SettingGroup sgOutline = addSg(new SettingGroup("contorno", true));
private final SettingGroup sgFilling = addSg(new SettingGroup("resaltado", true));
private final BooleanSetting offhand = sgGeneral.add(new BooleanSetting(
"mano secundaria",
"predecir trayectoria de proyectiles de la mano secundaria",
true
));
private final ColorSetting trajColor = sgTrajectory.add(new ColorSetting(
"color",
"color de la trayectoria",
Color.RED,
false
));
private final NumberSetting trajWidth = sgTrajectory.add(new NumberSetting(
"grosor",
"grosor de línea de la trayectoria",
2,
0.1,
10,
0.1
));
private final EnumSetting<TrajectoryStyle> trajStyle = sgTrajectory.add(new EnumSetting<>(
"estilo",
"estilo visual de la trayectoria",
TrajectoryStyle.class,
TrajectoryStyle.SOLID
));
private final BooleanSetting impactPoint = sgTrajectory.add(new BooleanSetting(
"punto de impacto",
"mostrar el punto de impacto",
true
));
private final EnumSetting<TrajectoryTargets> outlineTargets = sgOutline.add(new EnumSetting<>(
"contorno",
"a qué objetivos renderizar el contorno de la caja",
TrajectoryTargets.class,
TrajectoryTargets.BOTH
));
private final ColorSetting outlineColor = sgOutline.add(new ColorSetting(
"color ",
"color del contorno",
Colors.withAlpha(Colors.RED, 200),
false
));
private final NumberSetting outlineWidth = sgOutline.add(new NumberSetting(
"grosor",
"grosor de las líneas del contorno",
2, 0.1, 10, 0.1
));
private final EnumSetting<TrajectoryTargets> fillingTargets = sgFilling.add(new EnumSetting<>(
"relleno",
"a qué objetivos renderizar el relleno de la caja",
TrajectoryTargets.class,
TrajectoryTargets.BOTH
));
private final ColorSetting fillingColor = sgFilling.add(new ColorSetting(
"color ",
"color del contorno",
Colors.withAlpha(Colors.RED.brighter(), 100),
false
));
public ProjectileTrajectories() {
super("trayectoria", "muestra la trayectoria de los proyectiles", Category.COMBAT);
fillingTargets.onUpdate(v -> fillingColor.setVisible(v != TrajectoryTargets.NONE));
outlineTargets.onUpdate(v -> {
outlineColor.setVisible(v != TrajectoryTargets.NONE);
outlineWidth.setVisible(v != TrajectoryTargets.NONE);
});
}
@SubscribeEvent
public void onRenderWorld(Render3DEvent event) {
if (mc.player == null) return;
renderProjectileTrajectory(event.getMatrices());
}
private void renderProjectileTrajectory(MatrixStack matrices) {
ItemStack mainHand = mc.player.getMainHandStack();
int handMultiplier = getHandMultiplier();
List<ProjectileInfo> projectileInfoList = ProjectileInfo.getItemsInfo(mainHand);
if (projectileInfoList.isEmpty() && offhand.getValue()) {
ItemStack offHand = mc.player.getOffHandStack();
handMultiplier = -handMultiplier;
projectileInfoList = ProjectileInfo.getItemsInfo(offHand);
}
if (projectileInfoList.isEmpty()) return;
showProjectileTrajectory(matrices, projectileInfoList, handMultiplier);
}
private void showProjectileTrajectory(MatrixStack matrices, List<ProjectileInfo> projectileInfoList, int handMultiplier) {
float tickProgress = mc.getRenderTickCounter().getTickProgress(false);
Vec3d eye = mc.player.getCameraPosVec(tickProgress);
for (ProjectileInfo projectileInfo : projectileInfoList) {
Vec3d startPos = projectileInfo.position() == null ? mc.player.getEyePos() : projectileInfo.position();
Vec3d handToEyeDelta = calculateHandToEyeDelta(projectileInfo.offset(), startPos, eye, handMultiplier, tickProgress);
PreviewImpact previewImpact = calculateTrajectory(startPos, projectileInfo);
renderTargetEffects(matrices, previewImpact);
renderTrajectory(matrices, previewImpact.points, handToEyeDelta, previewImpact.hit);
}
}
private void renderTargetEffects(MatrixStack matrices, PreviewImpact previewImpact) {
if (previewImpact.impact != null && previewImpact.impact.getType() == HitResult.Type.BLOCK && previewImpact.impact instanceof BlockHitResult bhr) {
BlockPos impactPos = bhr.getBlockPos();
if (fillingTargets.is(TrajectoryTargets.BLOCKS) || fillingTargets.is(TrajectoryTargets.BOTH)) {
RenderUtil.drawBlockFilled(matrices, impactPos, fillingColor.getValue(), false);
}
if (outlineTargets.is(TrajectoryTargets.BLOCKS) || outlineTargets.is(TrajectoryTargets.BOTH)) {
RenderUtil.drawBlockOutline(matrices, impactPos, outlineColor.getValue(), outlineWidth.getFloatValue(), false);
}
} else if (previewImpact.entity != null) {
Box entityBoundingBox = previewImpact.entity.getBoundingBox().expand(previewImpact.entity.getTargetingMargin());
if (fillingTargets.is(TrajectoryTargets.ENTITIES) || fillingTargets.is(TrajectoryTargets.BOTH)) {
RenderUtil.drawFilledBox(matrices, entityBoundingBox, fillingColor.getValue(), false);
}
if (outlineTargets.is(TrajectoryTargets.ENTITIES) || outlineTargets.is(TrajectoryTargets.BOTH)) {
RenderUtil.drawOutlineBox(matrices, entityBoundingBox, outlineColor.getValue(), outlineWidth.getFloatValue(), false);
}
}
}
private Vec3d calculateHandToEyeDelta(Vec3d offset, Vec3d startPos, Vec3d eye, int handMultiplier, float tickProgress) {
if (mc.gameRenderer.getCamera().isThirdPerson()) {
offset = offset.multiply(0);
}
float yaw = (float) Math.toRadians(-mc.player.getYaw(tickProgress));
float pitch = (float) Math.toRadians(-mc.player.getPitch(tickProgress));
Vec3d forward = mc.player.getRotationVec(tickProgress);
Vec3d up = new Vec3d(-Math.sin(pitch) * Math.sin(yaw), Math.cos(pitch), -Math.sin(pitch) * Math.cos(yaw)).normalize();
Vec3d right = forward.crossProduct(up).normalize();
Vec3d offsetDelta = right.multiply(handMultiplier * offset.x)
.add(up.multiply(offset.y))
.add(forward.multiply(offset.z));
return offsetDelta.add(eye.subtract(startPos));
}
private void renderTrajectory(MatrixStack matrices, List<Vec3d> trajectoryPoints, Vec3d handToEyeDelta, boolean hasHit) {
if (trajectoryPoints.isEmpty()) return;
Vec3d cameraPos = mc.gameRenderer.getCamera().getCameraPos();
matrices.push();
matrices.translate(-cameraPos.x, -cameraPos.y, -cameraPos.z);
renderTrajectorySegments(matrices, trajectoryPoints, handToEyeDelta);
if (hasHit && impactPoint.getValue()) {
renderImpactPoint(matrices, trajectoryPoints.getLast());
}
matrices.pop();
}
private void renderTrajectorySegments(MatrixStack matrices, List<Vec3d> points, Vec3d handToEyeDelta) {
int pointCount = points.size();
for (int i = 0; i < pointCount - 1; i++) {
double lerpFactor = (pointCount - i) / (double) pointCount;
double nextLerpFactor = (pointCount - (i + 1)) / (double) pointCount;
Vec3d lerpedDelta = handToEyeDelta.multiply(lerpFactor);
Vec3d nextLerpedDelta = handToEyeDelta.multiply(nextLerpFactor);
Vec3d start = points.get(i).add(lerpedDelta);
Vec3d end = points.get(i + 1).add(nextLerpedDelta);
Vec3d direction = end.subtract(start);
if (trajStyle.is(TrajectoryStyle.DASHED)) {
direction = direction.multiply(0.5);
} else if (trajStyle.is(TrajectoryStyle.DOTTED)) {
direction = direction.multiply(0.15);
}
Vector3f startVector = new Vector3f((float) start.x, (float) start.y, (float) start.z);
RenderUtil.drawVector(matrices, startVector, direction, trajColor.getValue(), trajWidth.getFloatValue());
}
}
private void renderImpactPoint(MatrixStack matrices, Vec3d impactPos) {
double radius = 0.1;
double diameter = 2 * radius;
Vector3f xStart = new Vector3f((float) (impactPos.x - radius), (float) impactPos.y, (float) impactPos.z);
RenderUtil.drawVector(matrices, xStart, new Vec3d(diameter, 0, 0), trajColor.getValue(), trajWidth.getFloatValue());
Vector3f yStart = new Vector3f((float) impactPos.x, (float) (impactPos.y - radius), (float) impactPos.z);
RenderUtil.drawVector(matrices, yStart, new Vec3d(0, diameter, 0), trajColor.getValue(), trajWidth.getFloatValue());
Vector3f zStart = new Vector3f((float) impactPos.x, (float) impactPos.y, (float) (impactPos.z - radius));
RenderUtil.drawVector(matrices, zStart, new Vec3d(0, 0, diameter), trajColor.getValue(), trajWidth.getFloatValue());
}
private PreviewImpact calculateTrajectory(Vec3d startPos, ProjectileInfo projectileInfo) {
Vec3d currentPos = startPos;
Vec3d prevPos = startPos;
Vec3d playerVel = mc.player.isOnGround() ? new Vec3d(mc.player.getVelocity().x, 0, mc.player.getVelocity().z) : mc.player.getVelocity();
Vec3d velocity = projectileInfo.initialVelocity().add(playerVel);
List<Vec3d> trajectoryPoints = new ArrayList<>();
double drag = projectileInfo.drag();
double gravity = projectileInfo.gravity();
for (int i = 0; i < 200; i++) {
trajectoryPoints.add(currentPos);
for (int order : projectileInfo.order()) {
switch (order) {
case 0 -> currentPos = currentPos.add(velocity);
case 1 -> velocity = velocity.multiply(drag);
case 2 -> velocity = velocity.subtract(0, gravity, 0);
}
}
Box trajectorySegment = new Box(prevPos, currentPos).expand(1);
Optional<Entity> hitEntity = findHitEntity(prevPos, currentPos, trajectorySegment);
HitResult blockHit = performRaycast(prevPos, currentPos);
if (blockHit.getType() == HitResult.Type.MISS) {
boolean inWater = isInWater(prevPos, currentPos);
drag = inWater ? projectileInfo.waterDrag() : projectileInfo.drag();
gravity = inWater ? projectileInfo.underwaterGravity() : projectileInfo.gravity();
}
if (handleImpact(blockHit, hitEntity, prevPos, currentPos, trajectoryPoints)) {
return new PreviewImpact(currentPos, blockHit, hitEntity.orElse(null), true, trajectoryPoints);
}
if (currentPos.y < mc.world.getBottomY() - 20) {
break;
}
prevPos = currentPos;
}
return new PreviewImpact(currentPos, null, null, false, trajectoryPoints);
}
private Optional<Entity> findHitEntity(Vec3d start, Vec3d end, Box searchBox) {
List<Entity> entities = mc.world.getEntitiesByClass(Entity.class, searchBox, this::isValidTarget);
Entity closest = null;
double closestDistance = Double.MAX_VALUE;
for (Entity entity : entities) {
Box entityBox = entity.getBoundingBox().expand(entity.getTargetingMargin());
Optional<Vec3d> raycastHit = entityBox.raycast(start, end);
if (raycastHit.isPresent()) {
double distance = start.squaredDistanceTo(raycastHit.get());
if (distance < closestDistance) {
closest = entity;
closestDistance = distance;
}
}
}
return closest != null ? Optional.of(closest) : Optional.empty();
}
private boolean isValidTarget(Entity entity) {
return !entity.isSpectator()
&& entity.isAlive()
&& !(entity instanceof ProjectileEntity)
&& !(entity instanceof ItemEntity)
&& !(entity instanceof ExperienceOrbEntity)
&& !(entity instanceof EnderDragonEntity)
&& !(entity instanceof ClientPlayerEntity)
&& !(entity instanceof AreaEffectCloudEntity);
}
private HitResult performRaycast(Vec3d start, Vec3d end) {
return mc.world.raycast(
new RaycastContext(
start,
end,
RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE,
mc.player
)
);
}
private boolean isInWater(Vec3d start, Vec3d end) {
HitResult waterHit = mc.world.raycast(
new RaycastContext(start, end, RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.WATER, mc.player)
);
return waterHit.getType() != HitResult.Type.MISS;
}
private boolean handleImpact(HitResult blockHit, Optional<Entity> hitEntity, Vec3d prevPos,
Vec3d currentPos, List<Vec3d> trajectoryPoints) {
double blockDistance = blockHit.getType() != HitResult.Type.MISS ?
prevPos.squaredDistanceTo(blockHit.getPos()) : Double.MAX_VALUE;
double entityDistance = hitEntity.map(entity -> prevPos.squaredDistanceTo(findEntityHitPos(prevPos, currentPos, entity))).orElse(Double.MAX_VALUE);
if (blockDistance < entityDistance && blockHit.getType() != HitResult.Type.MISS) {
trajectoryPoints.add(blockHit.getPos());
return true;
} else if (hitEntity.isPresent()) {
Vec3d entityHitPos = findEntityHitPos(prevPos, currentPos, hitEntity.get());
trajectoryPoints.add(entityHitPos);
return true;
}
return false;
}
private Vec3d findEntityHitPos(Vec3d start, Vec3d end, Entity entity) {
Box entityBox = entity.getBoundingBox().expand(entity.getTargetingMargin());
return entityBox.raycast(start, end).orElse(end);
}
private int getHandMultiplier() {
return mc.options.getMainArm().getValue() == Arm.RIGHT ? 1 : -1;
}
public record PreviewImpact(
Vec3d pos,
HitResult impact,
Entity entity,
boolean hit,
List<Vec3d> points
) {}
public enum TrajectoryStyle {
SOLID("continua"),
DASHED("discontinua"),
DOTTED("puntos");
private final String name;
TrajectoryStyle(String name) { this.name = name; }
@Override public String toString() { return name; }
}
public enum TrajectoryTargets {
BOTH("ambos"),
ENTITIES("entidades"),
BLOCKS("bloques"),
NONE("ninguna");
private final String name;
TrajectoryTargets(String name) { this.name = name; }
@Override public String toString() { return name; }
}
}
@@ -0,0 +1,119 @@
package me.retucio.sputnik.module.modules.combat;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.registry.tag.ItemTags;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import java.util.Comparator;
import java.util.List;
// https://github.com/etianl/spearHax/blob/main/src/main/java/things/haxHandler.java
public class SpearKill extends Module {
private final BooleanSetting onlyPlayers = sgGeneral.add(new BooleanSetting(
"solo jugadores",
"tener de objetivo solamente jugadores",
true
));
private final NumberSetting speed = sgGeneral.add(new NumberSetting(
"velocidad",
"velocidad del impulso",
5,
1,
15,
0.2
));
private int heldTicks = 0;
private Entity crosshairTarget;
public SpearKill() {
super("don quijote", "chits para la lanza", Category.COMBAT);
}
@Override
public void onTick() {
if (mc.player == null || mc.world == null) return;
if (isHoldingSpear() && mc.options.useKey.isPressed()) {
heldTicks++;
if (crosshairTarget == null) crosshairTarget = getTarget();
if (crosshairTarget == null) return;
if (!crosshairTarget.isAlive()) return;
if (!(crosshairTarget instanceof LivingEntity)) return;
if (onlyPlayers.getValue() && !(crosshairTarget instanceof PlayerEntity)) return;
Vec3d playerPos = mc.player.getEyePos();
Vec3d targetPos = crosshairTarget.getBoundingBox().getCenter();
Vec3d toTarget = targetPos.subtract(playerPos).normalize();
float yaw = (float) (Math.toDegrees(Math.atan2(toTarget.z, toTarget.x)) - 90.0);
float pitch = (float) -Math.toDegrees(Math.asin(toTarget.y));
mc.player.setYaw(yaw);
mc.player.setHeadYaw(yaw);
mc.player.setPitch(pitch);
if (heldTicks >= 10) {
double lungeSpeed = speed.getValue();
Vec3d viewDir = Vec3d.fromPolar(mc.player.getPitch(), mc.player.getYaw());
mc.player.setSprinting(true);
mc.player.setVelocity(viewDir.multiply(lungeSpeed));
}
} else {
heldTicks = 0;
crosshairTarget = null;
}
}
private boolean isHoldingSpear() {
return mc.player.isHolding(
stack -> stack.streamTags().anyMatch(
tag -> tag.equals(ItemTags.SPEARS)
)
);
}
private Entity getTarget() {
if (mc.player == null || mc.world == null) return null;
double maxRange = 256;
Vec3d eyePos = mc.player.getEyePos();
Vec3d lookVec = mc.player.getRotationVec(1f);
HitResult blockHit = mc.world.raycast(new RaycastContext(eyePos,
eyePos.add(lookVec.multiply(maxRange)), RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE, mc.player));
double rayLength = blockHit.getType() == HitResult.Type.MISS ? maxRange :
eyePos.distanceTo(blockHit.getPos());
List<Entity> candidates = mc.world.getOtherEntities(mc.player,
mc.player.getBoundingBox().stretch(lookVec.multiply(rayLength)),
e -> e instanceof LivingEntity && e.isAlive() && e != mc.player);
candidates.sort(Comparator.comparingDouble(e ->
eyePos.squaredDistanceTo(e.getBoundingBox().getCenter())));
double coneAngle = 0.999;
for (Entity e : candidates) {
if (eyePos.distanceTo(e.getBoundingBox().getCenter()) > rayLength) break;
Vec3d toEntity = e.getBoundingBox().getCenter().subtract(eyePos).normalize();
if (lookVec.dotProduct(toEntity) > coneAngle &&
(!onlyPlayers.getValue() || e instanceof PlayerEntity)) {
return e;
}
}
return null;
}
}
@@ -17,7 +17,7 @@ import java.util.Map;
public class AnvilFont extends Module {
public EnumSetting<FontMode> fontMode = sgGeneral.add(new EnumSetting<>("tipografía", "qué tipografía utilizar",
private final EnumSetting<FontMode> fontMode = sgGeneral.add(new EnumSetting<>("tipografía", "qué tipografía utilizar",
FontMode.class, FontMode.NORMAL));
String text;
@@ -136,7 +136,7 @@ public class AnvilFont extends Module {
}
}
public enum FontMode {
private enum FontMode {
NORMAL("normal"),
UPPERCASE("mayúsculas"),
CIRCLED("redondo"),
@@ -1,6 +1,6 @@
package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.event.events.RenderBossbarEvent;
import me.retucio.sputnik.event.events.render.RenderBossbarEvent;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
@@ -15,17 +15,17 @@ import java.util.WeakHashMap;
public class BossbarStack extends Module {
public BooleanSetting stackBars = sgGeneral.add(new BooleanSetting(
private final BooleanSetting stackBars = sgGeneral.add(new BooleanSetting(
"apilar barras", "apilar las bossbars",
true
));
public BooleanSetting hideNames = sgGeneral.add(new BooleanSetting(
private final BooleanSetting hideNames = sgGeneral.add(new BooleanSetting(
"esconder nombres", "no renderiza el nombre de los bosses",
false
));
public NumberSetting spaceReduction = sgGeneral.add(new NumberSetting(
private final NumberSetting spaceReduction = sgGeneral.add(new NumberSetting(
"reducción de espacio",
"cuánto reducir el espacio entre bossbars",
0,
@@ -5,9 +5,9 @@ import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.ClientClickEvent;
import me.retucio.sputnik.event.events.ReceiveMessageEvent;
import me.retucio.sputnik.event.events.SendMessageEvent;
import me.retucio.sputnik.event.events.input.ClientClickEvent;
import me.retucio.sputnik.event.events.network.ReceiveMessageEvent;
import me.retucio.sputnik.event.events.network.SendMessageEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
@@ -46,15 +46,15 @@ public class ChatPlus extends Module {
// ajustes
SettingGroup sgChat = addSg(new SettingGroup("funcionamiento del chat", true));
public BooleanSetting timestamps = sgGeneral.add(new BooleanSetting("sello de tiempo", "muestra a qué hora se ha enviado un mensaje", true));
public BooleanSetting timestampSecs = sgGeneral.add(new BooleanSetting("mostrar segundos", "muestra segundos también en el sello de tiempo", false));
public BooleanSetting showHeads = sgGeneral.add(new BooleanSetting("cabezas", "muestra la cabeza del jugador junto a su mensaje", true));
private final BooleanSetting timestamps = sgGeneral.add(new BooleanSetting("sello de tiempo", "muestra a qué hora se ha enviado un mensaje", true));
private final BooleanSetting timestampSecs = sgGeneral.add(new BooleanSetting("mostrar segundos", "muestra segundos también en el sello de tiempo", false));
public final BooleanSetting showHeads = sgGeneral.add(new BooleanSetting("cabezas", "muestra la cabeza del jugador junto a su mensaje", true));
public BooleanSetting coordsProtection = sgChat.add(new BooleanSetting("proteger coordenadas", "evitar enviar coordenadas por el chat", true));
public BooleanSetting keepHistory = sgChat.add(new BooleanSetting("no borrar chat", "no borrar el chat tras desconectarse", true));
public BooleanSetting logger = sgChat.add(new BooleanSetting("registro", "evita que se borre el chat de un server", true));
public BooleanSetting noCharLimit = sgChat.add(new BooleanSetting("quitar límite de caracteres", "te deja escribir mensajes tan largos como desees", false));
public NumberSetting chatHistoryExtraLength = sgChat.add(new NumberSetting("expandir chat", "cuántas líneas añadir al historial del chat",
private final BooleanSetting coordsProtection = sgChat.add(new BooleanSetting("proteger coordenadas", "evitar enviar coordenadas por el chat", true));
public final BooleanSetting keepHistory = sgChat.add(new BooleanSetting("no borrar chat", "no borrar el chat tras desconectarse", true));
private final BooleanSetting logger = sgChat.add(new BooleanSetting("registro", "evita que se borre el chat de un server", true));
public final BooleanSetting noCharLimit = sgChat.add(new BooleanSetting("quitar límite de caracteres", "te deja escribir mensajes tan largos como desees", false));
public final NumberSetting chatHistoryExtraLength = sgChat.add(new NumberSetting("expandir chat", "cuántas líneas añadir al historial del chat",
0, 0, 1000, 1));
public ChatPlus() {
@@ -68,6 +68,7 @@ public class ChatPlus extends Module {
}
public final IntList lines = new IntArrayList();
private record CustomHeadEntry(String prefix, Identifier texture) {}
private static final List<CustomHeadEntry> CUSTOM_HEAD_ENTRIES = new ArrayList<>();
private SimpleDateFormat dateFormat;
@@ -78,7 +79,7 @@ public class ChatPlus extends Module {
private static final Pattern coordRegex = Pattern.compile("(?<x>-?\\d{3,}(?:\\.\\d*)?)(?:\\s+(?<y>-?\\d{1,3}(?:\\.\\d*)?))?\\s+(?<z>-?\\d{3,}(?:\\.\\d*)?)");
@SubscribeEvent
public void onReceiveMessage(ReceiveMessageEvent event) {
private void onReceiveMessage(ReceiveMessageEvent event) {
Text message = event.getMessage();
// registrar mensajes para evitar su eliminación
@@ -126,7 +127,7 @@ public class ChatPlus extends Module {
}
@SuppressWarnings("DataFlowIssue")
public void beforeDrawMessage(DrawContext context, ChatHudLine.Visible line, int y, int color) {
private void beforeDrawMessage(DrawContext context, ChatHudLine.Visible line, int y, int color) {
if (!isEnabled() || !showHeads.getValue()) return;
// dibujar la cabeza al principio del mensaje
@@ -0,0 +1,18 @@
package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
/**
* continúa en
* @see me.retucio.sputnik.mixin.CreativeInventoryScreenMixin
*/
public class CreativeInventoryHotbarKeybinds extends Module {
public CreativeInventoryHotbarKeybinds() {
super("hotkeys inv. creativo",
"te permite seguir usando teclas de la hotbar para mover items en la pestaña de búsqueda del creativo en vez de escribir en la barra",
Category.MISC);
}
}
@@ -12,7 +12,7 @@ import java.util.UUID;
public class FakePlayer extends Module {
public StringSetting name = sgGeneral.add(new StringSetting("nombre", "qué nombre asignarle al jugador", "apio boy", 22));
private final StringSetting name = sgGeneral.add(new StringSetting("nombre", "qué nombre asignarle al jugador", "apio boy", 22));
private OtherClientPlayerEntity player = null;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.event.events.ClientClickEvent;
import me.retucio.sputnik.event.events.input.ClientClickEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup;
@@ -31,15 +31,15 @@ import java.io.IOException;
public class ScreenshotPlus extends Module {
SettingGroup sgButtons = addSg(new SettingGroup("botones", true));
private final SettingGroup sgButtons = addSg(new SettingGroup("botones", true));
public EnumSetting<ScreenshotActions> defaultAction = sgGeneral.add(new EnumSetting<>("por defecto", "qué acción tomar por defecto",
public final EnumSetting<ScreenshotActions> defaultAction = sgGeneral.add(new EnumSetting<>("por defecto", "qué acción tomar por defecto",
ScreenshotActions.class, ScreenshotActions.NONE));
public BooleanSetting saveButton = sgButtons.add(new BooleanSetting("botón de guardar", "mostrar botón para guardar la captura localmente", true));
public BooleanSetting copyButton = sgButtons.add(new BooleanSetting("botón de copiar", "mostrar botón para copiar la captura al portapapeles", true));
public BooleanSetting openButton = sgButtons.add(new BooleanSetting("botón de abrir", "mostrar botón para abrir el archivo de la captura", true));
public BooleanSetting discardButton = sgButtons.add(new BooleanSetting("botón de descartar", "mostrar botón para descartar la captura", true));
private final BooleanSetting saveButton = sgButtons.add(new BooleanSetting("botón de guardar", "mostrar botón para guardar la captura localmente", true));
private final BooleanSetting copyButton = sgButtons.add(new BooleanSetting("botón de copiar", "mostrar botón para copiar la captura al portapapeles", true));
private final BooleanSetting openButton = sgButtons.add(new BooleanSetting("botón de abrir", "mostrar botón para abrir el archivo de la captura", true));
private final BooleanSetting discardButton = sgButtons.add(new BooleanSetting("botón de descartar", "mostrar botón para descartar la captura", true));
private NativeImage screenshot;
private File screenshotFile;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.KeyEvent;
import me.retucio.sputnik.event.events.input.KeyEvent;
import me.retucio.sputnik.mixin.accessor.HandledScreenAccessor;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
@@ -29,8 +29,8 @@ import java.util.HashMap;
public class ShulkerPeek extends Module {
public KeySetting previewKey = sgGeneral.add(new KeySetting("tecla de previsualización", "tecla a mantener para previsualizar", GLFW.GLFW_KEY_LEFT_ALT));
public BooleanSetting showTooltips = sgGeneral.add(new BooleanSetting("mostrar tooltips", "añadir texto a los tooltips (cajas de texto) de los shulkers", true));
public final KeySetting previewKey = sgGeneral.add(new KeySetting("tecla de previsualización", "tecla a mantener para previsualizar", GLFW.GLFW_KEY_LEFT_ALT));
public final BooleanSetting showTooltips = sgGeneral.add(new BooleanSetting("mostrar tooltips", "añadir texto a los tooltips (cajas de texto) de los shulkers", true));
public static final HashMap<Item, Color> SHULKER_COLORS = new HashMap<>();
@@ -60,7 +60,7 @@ public class ShulkerPeek extends Module {
}
@SubscribeEvent
public void onKey(KeyEvent event) {
private void onKey(KeyEvent event) {
if (mc.player == null) return;
if (event.getKey() != previewKey.getValue()) return;
@@ -0,0 +1,11 @@
package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
public class UnfocusedCpu extends Module {
public UnfocusedCpu() {
super("aliviar cpu", "evita renderizar objetos en pantalla si la ventana no está seleccionada", Category.MISC);
}
}
@@ -0,0 +1,91 @@
package me.retucio.sputnik.module.modules.movement;
import com.google.common.eventbus.Subscribe;
import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import net.minecraft.network.packet.s2c.play.VehicleMoveS2CPacket;
import net.minecraft.util.math.Vec3d;
public class BoatFly extends Module {
private final NumberSetting speed = sgGeneral.add(new NumberSetting(
"velocidad horizontal",
"velocidad a la que moverse horizontalmente",
2,
0,
5,
0.1
));
private final NumberSetting vSpeed = sgGeneral.add(new NumberSetting(
"velocidad vertical",
"velocidad a la que moverse verticalmente",
1,
0,
5,
0.1
));
public final NumberSetting stepHeight = sgGeneral.add(new NumberSetting(
"altura de escalonado",
"como escalones pero pal barco",
0.5,
0,
1,
0.1
));
private final BooleanSetting cancelPackets = sgGeneral.add(new BooleanSetting(
"cancelar paquetes",
"cancelar paquetes de movimiento del barco enviados por el servidor",
false
));
public BoatFly() {
super("barco volador", "convierte tu bote de acacia en un Lockheed F-117 Nighthawk", Category.MOVEMENT);
}
@SubscribeEvent
private void onBoatMove(BoatMoveEvent event) {
if (event.getBoat().getControllingPassenger() != mc.player) return;
event.getBoat().setYaw(mc.player.getYaw());
float yaw = event.getBoat().getYaw();
int dx = 0, dy = 0, dz = 0;
if (mc.options.rightKey.isPressed()) dx++;
if (mc.options.leftKey.isPressed()) dx--;
if (mc.options.jumpKey.isPressed()) dy++;
if (mc.options.sprintKey.isPressed()) dy--;
// ctrl para bajar, en vez de shift, porque si no te desmontas
if (mc.options.backKey.isPressed()) dz++;
if (mc.options.forwardKey.isPressed()) dz--;
double speed = this.speed.getValue();
double sin = Math.sin(Math.toRadians(yaw));
double cos = Math.cos(Math.toRadians(yaw));
double x = speed * dz * sin;
double y = vSpeed.getValue() * dy;
double z = speed * dz * -cos;
x += speed * dx * -cos;
z += speed * dx * -sin;
event.getBoat().setVelocity(new Vec3d(x, y, z));
}
@Subscribe
private void onReceivePacket(PacketEvent.Receive event) {
if (event.getPacket() instanceof VehicleMoveS2CPacket && cancelPackets.getValue()) {
event.cancel();
}
}
}
Loaded 100 of 175 files, more files were not shown because too many files have changed in this diff. Show more