This commit is contained in:
retuci0 committed 2026-02-01 13:46:01 +01:00
1 parent 86594f1ca3
commit 9b6d037b6c
158 files changed
+2827 -598

No files matched your search

+22 -15
View File
@@ -1,29 +1,36 @@
# v2.9 # v3.0
## novedades ## novedades
varios módulos que no quería añadir porque son cheats en toda regla, pero ya total, como la mayoría que he añadido hasta la fecha es baneable - categoría de combate
### adiciones ### adiciones
- categoría de movimiento
#### módulos nuevos: #### módulos nuevos:
- packetmine: mina usando paquetes, para minar más rápido o para evitar la animación de minado - colocar en aire: te permite colocar bloques sin soporte alguno
- aliviar cpu: evita renderizar objetos en pantalla si la ventana no está seleccionada - 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
- delfín: *ruidos de delfín* - don quijote: te acelera para inflingir cantidades importantes de daño con la lanza
- patinaje: esparce semen allá por donde pisas (haciéndolo más resbaladizo) - auto herramienta: cambia automáticamente a la herramienta más veloz disponible para el bloque seleccionado
- jesús: hermano se cree Jesús (camina sobre el agua) - autismo: da vueltas
- info. de bloque: (muestra el contenido nbt de un bloque) - anti hambre: previene el hambre, cancelando los paquetes que le indican al server que empiezas a esprintar
- estampaescrotos: mazo en esteroides - trayectoria: preve la trayectoria de los proyectiles (maomeno, aún lo tengo que ajustar un poco)
- tenedor mágico: hermano se cree Poseidón (tweaks a la propulsión acuática del tridente) - 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
- elytras: vuela con las elytras (en vez de solo planear) - auto pesca: pesca por ti
- barco volador: convierte tu bote de acacia en un caza militar
#### 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 ### arreglos / mejoras
- ahora puedes cambiar el título de la ventana en los ajustes del mod - 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 ## 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/ No More Purple: https://github.com/Pepperoni-Jabroni/NoMorePurple/
bypass-resource-pack: https://github.com/emilyy-dev/bypass-resource-pack bypass-resource-pack: https://github.com/emilyy-dev/bypass-resource-pack
elytra-recast: https://github.com/InLieuOfLuna/elytra-recast/ 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 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 :) 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 fabric_api_version=0.140.2+1.21.11
mod_version=2.9 mod_version=3.0
maven_group=me.retucio maven_group=me.retucio
archives_base_name=sputnik archives_base_name=sputnik
Vendored Regular → Executable
View File
File mode changed.
@@ -32,6 +32,7 @@ import me.retucio.sputnik.ui.widgets.Button;
import me.retucio.sputnik.util.*; import me.retucio.sputnik.util.*;
import me.retucio.sputnik.util.KeyUtil; import me.retucio.sputnik.util.KeyUtil;
import me.retucio.sputnik.util.render.DrawUtil; 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.RenderUtil;
import me.retucio.sputnik.util.render.Textures; import me.retucio.sputnik.util.render.Textures;
@@ -94,7 +95,7 @@ public class Sputnik implements ClientModInitializer {
Lists.init(); Lists.init();
Textures.registerAll(); Textures.init();
CapeManager.INSTANCE = new CapeManager(); CapeManager.INSTANCE = new CapeManager();
EVENT_BUS.post(new LoadCapeManagerEvent()); EVENT_BUS.post(new LoadCapeManagerEvent());
@@ -32,17 +32,21 @@ public class CommandManager {
public static void registerCommands() { public static void registerCommands() {
addCommand(new BindCommand()); addCommand(new BindCommand());
addCommand(new ClickSlotCommand());
addCommand(new ConfigCommand()); addCommand(new ConfigCommand());
addCommand(new CopyScreenshotCommand()); addCommand(new CopyScreenshotCommand());
addCommand(new EnderChestCommand()); addCommand(new EnderChestCommand());
addCommand(new GarbageCleanerCommand()); addCommand(new GarbageCleanerCommand());
addCommand(new PeekCommand()); addCommand(new PeekCommand());
addCommand(new PluginsCommand());
addCommand(new PrefixCommand()); addCommand(new PrefixCommand());
addCommand(new PurgeCommand()); addCommand(new PurgeCommand());
addCommand(new RepeatCommand());
addCommand(new SaveScreenshotCommand()); addCommand(new SaveScreenshotCommand());
addCommand(new SendCommand()); addCommand(new SendCommand());
addCommand(new SpectateCommand()); addCommand(new SpectateCommand());
addCommand(new ToggleCommand()); addCommand(new ToggleCommand());
addCommand(new WaitCommand());
commands.sort(Comparator.comparing(Command::getName)); 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.Command;
import me.retucio.sputnik.command.args.EntityArgumentType; import me.retucio.sputnik.command.args.EntityArgumentType;
import me.retucio.sputnik.event.SubscribeEvent; 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 me.retucio.sputnik.util.EntityUtil;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.entity.Entity; 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) { private static String getSettingKey(Setting<?> setting) {
return setting.getSg().getModule().getName() + ":" + setting.getName(); return setting.getSg().getModule().getName() + ":" + setting.getTrueName();
} }
public static boolean hasLoaded() { 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 me.retucio.sputnik.module.modules.misc.ChatPlus;
import net.minecraft.text.ClickEvent; 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; 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; 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; 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 me.retucio.sputnik.event.Event;
import net.minecraft.util.math.BlockPos; 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; import me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity; 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 me.retucio.sputnik.event.Event;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
@@ -1,5 +1,6 @@
package me.retucio.sputnik.event; package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event;
import net.minecraft.entity.vehicle.AbstractBoatEntity; import net.minecraft.entity.vehicle.AbstractBoatEntity;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
@@ -1,4 +1,4 @@
package me.retucio.sputnik.event.events; package me.retucio.sputnik.event.events.interact;
import me.retucio.sputnik.event.Event; import me.retucio.sputnik.event.Event;
import net.minecraft.util.math.BlockPos; 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; 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 me.retucio.sputnik.event.Event;
import net.minecraft.item.ItemStack; 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 me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.screen.Screen; 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 me.retucio.sputnik.event.Event;
import net.minecraft.util.Hand; 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 me.retucio.sputnik.event.Event;
import net.minecraft.item.ItemStack; 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 me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity; 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; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.network.ServerInfo; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.world.ClientWorld; 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.Event;
import me.retucio.sputnik.event.Stage; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.hud.MessageIndicator; 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 me.retucio.sputnik.event.Event;
import net.minecraft.entity.Entity; 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; 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 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 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.option.Perspective; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.DrawContext; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.render.Camera; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.util.math.MatrixStack; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.gui.hud.ClientBossBar; 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 me.retucio.sputnik.event.Event;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import me.retucio.sputnik.Sputnik; import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.BoatMoveEvent; import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
import me.retucio.sputnik.module.ModuleManager; import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.movement.BoatFly; import me.retucio.sputnik.module.modules.movement.BoatFly;
import net.minecraft.entity.MovementType; import net.minecraft.entity.MovementType;
@@ -3,7 +3,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import me.retucio.sputnik.Sputnik; import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.BlockShapeEvent; import me.retucio.sputnik.event.events.interact.BlockShapeEvent;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext; import net.minecraft.block.ShapeContext;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local; 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.BossBarHud;
import net.minecraft.client.gui.hud.ClientBossBar; import net.minecraft.client.gui.hud.ClientBossBar;
import net.minecraft.text.Text; import net.minecraft.text.Text;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local; 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.ModuleManager;
import me.retucio.sputnik.module.modules.misc.ChatPlus; import me.retucio.sputnik.module.modules.misc.ChatPlus;
import me.retucio.sputnik.util.interfaces.IChatHud; import me.retucio.sputnik.util.interfaces.IChatHud;
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin; 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.client.render.chunk.ChunkOcclusionDataBuilder;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -3,8 +3,8 @@ package me.retucio.sputnik.mixin;
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import me.retucio.sputnik.event.Stage; import me.retucio.sputnik.event.Stage;
import me.retucio.sputnik.event.events.DisconnectEvent; import me.retucio.sputnik.event.events.network.DisconnectEvent;
import me.retucio.sputnik.event.events.PacketEvent; import me.retucio.sputnik.event.events.network.PacketEvent;
import net.minecraft.network.ClientConnection; import net.minecraft.network.ClientConnection;
import net.minecraft.network.DisconnectionInfo; import net.minecraft.network.DisconnectionInfo;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.sputnik.command.CommandManager; 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.ModuleManager;
import me.retucio.sputnik.module.modules.render.NoRender; import me.retucio.sputnik.module.modules.render.NoRender;
import me.retucio.sputnik.util.ChatUtil; import me.retucio.sputnik.util.ChatUtil;
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.*; import me.retucio.sputnik.event.events.interact.*;
import me.retucio.sputnik.module.ModuleManager; import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.player.FastUse; import me.retucio.sputnik.module.modules.player.FastUse;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.AddEntityEvent; import me.retucio.sputnik.event.events.network.AddEntityEvent;
import me.retucio.sputnik.event.events.RemoveEntityEvent; import me.retucio.sputnik.event.events.network.RemoveEntityEvent;
import net.minecraft.client.world.ClientWorld; import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import org.jetbrains.annotations.Nullable; 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,7 +1,7 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue; 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.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.camera.Freelook; import me.retucio.sputnik.module.modules.camera.Freelook;
@@ -20,10 +20,8 @@ import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@@ -102,6 +100,15 @@ public abstract class EntityMixin {
return original; 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") @SuppressWarnings("ConstantConditions")
@ModifyReturnValue(method = "getCustomName", at = @At("RETURN")) @ModifyReturnValue(method = "getCustomName", at = @At("RETURN"))
private Text displayEntityOwner(Text original) { private Text displayEntityOwner(Text original) {
@@ -31,7 +31,8 @@ public abstract class FontManagerMixin {
cir.setReturnValue(getStorageInternal( cir.setReturnValue(getStorageInternal(
Identifier.of( Identifier.of(
Sputnik.MOD_ID, Sputnik.MOD_ID,
fonts.font.getValue()) fonts.getFont()
)
)); ));
} }
} }
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin; 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.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
import net.minecraft.client.option.GameOptions; import net.minecraft.client.option.GameOptions;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin; 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.ModuleManager;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.misc.UnfocusedCpu; import me.retucio.sputnik.module.modules.misc.UnfocusedCpu;
@@ -24,7 +24,6 @@ import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.ModifyVariable;
@@ -1,8 +1,8 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue; import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.sputnik.event.events.RenderHeldItemEvent; import me.retucio.sputnik.event.events.render.RenderHeldItemEvent;
import me.retucio.sputnik.event.events.RenderArmEvent; import me.retucio.sputnik.event.events.render.RenderArmEvent;
import me.retucio.sputnik.module.ModuleManager; import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.player.HandView; import me.retucio.sputnik.module.modules.player.HandView;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import me.retucio.sputnik.Sputnik; 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.ModuleManager;
import me.retucio.sputnik.module.modules.misc.ChatPlus; import me.retucio.sputnik.module.modules.misc.ChatPlus;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
@@ -1,6 +1,6 @@
package me.retucio.sputnik.mixin; 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.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import me.retucio.sputnik.Sputnik; 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.Keyboard;
import net.minecraft.client.input.KeyInput; import net.minecraft.client.input.KeyInput;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -2,11 +2,11 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.sugar.Local; import com.llamalad7.mixinextras.sugar.Local;
import me.retucio.sputnik.Sputnik; import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.events.JoinWorldEvent; import me.retucio.sputnik.event.events.network.JoinWorldEvent;
import me.retucio.sputnik.event.events.OpenScreenEvent; import me.retucio.sputnik.event.events.interact.OpenScreenEvent;
import me.retucio.sputnik.event.events.ShutdownEvent; import me.retucio.sputnik.event.events.ShutdownEvent;
import me.retucio.sputnik.event.events.TickEvent; 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.ModuleManager;
import me.retucio.sputnik.module.modules.player.FastUse; import me.retucio.sputnik.module.modules.player.FastUse;
import net.minecraft.client.MinecraftClient; 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.client.world.ClientWorld;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.*; import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.*; import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.mixin; package me.retucio.sputnik.mixin;
import me.retucio.sputnik.event.events.MouseClickEvent; import me.retucio.sputnik.event.events.input.MouseClickEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent; import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import net.minecraft.client.Mouse; import net.minecraft.client.Mouse;
import net.minecraft.client.input.MouseInput; import net.minecraft.client.input.MouseInput;
import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mixin;
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue; import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.sputnik.Sputnik; 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.ModuleManager;
import me.retucio.sputnik.module.modules.render.Nametags; import me.retucio.sputnik.module.modules.render.Nametags;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
@@ -3,7 +3,7 @@ package me.retucio.sputnik.mixin;
import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.sputnik.command.CommandManager; import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.config.ConfigManager; 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 me.retucio.sputnik.ui.widgets.frames.settings.ClientSettingsFrame;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext; 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();
}
}
@@ -3,9 +3,9 @@ package me.retucio.sputnik.mixin;
import com.llamalad7.mixinextras.sugar.Local; import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.buffers.GpuBufferSlice; import com.mojang.blaze3d.buffers.GpuBufferSlice;
import me.retucio.sputnik.Sputnik; 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.ModuleManager;
import me.retucio.sputnik.module.modules.render.BlockOutline;
import me.retucio.sputnik.module.modules.camera.Freecam; import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.render.NoRender; import me.retucio.sputnik.module.modules.render.NoRender;
import net.minecraft.client.render.*; 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.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
import static me.retucio.sputnik.Sputnik.EVENT_BUS; import static me.retucio.sputnik.Sputnik.EVENT_BUS;
import static me.retucio.sputnik.Sputnik.mc; 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); if (!noRender.blindnessEffect.getValue() || !noRender.darknessEffect.getValue()) cir.setReturnValue(null);
} }
@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"))
@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 void modifyBlockOutline(Args args) {
private int modifyBlockOutlineColor(int original) { // SIX SEVEN!!! (me pegan en casa)
BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class); RenderBlockOutlineEvent event = EVENT_BUS.post(new RenderBlockOutlineEvent(args.get(6), args.get(7)));
if (!outline.isEnabled()) return original; if (event.getColor() != (int) args.get(6))
return outline.color.getRGB(); 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")) // @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) { // private int modifyBlockOutlineColor(int original) {
BlockOutline outline = ModuleManager.INSTANCE.getModuleByClass(BlockOutline.class); // RenderBlockOutlineEvent event = EVENT_BUS.post(new RenderBlockOutlineEvent(original, ))
if (!outline.isEnabled()) return original; //
return outline.lineWidth.getFloatValue(); // 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,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,10 +2,12 @@ package me.retucio.sputnik.module;
public enum Category { public enum Category {
COMBAT("combate"),
PLAYER("jugador"), PLAYER("jugador"),
WORLD("mundo"),
MOVEMENT("movimiento"), MOVEMENT("movimiento"),
WORLD("mundo"),
CAMERA("cámara"), CAMERA("cámara"),
RENDER("renderizado"), RENDER("renderizado"),
@@ -5,6 +5,10 @@ import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.module.modules.client.DiscordRPC; import me.retucio.sputnik.module.modules.client.DiscordRPC;
import me.retucio.sputnik.module.modules.client.HUD; import me.retucio.sputnik.module.modules.client.HUD;
import me.retucio.sputnik.module.modules.camera.*; 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.misc.*;
import me.retucio.sputnik.module.modules.movement.*; import me.retucio.sputnik.module.modules.movement.*;
import me.retucio.sputnik.module.modules.network.*; import me.retucio.sputnik.module.modules.network.*;
@@ -14,7 +18,6 @@ import me.retucio.sputnik.module.modules.render.CritsPlus;
import me.retucio.sputnik.module.modules.world.*; import me.retucio.sputnik.module.modules.world.*;
import me.retucio.sputnik.util.MiscUtil; import me.retucio.sputnik.util.MiscUtil;
import java.awt.*;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
@@ -64,6 +67,7 @@ public class ModuleManager {
private void addCamera() { private void addCamera() {
add(new Autism());
add(new Freecam()); add(new Freecam());
add(new Freelook()); add(new Freelook());
add(new Fullbright()); add(new Fullbright());
@@ -75,7 +79,6 @@ public class ModuleManager {
private void addClient() { private void addClient() {
add(new DiscordRPC()); add(new DiscordRPC());
add(new HUD()); add(new HUD());
} }
private void addMisc() { private void addMisc() {
@@ -83,6 +86,7 @@ public class ModuleManager {
add(new AnvilFont()); add(new AnvilFont());
add(new BossbarStack()); add(new BossbarStack());
add(new ChatPlus()); add(new ChatPlus());
add(new CreativeInventoryHotbarKeybinds());
add(new FakePlayer()); add(new FakePlayer());
add(new ScreenshotPlus()); add(new ScreenshotPlus());
add(new ShulkerPeek()); add(new ShulkerPeek());
@@ -114,15 +118,20 @@ public class ModuleManager {
} }
private void addPlayer() { private void addPlayer() {
add(new AirPlace());
add(new AntiHunger());
add(new AttributeSwapper()); add(new AttributeSwapper());
add(new AutoFish());
add(new Capes()); add(new Capes());
add(new FastUse()); add(new FastUse());
add(new HandView()); add(new HandView());
add(new InventoryPlus()); add(new InventoryPlus());
add(new MaceKill()); add(new MaceKill());
add(new NoFall());
add(new Offhand()); add(new Offhand());
add(new PortalGUI()); add(new PortalGUI());
add(new UIMove()); add(new UIMove());
add(new SpearKill());
add(new WarnLowDurability()); add(new WarnLowDurability());
} }
@@ -141,10 +150,12 @@ public class ModuleManager {
private void addWorld() { private void addWorld() {
add(new AutoSign()); add(new AutoSign());
add(new AutoTool());
add(new BlockInfo()); add(new BlockInfo());
add(new ColoredSigns()); add(new ColoredSigns());
add(new LightOverlay()); add(new LightOverlay());
add(new NoMiningInterruptions()); add(new NoMiningInterruptions());
add(new ProjectileTrajectories());
add(new Racist()); add(new Racist());
add(new StrongholdTriangulator()); add(new StrongholdTriangulator());
add(new TimeChanger()); add(new TimeChanger());
@@ -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.Stage;
import me.retucio.sputnik.event.SubscribeEvent; 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.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
@@ -42,22 +48,22 @@ import org.lwjgl.glfw.GLFW;
public class Freecam extends Module { public class Freecam extends Module {
// ajustes // 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)); private final 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)); private final 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 final 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 final 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)); private final 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)); private final 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)); 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", "velocidad", "velocidad de movimiento de la cámara",
1, 0, 10, 0.2)); 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)); 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));
public NumberSetting scrollSens = sgSpeed.add(new NumberSetting( 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", "sensibilidad del scroll", "sensibilidad de la rueda del ratón para modificar la velocidad, 0 para desactivar",
1, 0, 2, 0.1)); 1, 0, 2, 0.1));
@@ -198,7 +204,7 @@ public class Freecam extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onSendPacket(PacketEvent.Send event) { private void onSendPacket(PacketEvent.Send event) {
if (!isEnabled() || !cancelActionPackets.getValue()) return; if (!isEnabled() || !cancelActionPackets.getValue()) return;
if (event.getStage() != Stage.PRE) return; if (event.getStage() != Stage.PRE) return;
@@ -212,7 +218,7 @@ public class Freecam extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onKey(KeyEvent event) { private void onKey(KeyEvent event) {
if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return; if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
if (mc.currentScreen != null) return; if (mc.currentScreen != null) return;
@@ -245,7 +251,7 @@ public class Freecam extends Module {
} }
@SubscribeEvent @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 (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
if (mc.currentScreen != null) return; if (mc.currentScreen != null) return;
@@ -279,7 +285,7 @@ public class Freecam extends Module {
@SubscribeEvent @SubscribeEvent
private void onMouseScroll(MouseScrollEvent event) { 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); speed += event.getVertical() / 4 * (scrollSens.getValue() * speed);
if (speed < 0.1) speed = 0.1; if (speed < 0.1) speed = 0.1;
event.cancel(); event.cancel();
@@ -292,12 +298,12 @@ public class Freecam extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onLeaveGame(DisconnectEvent event) { private void onLeaveGame(DisconnectEvent event) {
toggle(); toggle();
} }
@SubscribeEvent @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 (mc.player == null) return; // el jugador probablemente nunca sea nulo bajo estas circunstancias pero quién sabe
if (event.getPacket() instanceof DeathMessageS2CPacket packet) { if (event.getPacket() instanceof DeathMessageS2CPacket packet) {
@@ -312,7 +318,7 @@ public class Freecam extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onOpenScreen(OpenScreenEvent event) { private void onOpenScreen(OpenScreenEvent event) {
unpress(); unpress();
stopMoving(); stopMoving();
prevPos.set(pos); prevPos.set(pos);
@@ -323,22 +329,22 @@ public class Freecam extends Module {
// los paquetes ya se cancelan, pero visualmente estos eventos se siguen dando // los paquetes ya se cancelan, pero visualmente estos eventos se siguen dando
@SubscribeEvent @SubscribeEvent
public void onBreakBlock(BreakBlockEvent event) { private void onBreakBlock(BreakBlockEvent event) {
if (cancelActionPackets.getValue()) event.cancel(); if (cancelActionPackets.getValue()) event.cancel();
} }
@SubscribeEvent @SubscribeEvent
public void onPlaceBlock(PlaceBlockEvent event) { private void onPlaceBlock(PlaceBlockEvent event) {
if (cancelActionPackets.getValue()) event.cancel(); if (cancelActionPackets.getValue()) event.cancel();
} }
@SubscribeEvent @SubscribeEvent
public void onInteractEntity(InteractEntityEvent event) { private void onInteractEntity(InteractEntityEvent event) {
if (cancelActionPackets.getValue()) event.cancel(); if (cancelActionPackets.getValue()) event.cancel();
} }
@SubscribeEvent @SubscribeEvent
public void onAttack(AttackEntityEvent event) { private void onAttack(AttackEntityEvent event) {
if (cancelActionPackets.getValue()) event.cancel(); if (cancelActionPackets.getValue()) event.cancel();
} }
@@ -16,13 +16,13 @@ import org.lwjgl.glfw.GLFW;
public class Freelook extends Module { 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)); 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)); 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)); 0.1, 0, 2, 0.05));
private float yaw; private float yaw;
@@ -18,20 +18,20 @@ import java.awt.*;
public class Fullbright extends Module { 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() { public Fullbright() {
super("brilli brilli", super("brilli brilli",
"deshabilita la oscuridad (y aplica colores a los shaders)", "deshabilita la oscuridad (y aplica colores a los shaders)",
Category.CAMERA, Category.CAMERA,
GLFW.GLFW_KEY_K); GLFW.GLFW_KEY_K);
mode.onUpdate(mode -> { if (mode != Modes.POTION) disableNightVision(); }); mode.onUpdate(mode -> { if (mode != Modes.POTION) disableNightVision(); });
mode.onUpdate(mode -> { mode.onUpdate(mode -> {
boolean v = mode.equals(Modes.GAMMA); boolean v = mode.equals(Modes.GAMMA);
color.setVisible(v); color.setVisible(v);
if (v) disableNightVision(); if (v) disableNightVision();
}); });
} }
@@ -1,36 +1,34 @@
package me.retucio.sputnik.module.modules.camera; package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent; import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import me.retucio.sputnik.event.events.PerspectiveChangeEvent; import me.retucio.sputnik.event.events.render.PerspectiveChangeEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.KeySetting; import me.retucio.sputnik.module.setting.settings.KeySetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting; import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.KeyUtil;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
// continúa en CameraMixin // continúa en CameraMixin
public class PerspectivePlus extends Module { public class PerspectivePlus extends Module {
// ajustes // ajustes
private final SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true)); public final BooleanSetting clip = sgGeneral.add(new BooleanSetting(
public BooleanSetting clip = sgGeneral.add(new BooleanSetting(
"clip", "atravesar bloques con la cámara", true)); "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", "distancia", "distancia a la que está la cámara del jugador por defecto",
4, 1, 20, 0.2)); 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)", "sensibilidad del scroll", "sensibilidad de la rueda del ratón (0 para desactivar)",
1, 0, 8, 0.1)); 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)); GLFW.GLFW_KEY_LEFT_ALT));
private double distance; private double distance;
@@ -48,16 +46,16 @@ public class PerspectivePlus extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onPerspectiveChange(PerspectiveChangeEvent event) { private void onPerspectiveChange(PerspectiveChangeEvent event) {
distance = defaultDistance.getValue(); distance = defaultDistance.getValue();
} }
@SubscribeEvent @SubscribeEvent
public void onMouseScroll(MouseScrollEvent event) { private void onMouseScroll(MouseScrollEvent event) {
if (mc.options.getPerspective() == net.minecraft.client.option.Perspective.FIRST_PERSON if (mc.options.getPerspective() == net.minecraft.client.option.Perspective.FIRST_PERSON
|| mc.currentScreen != null || scrollSens.getValue() <= 0) return; || mc.currentScreen != null || scrollSens.getValue() <= 0) return;
if (KeyUtil.isKeyDown(scrollKey.getValue())) { if (scrollKey.isDown()) {
distance -= event.getVertical() / 4 * (scrollSens.getValue() * distance); distance -= event.getVertical() / 4 * (scrollSens.getValue() * distance);
event.cancel(); event.cancel();
} }
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.camera; package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent; 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.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; 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 class Rotations extends Module {
public NumberSetting yaw = sgGeneral.add(new NumberSetting("guiñada", "eje vertical - giro horizontal (yaw)", 0, -180, 180, 1)); private final 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 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)); private final 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 serverSide = sgGeneral.add(new BooleanSetting("serverside", "espamea paquetes de rotación al servidor", false));
public Rotations() { public Rotations() {
super("rotaciones", super("rotaciones",
@@ -30,15 +30,21 @@ public class Rotations extends Module {
mc.player.setPitch(pitch.getFloatValue()); mc.player.setPitch(pitch.getFloatValue());
if (serverSide.getValue()) if (serverSide.getValue())
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround( mc.player.networkHandler.sendPacket(
yaw.getFloatValue(), pitch.getFloatValue(), mc.player.isOnGround(), mc.player.horizontalCollision)); new PlayerMoveC2SPacket.LookAndOnGround(
yaw.getFloatValue(),
pitch.getFloatValue(),
mc.player.isOnGround(),
mc.player.horizontalCollision
)
);
} }
@SubscribeEvent @SubscribeEvent
public void onChangeRotation(ChangeRotationEvent event) { private void onChangeRotation(ChangeRotationEvent event) {
if (smooth.getValue() if (smooth.getValue()
&& (event.getYaw() != yaw.getFloatValue() || event.getPitch() != pitch.getFloatValue())){ && (event.getYaw() != yaw.getFloatValue() || event.getPitch() != pitch.getFloatValue())){
event.cancel(); event.cancel();
}} }
}
} }
@@ -1,38 +1,37 @@
package me.retucio.sputnik.module.modules.camera; package me.retucio.sputnik.module.modules.camera;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.GetFOVEvent; import me.retucio.sputnik.event.events.render.GetFOVEvent;
import me.retucio.sputnik.event.events.MouseScrollEvent; import me.retucio.sputnik.event.events.input.MouseScrollEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.KeySetting; import me.retucio.sputnik.module.setting.settings.KeySetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting; import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.KeyUtil;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
// continúa en GameRendererMixin // continúa en GameRendererMixin
public class Zoom extends Module { public class Zoom extends Module {
SettingGroup sgVisual = addSg(new SettingGroup("visual", true)); private final SettingGroup sgVisual = addSg(new SettingGroup("visual", true));
SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true)); private final SettingGroup sgScroll = addSg(new SettingGroup("scrolleo", true));
SettingGroup sgCam = addSg(new SettingGroup("cámara", 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)); 6, 1, 10, 0.1));
public BooleanSetting showHands = sgVisual.add(new BooleanSetting("mostrar manos", "esconde o muestra las manos al hacer zoom", true)); public final 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)); 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)); 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)); 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)); 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 boolean prevSmoothCam;
private double prevMouseSens; private double prevMouseSens;
@@ -90,7 +89,7 @@ public class Zoom extends Module {
@SubscribeEvent @SubscribeEvent
private void onMouseScroll(MouseScrollEvent event) { 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) { if (isEnabled() && scrollSens.getValue() > 0 && key) {
value += event.getVertical() * 0.25 * (scrollSens.getValue() * value); value += event.getVertical() * 0.25 * (scrollSens.getValue() * value);
if (value < 1) value = 1; if (value < 1) value = 1;
@@ -19,36 +19,36 @@ import me.retucio.sputnik.util.ChatUtil;
public class DiscordRPC extends Module { public class DiscordRPC extends Module {
SettingGroup sgImage = addSg(new SettingGroup("imágenes", false)); private final SettingGroup sgImage = addSg(new SettingGroup("imágenes", false));
SettingGroup sgButton = addSg(new SettingGroup("botón", false)); private final SettingGroup sgButton = addSg(new SettingGroup("botón", false));
// general // general
public StringSetting details = sgGeneral.add(new StringSetting( private final StringSetting details = sgGeneral.add(new StringSetting(
"detalles", "título", "detalles", "título",
"usando el mod de putas de retucio", "usando el mod de putas de retucio",
40 40
)); ));
public StringSetting state = sgGeneral.add(new StringSetting( private final StringSetting state = sgGeneral.add(new StringSetting(
"estado", "subtítulo", "estado", "subtítulo",
"(se lo está pasando en grande)", "(se lo está pasando en grande)",
40 40
)); ));
public StringSetting startTimestamp = sgGeneral.add(new StringSetting( 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)", "sello de tiempo", "sello de tiempo del comienzo de la actividad, siguiendo el unix epoch (dejar vacío para ahora)",
"", "",
20 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", "tipo de actividad", "qué tipo de actividad se está llevando a cabo",
ActivityTypes.class, ActivityTypes.PLAYING 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)", "id del bot", "id del bot a usar (obtener de discord.dev)",
"1314254766150258729", 20 "1314254766150258729", 20
)); ));
@@ -56,25 +56,25 @@ public class DiscordRPC extends Module {
// imágenes // imágenes
public StringSetting largeImageKey = sgImage.add(new StringSetting( private final StringSetting largeImageKey = sgImage.add(new StringSetting(
"imagen grande", "clave de la imagen grande", "imagen grande", "clave de la imagen grande",
"pengiun", "pengiun",
40 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", "texto de la imagen grande", "texto mostrado junto a la imagen grande",
"pengüino", "pengüino",
40 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", "imagen pequeña", "clave de la imagen pequeña",
"pengiun", "pengiun",
40 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", "texto de la imagen pequeña", "texto mostrado junto a la imagen pequeña",
"pengüino", "pengüino",
40 40
@@ -83,13 +83,13 @@ public class DiscordRPC extends Module {
// botón // 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", "texto del botón", "texto a mostrar en el botón",
"hola", "hola",
20 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:", "url del botón", "rickroll en gran 26 :wilted_rose:",
"https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
20 20
@@ -192,7 +192,7 @@ public class DiscordRPC extends Module {
} }
} }
public void reload() { private void reload() {
if (initialized && isEnabled()) { if (initialized && isEnabled()) {
rpc.shutdown(); rpc.shutdown();
try { try {
@@ -219,7 +219,7 @@ public class DiscordRPC extends Module {
return timestamp / 1000; return timestamp / 1000;
} }
public enum ActivityTypes { private enum ActivityTypes {
PLAYING("jugando"), PLAYING("jugando"),
STREAMING("streameando"), STREAMING("streameando"),
LISTENING("escuchando"), LISTENING("escuchando"),
@@ -24,12 +24,12 @@ import java.awt.*;
// módulo no visible solo para los ajustes de la interfaz (y del cliente en general) // módulo no visible solo para los ajustes de la interfaz (y del cliente en general)
public class GUI extends Module { public class GUI extends Module {
SettingGroup sgWidgets = addSg(new SettingGroup("widgets", true)); private final SettingGroup sgWidgets = addSg(new SettingGroup("widgets", true));
SettingGroup sgUi = addSg(new SettingGroup("interfaz", true)); private final SettingGroup sgUi = addSg(new SettingGroup("interfaz", true));
SettingGroup sgChat = addSg(new SettingGroup("chat", true)); private final SettingGroup sgChat = addSg(new SettingGroup("chat", true));
SettingGroup sgMisc = addSg(new SettingGroup("misc.", true)); private final SettingGroup sgMisc = addSg(new SettingGroup("misc.", true));
public ColorSetting color = sgGeneral.add(new ColorSetting( public final ColorSetting color = sgGeneral.add(new ColorSetting(
"color", "color",
"color principal de la interfaz y el mod", "color principal de la interfaz y el mod",
new Color(70, 20, 210, 230), new Color(70, 20, 210, 230),
@@ -37,7 +37,7 @@ public class GUI extends Module {
)); ));
// números negativos para deslizamiento inverso, 0 para desactivar // números negativos para deslizamiento inverso, 0 para desactivar
public NumberSetting scrollSens = sgWidgets.add(new NumberSetting( public final NumberSetting scrollSens = sgWidgets.add(new NumberSetting(
"sensibilidad del scroll", "sensibilidad del scroll",
"qué tan sensible es la interfaz a la rueda del ratón", "qué tan sensible es la interfaz a la rueda del ratón",
5, 5,
@@ -45,55 +45,60 @@ public class GUI extends Module {
15, 15,
0.5 0.5
)); ));
public BooleanSetting scrollBar = sgWidgets.add(new BooleanSetting(
public final BooleanSetting scrollBar = sgWidgets.add(new BooleanSetting(
"barra de desplazamiento", "barra de desplazamiento",
"renderizar una barra de desplazamiento a la derecha de la interfaz", "renderizar una barra de desplazamiento a la derecha de la interfaz",
true true
)); ));
public BooleanSetting searchBar = sgWidgets.add(new BooleanSetting( public final BooleanSetting searchBar = sgWidgets.add(new BooleanSetting(
"barra de búsqueda", "barra de búsqueda",
"renderizar una barra de búsqueda que filtra resultados en todos los marcos abiertos", "renderizar una barra de búsqueda que filtra resultados en todos los marcos abiertos",
true true
)); ));
public BooleanSetting matchCase = sgWidgets.add(new BooleanSetting(
public final BooleanSetting matchCase = sgWidgets.add(new BooleanSetting(
"distinguir mayúsculas", "distinguir mayúsculas",
"la búsqueda es sensible a mayúsculas y minúsculas", "la búsqueda es sensible a mayúsculas y minúsculas",
false false
)); ));
// ^^^ no sé de qué sirve porque está todo en minúsculas pero bueno // ^^^ no sé de qué sirve porque está todo en minúsculas pero bueno
public BooleanSetting blur = sgUi.add(new BooleanSetting( public final BooleanSetting blur = sgUi.add(new BooleanSetting(
"desenfoque", "desenfoque",
"desenfocar el fondo mientras la interfaz está abierta", "desenfocar el fondo mientras la interfaz está abierta",
true true
)); ));
public StringSetting watermark = sgUi.add(new StringSetting(
public final StringSetting watermark = sgUi.add(new StringSetting(
"marca de agua", "marca de agua",
"marca de agua para interfaces (dejar vacío para desactivar)", "marca de agua para interfaces (dejar vacío para desactivar)",
Sputnik.getVersionName(), Sputnik.getVersionName(),
40 40
)); ));
public StringSetting commandPrefix = sgChat.add(new StringSetting( public final StringSetting commandPrefix = sgChat.add(new StringSetting(
"prefijo", "prefijo",
"prefijo de los comandos", "prefijo de los comandos",
"$", "$",
10 10
)); ));
public StringSetting chatName = sgChat.add(new StringSetting(
public final StringSetting chatName = sgChat.add(new StringSetting(
"nombre", "nombre",
"qué nombre usar en notificaciones por el chat", "qué nombre usar en notificaciones por el chat",
"smegma", "smegma",
20 20
)); ));
public BooleanSetting multipleKeybinds = sgMisc.add(new BooleanSetting( public final BooleanSetting multipleKeybinds = sgMisc.add(new BooleanSetting(
"teclas multimódulo", "teclas multimódulo",
"permitir asignar la misma tecla a más de un módulo o acción", "permitir asignar la misma tecla a más de un módulo o acción",
false false
)); ));
public StringSetting windowTitle = sgMisc.add(new StringSetting(
public final StringSetting windowTitle = sgMisc.add(new StringSetting(
"título", "título",
"título de la ventana", "título de la ventana",
Sputnik.getVersionName(), Sputnik.getVersionName(),
@@ -20,9 +20,9 @@ import java.awt.*;
public class HUD extends Module { public class HUD extends Module {
SettingGroup sgEditor = addSg(new SettingGroup("editor", true)); private final SettingGroup sgEditor = addSg(new SettingGroup("editor", true));
SettingGroup sgDisplay = addSg(new SettingGroup("visualización", true)); private final SettingGroup sgDisplay = addSg(new SettingGroup("visualización", true));
SettingGroup sgElements = addSg(new SettingGroup("elementos", false)); private final SettingGroup sgElements = addSg(new SettingGroup("elementos", false));
// editor // editor
public KeySetting editorKey = sgEditor.add(new KeySetting( public KeySetting editorKey = sgEditor.add(new KeySetting(
@@ -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.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.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; 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 class AttributeSwapper extends Module {
public NumberSetting slot = sgGeneral.add(new NumberSetting("slot", "slot al que cambiar", 1, 1, 9, 1)); private final 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)); private final 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 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 delay = 0;
private int prevSlot = -1; private int prevSlot = -1;
@@ -19,7 +19,7 @@ public class AttributeSwapper extends Module {
public AttributeSwapper() { public AttributeSwapper() {
super("attribute-swapper", super("attribute-swapper",
"utiliza el \"attribute swapping\" entre dos herramientas para negar daño de durabilidad o aplicar encantamientos adicionales a estas", "utiliza el \"attribute swapping\" entre dos herramientas para negar daño de durabilidad o aplicar encantamientos adicionales a estas",
Category.PLAYER); Category.COMBAT);
} }
@Override @Override
@@ -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.SubscribeEvent;
import me.retucio.sputnik.event.events.PacketEvent; import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; import me.retucio.sputnik.module.setting.settings.BooleanSetting;
@@ -20,13 +20,13 @@ import net.minecraft.util.math.Vec3d;
// https://github.com/etianl/Trouser-Streak/blob/ce27abd30435ca2b43a5e5546f5b070c07c6291a/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java // https://github.com/etianl/Trouser-Streak/blob/ce27abd30435ca2b43a5e5546f5b070c07c6291a/src/main/java/pwn/noobs/trouserstreak/modules/MaceKill.java
public class MaceKill extends Module { public class MaceKill extends Module {
public BooleanSetting max = sgGeneral.add(new BooleanSetting( private final BooleanSetting max = sgGeneral.add(new BooleanSetting(
"máxima potencia", "máxima potencia",
"simular caída desde el hueco con aire más cercano en un rango de 170 bloques", "simular caída desde el hueco con aire más cercano en un rango de 170 bloques",
false false
)); ));
public NumberSetting height = sgGeneral.add(new NumberSetting( private final NumberSetting height = sgGeneral.add(new NumberSetting(
"altura", "altura",
"altura de la que simular la caída", "altura de la que simular la caída",
22, 22,
@@ -35,14 +35,14 @@ public class MaceKill extends Module {
1 1
)); ));
public BooleanSetting preventDeath = sgGeneral.add(new BooleanSetting( private final BooleanSetting preventDeath = sgGeneral.add(new BooleanSetting(
"prevenir muerte", "prevenir muerte",
"prevenir la muerte por daño de caída si el ataque fue bloqueado, cancelando los paquetes de movimiento", "prevenir la muerte por daño de caída si el ataque fue bloqueado, cancelando los paquetes de movimiento",
true true
)); ));
public MaceKill() { public MaceKill() {
super("estampaescrotos", "estampa escrotos ajenos", Category.PLAYER); super("estampaescrotos", "estampa escrotos ajenos", Category.COMBAT);
max.onUpdate(v -> height.setVisible(!v)); max.onUpdate(v -> height.setVisible(!v));
} }
@@ -53,6 +53,13 @@ public class MaceKill extends Module {
if (mc.player.getMainHandStack().getItem() == Items.MACE if (mc.player.getMainHandStack().getItem() == Items.MACE
&& event.getPacket() instanceof PlayerInteractEntityC2SPacket packet && event.getPacket() instanceof PlayerInteractEntityC2SPacket packet
&& packet.type.getType() == PlayerInteractEntityC2SPacket.InteractType.ATTACK) { && 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 { try {
if (mc.world.getEntityById(packet.entityId) instanceof LivingEntity target) { if (mc.world.getEntityById(packet.entityId) instanceof LivingEntity target) {
@@ -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 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)); FontMode.class, FontMode.NORMAL));
String text; String text;
@@ -136,7 +136,7 @@ public class AnvilFont extends Module {
} }
} }
public enum FontMode { private enum FontMode {
NORMAL("normal"), NORMAL("normal"),
UPPERCASE("mayúsculas"), UPPERCASE("mayúsculas"),
CIRCLED("redondo"), CIRCLED("redondo"),
@@ -1,6 +1,6 @@
package me.retucio.sputnik.module.modules.misc; 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.event.SubscribeEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
@@ -15,17 +15,17 @@ import java.util.WeakHashMap;
public class BossbarStack extends Module { 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", "apilar barras", "apilar las bossbars",
true 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", "esconder nombres", "no renderiza el nombre de los bosses",
false false
)); ));
public NumberSetting spaceReduction = sgGeneral.add(new NumberSetting( private final NumberSetting spaceReduction = sgGeneral.add(new NumberSetting(
"reducción de espacio", "reducción de espacio",
"cuánto reducir el espacio entre bossbars", "cuánto reducir el espacio entre bossbars",
0, 0,
@@ -5,9 +5,9 @@ import it.unimi.dsi.fastutil.ints.IntArrayList;
import it.unimi.dsi.fastutil.ints.IntList; import it.unimi.dsi.fastutil.ints.IntList;
import me.retucio.sputnik.command.CommandManager; import me.retucio.sputnik.command.CommandManager;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.ClientClickEvent; import me.retucio.sputnik.event.events.input.ClientClickEvent;
import me.retucio.sputnik.event.events.ReceiveMessageEvent; import me.retucio.sputnik.event.events.network.ReceiveMessageEvent;
import me.retucio.sputnik.event.events.SendMessageEvent; import me.retucio.sputnik.event.events.network.SendMessageEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
@@ -46,15 +46,15 @@ public class ChatPlus extends Module {
// ajustes // ajustes
SettingGroup sgChat = addSg(new SettingGroup("funcionamiento del chat", true)); 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)); private final 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)); private final 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)); 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)); private final 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 final 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)); private final 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 final 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", public final NumberSetting chatHistoryExtraLength = sgChat.add(new NumberSetting("expandir chat", "cuántas líneas añadir al historial del chat",
0, 0, 1000, 1)); 0, 0, 1000, 1));
public ChatPlus() { public ChatPlus() {
@@ -68,6 +68,7 @@ public class ChatPlus extends Module {
} }
public final IntList lines = new IntArrayList(); public final IntList lines = new IntArrayList();
private record CustomHeadEntry(String prefix, Identifier texture) {} private record CustomHeadEntry(String prefix, Identifier texture) {}
private static final List<CustomHeadEntry> CUSTOM_HEAD_ENTRIES = new ArrayList<>(); private static final List<CustomHeadEntry> CUSTOM_HEAD_ENTRIES = new ArrayList<>();
private SimpleDateFormat dateFormat; 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*)?)"); private static final Pattern coordRegex = Pattern.compile("(?<x>-?\\d{3,}(?:\\.\\d*)?)(?:\\s+(?<y>-?\\d{1,3}(?:\\.\\d*)?))?\\s+(?<z>-?\\d{3,}(?:\\.\\d*)?)");
@SubscribeEvent @SubscribeEvent
public void onReceiveMessage(ReceiveMessageEvent event) { private void onReceiveMessage(ReceiveMessageEvent event) {
Text message = event.getMessage(); Text message = event.getMessage();
// registrar mensajes para evitar su eliminación // registrar mensajes para evitar su eliminación
@@ -126,7 +127,7 @@ public class ChatPlus extends Module {
} }
@SuppressWarnings("DataFlowIssue") @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; if (!isEnabled() || !showHeads.getValue()) return;
// dibujar la cabeza al principio del mensaje // 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 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; private OtherClientPlayerEntity player = null;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.misc; package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.command.CommandManager; 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.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
@@ -31,15 +31,15 @@ import java.io.IOException;
public class ScreenshotPlus extends Module { 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)); ScreenshotActions.class, ScreenshotActions.NONE));
public BooleanSetting saveButton = sgButtons.add(new BooleanSetting("botón de guardar", "mostrar botón para guardar la captura localmente", true)); private final 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)); private final 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)); private final 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 discardButton = sgButtons.add(new BooleanSetting("botón de descartar", "mostrar botón para descartar la captura", true));
private NativeImage screenshot; private NativeImage screenshot;
private File screenshotFile; private File screenshotFile;
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.misc; package me.retucio.sputnik.module.modules.misc;
import me.retucio.sputnik.event.SubscribeEvent; 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.mixin.accessor.HandledScreenAccessor;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
@@ -29,8 +29,8 @@ import java.util.HashMap;
public class ShulkerPeek extends Module { 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 final 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 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<>(); public static final HashMap<Item, Color> SHULKER_COLORS = new HashMap<>();
@@ -60,7 +60,7 @@ public class ShulkerPeek extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onKey(KeyEvent event) { private void onKey(KeyEvent event) {
if (mc.player == null) return; if (mc.player == null) return;
if (event.getKey() != previewKey.getValue()) return; if (event.getKey() != previewKey.getValue()) return;
@@ -1,9 +1,9 @@
package me.retucio.sputnik.module.modules.movement; package me.retucio.sputnik.module.modules.movement;
import com.google.common.eventbus.Subscribe; import com.google.common.eventbus.Subscribe;
import me.retucio.sputnik.event.BoatMoveEvent; import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.PacketEvent; import me.retucio.sputnik.event.events.network.PacketEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; import me.retucio.sputnik.module.setting.settings.BooleanSetting;
@@ -13,7 +13,7 @@ import net.minecraft.util.math.Vec3d;
public class BoatFly extends Module { public class BoatFly extends Module {
public NumberSetting speed = sgGeneral.add(new NumberSetting( private final NumberSetting speed = sgGeneral.add(new NumberSetting(
"velocidad horizontal", "velocidad horizontal",
"velocidad a la que moverse horizontalmente", "velocidad a la que moverse horizontalmente",
2, 2,
@@ -22,7 +22,7 @@ public class BoatFly extends Module {
0.1 0.1
)); ));
public NumberSetting vSpeed = sgGeneral.add(new NumberSetting( private final NumberSetting vSpeed = sgGeneral.add(new NumberSetting(
"velocidad vertical", "velocidad vertical",
"velocidad a la que moverse verticalmente", "velocidad a la que moverse verticalmente",
1, 1,
@@ -31,7 +31,7 @@ public class BoatFly extends Module {
0.1 0.1
)); ));
public NumberSetting stepHeight = sgGeneral.add(new NumberSetting( public final NumberSetting stepHeight = sgGeneral.add(new NumberSetting(
"altura de escalonado", "altura de escalonado",
"como escalones pero pal barco", "como escalones pero pal barco",
0.5, 0.5,
@@ -40,7 +40,7 @@ public class BoatFly extends Module {
0.1 0.1
)); ));
public BooleanSetting cancelPackets = sgGeneral.add(new BooleanSetting( private final BooleanSetting cancelPackets = sgGeneral.add(new BooleanSetting(
"cancelar paquetes", "cancelar paquetes",
"cancelar paquetes de movimiento del barco enviados por el servidor", "cancelar paquetes de movimiento del barco enviados por el servidor",
false false
@@ -73,7 +73,7 @@ public class BoatFly extends Module {
double cos = Math.cos(Math.toRadians(yaw)); double cos = Math.cos(Math.toRadians(yaw));
double x = speed * dz * sin; double x = speed * dz * sin;
double y = speed * dy; double y = vSpeed.getValue() * dy;
double z = speed * dz * -cos; double z = speed * dz * -cos;
x += speed * dx * -cos; x += speed * dx * -cos;
@@ -13,8 +13,12 @@ public class Dolphin extends Module {
public void onTick() { public void onTick() {
if (mc.player == null) return; if (mc.player == null) return;
if (mc.player.isSubmergedInWater()) { if (mc.player.isTouchingWater()) {
if (!mc.player.isJumping()) mc.player.jump(); mc.player.setSwimming(true);
if (mc.player.isSwimming() && mc.player.isSubmergedInWater()) {
mc.player.jump();
}
} }
} }
} }
@@ -11,7 +11,7 @@ import net.minecraft.util.math.Vec3d;
public class ElytraFly extends Module { public class ElytraFly extends Module {
public NumberSetting speed = sgGeneral.add(new NumberSetting( private final NumberSetting speed = sgGeneral.add(new NumberSetting(
"velocidad", "velocidad",
"mi madre es parcialmente vagabunda", "mi madre es parcialmente vagabunda",
1, 1,
@@ -6,7 +6,7 @@ import me.retucio.sputnik.module.setting.settings.NumberSetting;
public class Headhitters extends Module { public class Headhitters extends Module {
public NumberSetting delay = sgGeneral.add(new NumberSetting("delay", "delay de saltos", 0, 0, 20, 1)); private final NumberSetting delay = sgGeneral.add(new NumberSetting("delay", "delay de saltos", 0, 0, 20, 1));
public Headhitters() { public Headhitters() {
super("headhitters", super("headhitters",
@@ -1,7 +1,7 @@
package me.retucio.sputnik.module.modules.movement; package me.retucio.sputnik.module.modules.movement;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.UseItemEvent; import me.retucio.sputnik.event.events.interact.UseItemEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.NumberSetting; import me.retucio.sputnik.module.setting.settings.NumberSetting;
@@ -16,7 +16,7 @@ public class InfiniteElytra extends Module {
private float pitch; private float pitch;
private double lowestY; private double lowestY;
public NumberSetting pitchDown = sgGeneral.add(new NumberSetting( private final NumberSetting pitchDown = sgGeneral.add(new NumberSetting(
"cabeceo (abajo)", "cabeceo (abajo)",
"cabeceo al ir hacia abajo", "cabeceo al ir hacia abajo",
30, 30,
@@ -26,7 +26,7 @@ public class InfiniteElytra extends Module {
)); ));
public NumberSetting pitchUp = sgGeneral.add(new NumberSetting( private final NumberSetting pitchUp = sgGeneral.add(new NumberSetting(
"cabeceo (arriba)", "cabeceo (arriba)",
"cabeceo al ir hacia arriba", "cabeceo al ir hacia arriba",
-48, -48,
@@ -35,7 +35,7 @@ public class InfiniteElytra extends Module {
1 1
)); ));
public NumberSetting pitchDownSpeed = sgGeneral.add(new NumberSetting( private final NumberSetting pitchDownSpeed = sgGeneral.add(new NumberSetting(
"velocidad de cabeceo (abajo)", "velocidad de cabeceo (abajo)",
"velocidad del cabeceo al ir hacia abajo", "velocidad del cabeceo al ir hacia abajo",
0.5, 0.5,
@@ -44,7 +44,7 @@ public class InfiniteElytra extends Module {
0.1 0.1
)); ));
public NumberSetting pitchUpVelocity = sgGeneral.add(new NumberSetting( private final NumberSetting pitchUpVelocity = sgGeneral.add(new NumberSetting(
"velocidad de cabeceo (arriba)", "velocidad de cabeceo (arriba)",
"velocidad del cabeceo al ir hacia arriba", "velocidad del cabeceo al ir hacia arriba",
2, 2,
@@ -53,7 +53,7 @@ public class InfiniteElytra extends Module {
0.1 0.1
)); ));
public NumberSetting ticksCollisionLookAhead = sgGeneral.add(new NumberSetting( private final NumberSetting ticksCollisionLookAhead = sgGeneral.add(new NumberSetting(
"precaución de colisión", "precaución de colisión",
"precaución de colisión en ticks", "precaución de colisión en ticks",
10, 10,
@@ -102,7 +102,7 @@ public class InfiniteElytra extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onUseItem(UseItemEvent event) { private void onUseItem(UseItemEvent event) {
if (mc.player == null) return; if (mc.player == null) return;
if (mc.player.getStackInHand(event.getHand()).getItem() == Items.FIREWORK_ROCKET && !mc.player.isSpectator() && mc.player.isGliding()) { if (mc.player.getStackInHand(event.getHand()).getItem() == Items.FIREWORK_ROCKET && !mc.player.isSpectator() && mc.player.isGliding()) {
pitch = pitchUp.getFloatValue(); pitch = pitchUp.getFloatValue();
@@ -125,7 +125,7 @@ public class InfiniteElytra extends Module {
return false; return false;
} }
public enum FlyState { private enum FlyState {
NOT_FLYING, NOT_FLYING,
GLIDING_DOWN, GLIDING_DOWN,
PITCHING_DOWN; PITCHING_DOWN;
@@ -1,14 +1,13 @@
package me.retucio.sputnik.module.modules.movement; package me.retucio.sputnik.module.modules.movement;
import me.retucio.sputnik.event.SubscribeEvent; import me.retucio.sputnik.event.SubscribeEvent;
import me.retucio.sputnik.event.events.BlockShapeEvent; import me.retucio.sputnik.event.events.interact.BlockShapeEvent;
import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.SettingGroup; import me.retucio.sputnik.module.setting.SettingGroup;
import me.retucio.sputnik.module.setting.settings.BooleanSetting; import me.retucio.sputnik.module.setting.settings.BooleanSetting;
import me.retucio.sputnik.module.setting.settings.EnumSetting; import me.retucio.sputnik.module.setting.settings.EnumSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting; import me.retucio.sputnik.module.setting.settings.NumberSetting;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.fluid.FluidState; import net.minecraft.fluid.FluidState;
@@ -18,22 +17,22 @@ import net.minecraft.util.shape.VoxelShapes;
public class Jesus extends Module { public class Jesus extends Module {
SettingGroup sgBlocks = addSg(new SettingGroup("bloques", true)); private final SettingGroup sgBlocks = addSg(new SettingGroup("bloques", true));
public EnumSetting<JesusMode> mode = sgGeneral.add(new EnumSetting<>( private final EnumSetting<JesusMode> mode = sgGeneral.add(new EnumSetting<>(
"modo", "modo",
"cómo caminar", "cómo caminar",
JesusMode.class, JesusMode.class,
JesusMode.SOLID JesusMode.SOLID
)); ));
public BooleanSetting allowSneaking = sgGeneral.add(new BooleanSetting( private final BooleanSetting allowSneaking = sgGeneral.add(new BooleanSetting(
"permitir agacharse", "permitir agacharse",
"te permite usar el botón de agacharse para sumergirte en el agua", "te permite usar el botón de agacharse para sumergirte en el agua",
true true
)); ));
public NumberSetting minFallHeight = sgGeneral.add(new NumberSetting( private final NumberSetting minFallHeight = sgGeneral.add(new NumberSetting(
"distancia de caída", "distancia de caída",
"distancia de caída mínima para sumergirse en vez de impactar", "distancia de caída mínima para sumergirse en vez de impactar",
3, 3,
@@ -42,19 +41,19 @@ public class Jesus extends Module {
0.1 0.1
)); ));
public BooleanSetting water = sgBlocks.add(new BooleanSetting( private final BooleanSetting water = sgBlocks.add(new BooleanSetting(
"agua", "agua",
"permitir caminar en agua", "permitir caminar en agua",
true true
)); ));
public BooleanSetting lava = sgBlocks.add(new BooleanSetting( private final BooleanSetting lava = sgBlocks.add(new BooleanSetting(
"lava", "lava",
"permitir caminar en lava", "permitir caminar en lava",
true true
)); ));
public BooleanSetting powderedSnow = sgBlocks.add(new BooleanSetting( private final BooleanSetting powderedSnow = sgBlocks.add(new BooleanSetting(
"nieve en polvo", "nieve en polvo",
"permitir caminar en nieve en polvo", "permitir caminar en nieve en polvo",
true true
@@ -98,7 +97,7 @@ public class Jesus extends Module {
} }
@SubscribeEvent @SubscribeEvent
public void onBlockShape(BlockShapeEvent event) { private void onBlockShape(BlockShapeEvent event) {
if (event.getState().getBlock() == Blocks.LAVA && !lava.getValue()) return; if (event.getState().getBlock() == Blocks.LAVA && !lava.getValue()) return;
if (event.getState().getBlock() == Blocks.WATER && !water.getValue()) return; if (event.getState().getBlock() == Blocks.WATER && !water.getValue()) return;
if (event.getState().getBlock() == Blocks.POWDER_SNOW && !powderedSnow.getValue()) return; if (event.getState().getBlock() == Blocks.POWDER_SNOW && !powderedSnow.getValue()) return;
@@ -122,7 +121,7 @@ public class Jesus extends Module {
return !state.isEmpty() && pos.y - blockPos.getY() <= state.getHeight(); return !state.isEmpty() && pos.y - blockPos.getY() <= state.getHeight();
} }
public enum JesusMode { private enum JesusMode {
VIBRATE("vibrador"), VIBRATE("vibrador"),
SOLID("sólido"); SOLID("sólido");
@@ -11,22 +11,22 @@ import net.minecraft.world.RaycastContext;
public class ReverseStep extends Module { public class ReverseStep extends Module {
public NumberSetting height = sgGeneral.add(new NumberSetting( private final NumberSetting height = sgGeneral.add(new NumberSetting(
"altura", "altura máxima a bajar", "altura", "altura máxima a bajar",
1, 0, 20, 0.1 1, 0, 20, 0.1
)); ));
public NumberSetting velocity = sgGeneral.add(new NumberSetting( private final NumberSetting velocity = sgGeneral.add(new NumberSetting(
"velocidad", "velocidad a la que caer en bps", "velocidad", "velocidad a la que caer",
1, 0, 10, 0.1 1, 0, 10, 0.1
)); ));
public BooleanSetting jumping = sgGeneral.add(new BooleanSetting( private final BooleanSetting jumping = sgGeneral.add(new BooleanSetting(
"saltar", "permitir saltar", "saltar", "permitir saltar",
true true
)); ));
public BooleanSetting disableInWater = sgGeneral.add(new BooleanSetting( private final BooleanSetting disableInWater = sgGeneral.add(new BooleanSetting(
"desactivar en agua", ".", "desactivar en agua", ".",
true true
)); ));
@@ -52,7 +52,8 @@ public class ReverseStep extends Module {
double dropHeight = getHeight(); double dropHeight = getHeight();
if (dropHeight > 0 && dropHeight <= height.getValue()) { if (dropHeight > 0 && dropHeight <= height.getValue()) {
mc.player.addVelocity(0, -height.getValue() + mc.player.getVelocity().getY(), 0); double dy = (-height.getValue() + mc.player.getVelocity().getY()) * velocity.getValue();
mc.player.addVelocity(0, dy, 0);
} }
} }
Loaded 100 of 158 files, more files were not shown because too many files have changed in this diff. Show more