Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c993d4fdac | ||
|
|
a9fd8da7f5 | ||
|
|
9b6d037b6c | ||
|
|
86594f1ca3 |
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version "${loom_version}"
|
id 'fabric-loom' version "${loom_version}"
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = project.mod_version
|
version = project.mod_version
|
||||||
|
|||||||
+5
-12
@@ -1,4 +1,4 @@
|
|||||||
# v2.8
|
# v3.2
|
||||||
|
|
||||||
## novedades
|
## novedades
|
||||||
|
|
||||||
@@ -6,19 +6,12 @@
|
|||||||
|
|
||||||
#### módulos nuevos:
|
#### módulos nuevos:
|
||||||
|
|
||||||
|
- dupe de bundle: robado de .gg/dupes, usando un bundle y un libro de bookbot, dupea 63 del ítem deseado
|
||||||
|
- j. k. rowling: rellena libros con caca de manera automática
|
||||||
|
|
||||||
### arreglos / mejoras
|
### arreglos / mejoras
|
||||||
|
|
||||||
- arreglado el gradiente del selector de colores
|
- ahora el aviso de actualizaciones ya funciona bien
|
||||||
- ahora el marco del preview del color en el botón del ajuste de color será el color complementario (rgb, no ryb) del color seleccionado
|
|
||||||
|
|
||||||
- ahora puedes borrar palabras enteras con ctrl + borrar
|
|
||||||
|
|
||||||
- mejoras al HUD:
|
|
||||||
- movimiento axial: centra los elementos más fácilmente
|
|
||||||
- movimiento con flechas: mueve el elemento seleccionado con las flechas
|
|
||||||
- ahora se puede abrir y usar el editor aun sin estar en un mundo
|
|
||||||
- más previews de elementos coinciden con su valor actual
|
|
||||||
- al parecer he arreglado sin querer un problema que había que no te dejaba seleccionar correctamente elementos del hud
|
|
||||||
|
|
||||||
## problemas reconocidos
|
## problemas reconocidos
|
||||||
|
|
||||||
|
|||||||
@@ -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
@@ -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.8
|
mod_version=3.1
|
||||||
maven_group=me.retucio
|
maven_group=me.retucio
|
||||||
archives_base_name=sputnik
|
archives_base_name=sputnik
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package me.retucio.sputnik;
|
package me.retucio.sputnik;
|
||||||
|
|
||||||
|
import com.ibm.icu.text.CaseMap;
|
||||||
import me.retucio.sputnik.cape.CapeManager;
|
import me.retucio.sputnik.cape.CapeManager;
|
||||||
import me.retucio.sputnik.command.CommandManager;
|
import me.retucio.sputnik.command.CommandManager;
|
||||||
import me.retucio.sputnik.command.commands.BindCommand;
|
import me.retucio.sputnik.command.commands.BindCommand;
|
||||||
@@ -10,6 +10,7 @@ import me.retucio.sputnik.config.ConfigManager;
|
|||||||
import me.retucio.sputnik.event.EventBus;
|
import me.retucio.sputnik.event.EventBus;
|
||||||
import me.retucio.sputnik.event.SubscribeEvent;
|
import me.retucio.sputnik.event.SubscribeEvent;
|
||||||
import me.retucio.sputnik.event.events.ShutdownEvent;
|
import me.retucio.sputnik.event.events.ShutdownEvent;
|
||||||
|
import me.retucio.sputnik.event.events.interact.OpenScreenEvent;
|
||||||
import me.retucio.sputnik.event.events.sputnik.LoadCapeManagerEvent;
|
import me.retucio.sputnik.event.events.sputnik.LoadCapeManagerEvent;
|
||||||
import me.retucio.sputnik.event.events.sputnik.LoadClickGUIEvent;
|
import me.retucio.sputnik.event.events.sputnik.LoadClickGUIEvent;
|
||||||
import me.retucio.sputnik.event.events.sputnik.LoadCommandManagerEvent;
|
import me.retucio.sputnik.event.events.sputnik.LoadCommandManagerEvent;
|
||||||
@@ -22,6 +23,7 @@ import me.retucio.sputnik.module.modules.client.HUD;
|
|||||||
import me.retucio.sputnik.ui.hud.HudRenderer;
|
import me.retucio.sputnik.ui.hud.HudRenderer;
|
||||||
import me.retucio.sputnik.ui.screen.ClickGUI;
|
import me.retucio.sputnik.ui.screen.ClickGUI;
|
||||||
import me.retucio.sputnik.ui.hud.HudEditorScreen;
|
import me.retucio.sputnik.ui.hud.HudEditorScreen;
|
||||||
|
import me.retucio.sputnik.ui.screen.UpdateScreen;
|
||||||
import me.retucio.sputnik.ui.widgets.buttons.settings.BindButton;
|
import me.retucio.sputnik.ui.widgets.buttons.settings.BindButton;
|
||||||
import me.retucio.sputnik.ui.widgets.buttons.SettingButton;
|
import me.retucio.sputnik.ui.widgets.buttons.SettingButton;
|
||||||
import me.retucio.sputnik.ui.widgets.buttons.settings.TextButton;
|
import me.retucio.sputnik.ui.widgets.buttons.settings.TextButton;
|
||||||
@@ -42,6 +44,7 @@ import net.minecraft.SharedConstants;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.ChatScreen;
|
import net.minecraft.client.gui.screen.ChatScreen;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.AbstractCommandBlockScreen;
|
import net.minecraft.client.gui.screen.ingame.AbstractCommandBlockScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen;
|
import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.AnvilScreen;
|
import net.minecraft.client.gui.screen.ingame.AnvilScreen;
|
||||||
@@ -50,6 +53,13 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
import java.net.http.HttpClient;
|
||||||
|
import java.net.http.HttpRequest;
|
||||||
|
import java.net.http.HttpResponse;
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.Executors;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
|
||||||
public class Sputnik implements ClientModInitializer {
|
public class Sputnik implements ClientModInitializer {
|
||||||
@@ -82,6 +92,8 @@ public class Sputnik implements ClientModInitializer {
|
|||||||
mc = MinecraftClient.getInstance();
|
mc = MinecraftClient.getInstance();
|
||||||
ConfigManager.load();
|
ConfigManager.load();
|
||||||
|
|
||||||
|
VersionChecker.check();
|
||||||
|
|
||||||
EVENT_BUS.register(this);
|
EVENT_BUS.register(this);
|
||||||
|
|
||||||
EVENT_BUS.register(ChatUtil.class);
|
EVENT_BUS.register(ChatUtil.class);
|
||||||
@@ -93,8 +105,7 @@ public class Sputnik implements ClientModInitializer {
|
|||||||
EVENT_BUS.register(RenderUtil.class);
|
EVENT_BUS.register(RenderUtil.class);
|
||||||
|
|
||||||
Lists.init();
|
Lists.init();
|
||||||
|
Textures.init();
|
||||||
Textures.registerAll();
|
|
||||||
|
|
||||||
CapeManager.INSTANCE = new CapeManager();
|
CapeManager.INSTANCE = new CapeManager();
|
||||||
EVENT_BUS.post(new LoadCapeManagerEvent());
|
EVENT_BUS.post(new LoadCapeManagerEvent());
|
||||||
@@ -126,6 +137,7 @@ public class Sputnik implements ClientModInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ModuleManager.INSTANCE.getEnabledModules().forEach(Module::onTick);
|
ModuleManager.INSTANCE.getEnabledModules().forEach(Module::onTick);
|
||||||
|
mc.getWindow().setTitle(ClientSettingsFrame.guiSettings.windowTitle.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -187,8 +199,6 @@ public class Sputnik implements ClientModInitializer {
|
|||||||
if (key != ClientSettingsFrame.guiSettings.getKey() || anyFocused || isOnTypingScreen())
|
if (key != ClientSettingsFrame.guiSettings.getKey() || anyFocused || isOnTypingScreen())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// al parecer esto hace que con la tecla de la interfaz puedas ir cambiando de splash text en la pantalla del título
|
|
||||||
// pero me ha hecho gracia así que así se queda
|
|
||||||
if (mc.currentScreen != ClickGUI.INSTANCE) {
|
if (mc.currentScreen != ClickGUI.INSTANCE) {
|
||||||
prevScreen = mc.currentScreen;
|
prevScreen = mc.currentScreen;
|
||||||
mc.setScreen(ClickGUI.INSTANCE);
|
mc.setScreen(ClickGUI.INSTANCE);
|
||||||
@@ -232,6 +242,16 @@ public class Sputnik implements ClientModInitializer {
|
|||||||
|| mc.currentScreen instanceof AbstractCommandBlockScreen;
|
|| mc.currentScreen instanceof AbstractCommandBlockScreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// notificar al usuario de que hay una actualización disponible, si la hay
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onSetScreen(OpenScreenEvent event) {
|
||||||
|
if (VersionChecker.shouldShowScreen && event.getScreen() instanceof TitleScreen) {
|
||||||
|
event.cancel();
|
||||||
|
VersionChecker.shouldShowScreen = false;
|
||||||
|
mc.execute(() -> mc.currentScreen = new UpdateScreen());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onStop(ShutdownEvent event) {
|
public void onStop(ShutdownEvent event) {
|
||||||
ConfigManager.save();
|
ConfigManager.save();
|
||||||
|
|||||||
@@ -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;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ package me.retucio.sputnik.command.commands;
|
|||||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import me.retucio.sputnik.command.Command;
|
import me.retucio.sputnik.command.Command;
|
||||||
import me.retucio.sputnik.mixin.accessor.ClientPlayNetworkHandlerAccessor;
|
import me.retucio.sputnik.mixin.accessors.ClientPlayNetworkHandlerAccessor;
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.command.CommandSource;
|
import net.minecraft.command.CommandSource;
|
||||||
import net.minecraft.network.encryption.NetworkEncryptionUtils;
|
import net.minecraft.network.encryption.NetworkEncryptionUtils;
|
||||||
|
|||||||
@@ -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,9 +0,0 @@
|
|||||||
package me.retucio.sputnik.event.events;
|
|
||||||
|
|
||||||
import me.retucio.sputnik.event.Event;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see me.retucio.sputnik.mixin.ChunkOcclusionDataBuilderMixin#onChunkOcclusion
|
|
||||||
*/
|
|
||||||
public class ChunkOcclusionEvent extends Event {}
|
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
package me.retucio.sputnik.event.events;
|
package me.retucio.sputnik.event.events;
|
||||||
|
|
||||||
import me.retucio.sputnik.event.Event;
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onStop
|
* @see MinecraftClientMixin#onStop
|
||||||
*/
|
*/
|
||||||
public class ShutdownEvent extends Event {
|
public class ShutdownEvent extends Event {
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package me.retucio.sputnik.event.events;
|
package me.retucio.sputnik.event.events;
|
||||||
|
|
||||||
import me.retucio.sputnik.event.Event;
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onTickPre
|
* @see MinecraftClientMixin#onTickPre
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onTickPost
|
* @see MinecraftClientMixin#onTickPost
|
||||||
*/
|
*/
|
||||||
public class TickEvent {
|
public class TickEvent {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -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;
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
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;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.io.KeyboardMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.KeyboardMixin#onKeyPress
|
* @see KeyboardMixin#onKeyPress
|
||||||
*/
|
*/
|
||||||
public class KeyEvent extends Event {
|
public class KeyEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
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;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.io.MouseMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MouseMixin#onMouseButton
|
* @see MouseMixin#onMouseButton
|
||||||
*/
|
*/
|
||||||
public class MouseClickEvent extends Event {
|
public class MouseClickEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
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;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.io.MouseMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MouseMixin#onMouseScroll
|
* @see MouseMixin#onMouseScroll
|
||||||
*/
|
*/
|
||||||
public class MouseScrollEvent extends Event {
|
public class MouseScrollEvent extends Event {
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package me.retucio.sputnik.event.events.interact;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
|
public class AttackBlockEvent extends Event {
|
||||||
|
|
||||||
|
private final BlockPos pos;
|
||||||
|
private final Direction dir;
|
||||||
|
|
||||||
|
public AttackBlockEvent(BlockPos pos, Direction dir) {
|
||||||
|
this.pos = pos;
|
||||||
|
this.dir = dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockPos getPos() {
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Direction getDir() {
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientPlayerInteractionManagerMixin#onAttackEntity
|
* @see ClientPlayerInteractionManagerMixin#onAttackEntity
|
||||||
*/
|
*/
|
||||||
public class AttackEntityEvent extends Event {
|
public class AttackEntityEvent extends Event {
|
||||||
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package me.retucio.sputnik.event.events.interact;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.shape.VoxelShape;
|
||||||
|
|
||||||
|
public class BlockShapeEvent extends Event {
|
||||||
|
|
||||||
|
private BlockState state;
|
||||||
|
private BlockPos pos;
|
||||||
|
private VoxelShape shape;
|
||||||
|
|
||||||
|
public BlockShapeEvent(BlockState state, BlockPos pos, VoxelShape shape) {
|
||||||
|
this.state = state;
|
||||||
|
this.pos = pos;
|
||||||
|
this.setShape(shape);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockState getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setState(BlockState state) {
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockPos getPos() {
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPos(BlockPos pos) {
|
||||||
|
this.pos = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VoxelShape getShape() {
|
||||||
|
return shape;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShape(VoxelShape shape) {
|
||||||
|
this.shape = shape;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package me.retucio.sputnik.event.events.interact;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import net.minecraft.entity.vehicle.AbstractBoatEntity;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
public class BoatMoveEvent extends Event {
|
||||||
|
|
||||||
|
private final AbstractBoatEntity boat;
|
||||||
|
private Vec3d pos;
|
||||||
|
|
||||||
|
public BoatMoveEvent(AbstractBoatEntity boat, Vec3d pos) {
|
||||||
|
this.boat = boat;
|
||||||
|
this.pos = pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AbstractBoatEntity getBoat() {
|
||||||
|
return boat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vec3d getPos() {
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPos(Vec3d pos) {
|
||||||
|
this.pos = pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientPlayerInteractionManagerMixin#onBlockBreak
|
* @see ClientPlayerInteractionManagerMixin#onBlockBreak
|
||||||
*/
|
*/
|
||||||
public class BreakBlockEvent extends Event {
|
public class BreakBlockEvent extends Event {
|
||||||
|
|
||||||
+1
-1
@@ -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;
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.item.ItemStackMixin;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ItemStackMixin#onDamage
|
* @see ItemStackMixin#onDamage
|
||||||
*/
|
*/
|
||||||
public class DamageItemEvent extends Event {
|
public class DamageItemEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientPlayerInteractionManagerMixin#onEntityInteract
|
* @see ClientPlayerInteractionManagerMixin#onEntityInteract
|
||||||
*/
|
*/
|
||||||
public class InteractEntityEvent extends Event {
|
public class InteractEntityEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onOpenScreen
|
* @see MinecraftClientMixin#onOpenScreen
|
||||||
*/
|
*/
|
||||||
public class OpenScreenEvent extends Event {
|
public class OpenScreenEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientPlayerInteractionManagerMixin#onBlockPlace
|
* @see ClientPlayerInteractionManagerMixin#onBlockPlace
|
||||||
*/
|
*/
|
||||||
public class PlaceBlockEvent extends Event {
|
public class PlaceBlockEvent extends Event {
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package me.retucio.sputnik.event.events.interact;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.event.Event;
|
||||||
|
|
||||||
|
public class SwitchSlotEvent extends Event {
|
||||||
|
|
||||||
|
private final int prevSlot;
|
||||||
|
private int slot;
|
||||||
|
|
||||||
|
public SwitchSlotEvent(int prevSlot, int slot) {
|
||||||
|
this.prevSlot = prevSlot;
|
||||||
|
this.slot = slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPrevSlot() {
|
||||||
|
return prevSlot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSlot() {
|
||||||
|
return slot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSlot(int slot) {
|
||||||
|
this.slot = slot;
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onUseItem
|
* @see MinecraftClientMixin#onUseItem
|
||||||
*/
|
*/
|
||||||
public class UseItemEvent extends Event {
|
public class UseItemEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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.mixin.mixins.world.ClientWorldMixin;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientWorldMixin#onAddEntity
|
* @see ClientWorldMixin#onAddEntity
|
||||||
*/
|
*/
|
||||||
public class AddEntityEvent extends Event {
|
public class AddEntityEvent extends Event {
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package me.retucio.sputnik.event.events.network;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.event.Event;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.world.ChunkOcclusionDataBuilderMixin;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ChunkOcclusionDataBuilderMixin#onChunkOcclusion
|
||||||
|
*/
|
||||||
|
public class ChunkOcclusionEvent extends Event {}
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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.mixin.mixins.network.ClientConnectionMixin;
|
||||||
import net.minecraft.client.network.ServerInfo;
|
import net.minecraft.client.network.ServerInfo;
|
||||||
import net.minecraft.network.DisconnectionInfo;
|
import net.minecraft.network.DisconnectionInfo;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientConnectionMixin#onDisconnect
|
* @see ClientConnectionMixin#onDisconnect
|
||||||
*/
|
*/
|
||||||
public class DisconnectEvent extends Event {
|
public class DisconnectEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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.mixin.mixins.misc.MinecraftClientMixin;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.MinecraftClientMixin#onJoinWorld
|
* @see MinecraftClientMixin#onJoinWorld
|
||||||
*/
|
*/
|
||||||
public class JoinWorldEvent extends Event {
|
public class JoinWorldEvent extends Event {
|
||||||
|
|
||||||
+5
-4
@@ -1,14 +1,15 @@
|
|||||||
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;
|
||||||
|
import me.retucio.sputnik.mixin.mixins.network.ClientConnectionMixin;
|
||||||
import net.minecraft.network.packet.Packet;
|
import net.minecraft.network.packet.Packet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientConnectionMixin#onSendPacketPre
|
* @see ClientConnectionMixin#onSendPacketPre
|
||||||
* @see me.retucio.sputnik.mixin.ClientConnectionMixin#onSendPacketPost
|
* @see ClientConnectionMixin#onSendPacketPost
|
||||||
* @see me.retucio.sputnik.mixin.ClientConnectionMixin#onReceivePacket
|
* @see ClientConnectionMixin#onReceivePacket
|
||||||
*/
|
*/
|
||||||
public class PacketEvent {
|
public class PacketEvent {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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.mixin.mixins.hud.ChatHudMixin;
|
||||||
import net.minecraft.client.gui.hud.MessageIndicator;
|
import net.minecraft.client.gui.hud.MessageIndicator;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ChatHudMixin#onAddMessage
|
* @see ChatHudMixin#onAddMessage
|
||||||
*/
|
*/
|
||||||
public class ReceiveMessageEvent extends Event {
|
public class ReceiveMessageEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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.mixin.mixins.world.ClientWorldMixin;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientWorldMixin#onRemoveEntity
|
* @see ClientWorldMixin#onRemoveEntity
|
||||||
*/
|
*/
|
||||||
public class RemoveEntityEvent extends Event {
|
public class RemoveEntityEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
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.mixin.mixins.network.ClientPlayNetworkHandlerMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.ClientPlayNetworkHandlerMixin#onSendMessage
|
* @see ClientPlayNetworkHandlerMixin#onSendMessage
|
||||||
*/
|
*/
|
||||||
public class SendMessageEvent extends Event {
|
public class SendMessageEvent extends Event {
|
||||||
|
|
||||||
+5
-4
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.entity.EntityMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.EntityMixin#onRotation
|
* @see EntityMixin#onRotation
|
||||||
* @see me.retucio.sputnik.mixin.EntityMixin#onChangeYaw
|
* @see EntityMixin#onChangeYaw
|
||||||
* @see me.retucio.sputnik.mixin.EntityMixin#onChangePitch
|
* @see EntityMixin#onChangePitch
|
||||||
*/
|
*/
|
||||||
public class ChangeRotationEvent extends Event {
|
public class ChangeRotationEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.render.GameRendererMixin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.GameRendererMixin#modifyFov
|
* @see GameRendererMixin#modifyFov
|
||||||
*/
|
*/
|
||||||
public class GetFOVEvent extends Event {
|
public class GetFOVEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.misc.GameOptionsMixin;
|
||||||
import net.minecraft.client.option.Perspective;
|
import net.minecraft.client.option.Perspective;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.GameOptionsMixin#changePerspective
|
* @see GameOptionsMixin#changePerspective
|
||||||
*/
|
*/
|
||||||
public class PerspectiveChangeEvent extends Event {
|
public class PerspectiveChangeEvent extends Event {
|
||||||
|
|
||||||
+1
-1
@@ -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;
|
||||||
+3
-2
@@ -1,13 +1,14 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.render.WorldRendererMixin;
|
||||||
import net.minecraft.client.render.Camera;
|
import net.minecraft.client.render.Camera;
|
||||||
import net.minecraft.client.render.RenderTickCounter;
|
import net.minecraft.client.render.RenderTickCounter;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.WorldRendererMixin#render
|
* @see WorldRendererMixin#render
|
||||||
*/
|
*/
|
||||||
public class Render3DEvent extends Event {
|
public class Render3DEvent extends Event {
|
||||||
|
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.render.HeldItemRendererMixin;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.HeldItemRendererMixin#onRenderArm
|
* @see HeldItemRendererMixin#onRenderArm
|
||||||
*/
|
*/
|
||||||
public class RenderArmEvent extends Event {
|
public class RenderArmEvent extends Event {
|
||||||
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-4
@@ -1,6 +1,7 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.hud.BossBarHudMixin;
|
||||||
import net.minecraft.client.gui.hud.ClientBossBar;
|
import net.minecraft.client.gui.hud.ClientBossBar;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
@@ -8,9 +9,9 @@ import java.util.Iterator;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.BossBarHudMixin#modifyBossBarIterator
|
* @see BossBarHudMixin#modifyBossBarIterator
|
||||||
* @see me.retucio.sputnik.mixin.BossBarHudMixin#modifyBossBarName
|
* @see BossBarHudMixin#modifyBossBarName
|
||||||
* @see me.retucio.sputnik.mixin.BossBarHudMixin#modifySpacingConstant
|
* @see BossBarHudMixin#modifySpacingConstant
|
||||||
*/
|
*/
|
||||||
public class RenderBossbarEvent {
|
public class RenderBossbarEvent {
|
||||||
|
|
||||||
+3
-2
@@ -1,12 +1,13 @@
|
|||||||
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 me.retucio.sputnik.mixin.mixins.render.HeldItemRendererMixin;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see me.retucio.sputnik.mixin.HeldItemRendererMixin#onRenderItem
|
* @see HeldItemRendererMixin#onRenderItem
|
||||||
*/
|
*/
|
||||||
public class RenderHeldItemEvent extends Event {
|
public class RenderHeldItemEvent extends Event {
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Mutable;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
|
@Mixin(AbstractBlock.class)
|
||||||
|
public interface AbstractBlockAccessor {
|
||||||
|
|
||||||
|
@Mutable @Accessor("slipperiness")
|
||||||
|
void setSlipperiness(float slipperiness);
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.block.entity.SignBlockEntity;
|
import net.minecraft.block.entity.SignBlockEntity;
|
||||||
import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen;
|
import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.ingame.AnvilScreen;
|
import net.minecraft.client.gui.screen.ingame.AnvilScreen;
|
||||||
import net.minecraft.client.gui.widget.TextFieldWidget;
|
import net.minecraft.client.gui.widget.TextFieldWidget;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.network.message.LastSeenMessagesCollector;
|
import net.minecraft.network.message.LastSeenMessagesCollector;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.network.ClientCommonNetworkHandler;
|
import net.minecraft.client.network.ClientCommonNetworkHandler;
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.util.InputUtil;
|
import net.minecraft.client.util.InputUtil;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.render.OverlayTexture;
|
import net.minecraft.client.render.OverlayTexture;
|
||||||
import net.minecraft.client.texture.NativeImageBackedTexture;
|
import net.minecraft.client.texture.NativeImageBackedTexture;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientCommonNetworkHandler;
|
import net.minecraft.client.network.ClientCommonNetworkHandler;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin.accessor;
|
package me.retucio.sputnik.mixin.accessors;
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package me.retucio.sputnik.mixin.mixins.entity;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.Sputnik;
|
||||||
|
import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
|
||||||
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
|
import me.retucio.sputnik.module.modules.movement.BoatFly;
|
||||||
|
import net.minecraft.entity.MovementType;
|
||||||
|
import net.minecraft.entity.vehicle.AbstractBoatEntity;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(AbstractBoatEntity.class)
|
||||||
|
public abstract class AbstractBoatEntityMixin {
|
||||||
|
|
||||||
|
@Redirect(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/AbstractBoatEntity;move(Lnet/minecraft/entity/MovementType;Lnet/minecraft/util/math/Vec3d;)V"))
|
||||||
|
private void onMove(AbstractBoatEntity instance, MovementType movementType, Vec3d vec3d) {
|
||||||
|
BoatMoveEvent event = Sputnik.EVENT_BUS.post(new BoatMoveEvent(instance, vec3d));
|
||||||
|
if(!event.isCancelled()) instance.move(movementType, event.getPos());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "updatePaddles", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void onPaddle(CallbackInfo ci) {
|
||||||
|
if (ModuleManager.INSTANCE.getModuleByClass(BoatFly.class).isEnabled()) {
|
||||||
|
ci.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+23
-3
@@ -1,17 +1,19 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.entity;
|
||||||
|
|
||||||
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;
|
||||||
import me.retucio.sputnik.module.modules.camera.Rotations;
|
import me.retucio.sputnik.module.modules.camera.Rotations;
|
||||||
import me.retucio.sputnik.module.modules.misc.AntiInvis;
|
import me.retucio.sputnik.module.modules.misc.AntiInvis;
|
||||||
|
import me.retucio.sputnik.module.modules.movement.BoatFly;
|
||||||
import me.retucio.sputnik.module.modules.render.Nametags;
|
import me.retucio.sputnik.module.modules.render.Nametags;
|
||||||
import net.minecraft.entity.*;
|
import net.minecraft.entity.*;
|
||||||
import net.minecraft.entity.passive.TameableEntity;
|
import net.minecraft.entity.passive.TameableEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.projectile.PersistentProjectileEntity;
|
import net.minecraft.entity.projectile.PersistentProjectileEntity;
|
||||||
|
import net.minecraft.entity.vehicle.AbstractBoatEntity;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -98,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) {
|
||||||
@@ -146,7 +157,16 @@ public abstract class EntityMixin {
|
|||||||
// otros
|
// otros
|
||||||
|
|
||||||
@Inject(method = "isInvisibleTo", at = @At("RETURN"), cancellable = true)
|
@Inject(method = "isInvisibleTo", at = @At("RETURN"), cancellable = true)
|
||||||
public void renderInvisPlayers(PlayerEntity player, CallbackInfoReturnable<Boolean> cir) {
|
private void renderInvisPlayers(PlayerEntity player, CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (ModuleManager.INSTANCE.getModuleByClass(AntiInvis.class).isEnabled()) cir.setReturnValue(false);
|
if (ModuleManager.INSTANCE.getModuleByClass(AntiInvis.class).isEnabled()) cir.setReturnValue(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("ConstantConditions")
|
||||||
|
@Inject(method = "getStepHeight", at = @At("RETURN"), cancellable = true)
|
||||||
|
private void modifyBoatStepHeight(CallbackInfoReturnable<Float> cir) {
|
||||||
|
BoatFly boatFly = ModuleManager.INSTANCE.getModuleByClass(BoatFly.class);
|
||||||
|
if (((Object) this) instanceof AbstractBoatEntity && boatFly.isEnabled()) {
|
||||||
|
cir.setReturnValue(boatFly.stepHeight.getFloatValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package me.retucio.sputnik.mixin.mixins.entity;
|
||||||
|
|
||||||
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
|
import me.retucio.sputnik.module.modules.render.EntityESP;
|
||||||
|
import net.minecraft.client.render.entity.EntityRenderer;
|
||||||
|
import net.minecraft.client.render.entity.EntityRendererFactory;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(EntityRenderer.class)
|
||||||
|
public abstract class EntityRendererMixin {
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private EntityESP esp;
|
||||||
|
|
||||||
|
@Inject(method = "<init>", at = @At("TAIL"))
|
||||||
|
private void getModules(EntityRendererFactory.Context context, CallbackInfo ci) {
|
||||||
|
esp = ModuleManager.INSTANCE.getModuleByClass(EntityESP.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyExpressionValue(method = "updateRenderState", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;hasOutline(Lnet/minecraft/entity/Entity;)Z"))
|
||||||
|
private boolean renderGlowESP(boolean original, @Local(argsOnly = true) Entity entity) {
|
||||||
|
return (esp.isEnabled() && esp.mode.is(EntityESP.ESPMode.GLOW) && esp.entities.isEnabled(entity.getType())) || original;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyExpressionValue(method = "updateRenderState", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;getTeamColorValue()I"))
|
||||||
|
private int setGlowESPColor(int original, @Local(argsOnly = true) Entity entity) {
|
||||||
|
if (esp.isEnabled() && esp.mode.is(EntityESP.ESPMode.GLOW) && esp.entities.isEnabled(entity.getType())) return esp.glowColor.getRGB();
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.entity;
|
||||||
|
|
||||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.entity;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.player.ElytraBounce;
|
import me.retucio.sputnik.module.modules.movement.ElytraBounce;
|
||||||
import me.retucio.sputnik.module.modules.player.Step;
|
import me.retucio.sputnik.module.modules.movement.Step;
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.hud;
|
||||||
|
|
||||||
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;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.hud;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import me.retucio.sputnik.util.interfaces.IChatHudLine;
|
import me.retucio.sputnik.util.interfaces.IChatHudLine;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.hud;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import me.retucio.sputnik.util.interfaces.IChatHudLineVisible;
|
import me.retucio.sputnik.util.interfaces.IChatHudLineVisible;
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.hud;
|
||||||
|
|
||||||
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;
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.hud;
|
||||||
|
|
||||||
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
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.io;
|
||||||
|
|
||||||
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;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.io;
|
||||||
|
|
||||||
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;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.io;
|
||||||
|
|
||||||
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;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.io;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.misc.ScreenshotPlus;
|
import me.retucio.sputnik.module.modules.misc.ScreenshotPlus;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.item;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.misc.ShulkerPeek;
|
import me.retucio.sputnik.module.modules.misc.ShulkerPeek;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.item;
|
||||||
|
|
||||||
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;
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package me.retucio.sputnik.mixin.mixins.item;
|
||||||
|
|
||||||
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||||
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
|
import me.retucio.sputnik.module.modules.movement.TridentBoost;
|
||||||
|
import net.minecraft.item.TridentItem;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyArgs;
|
||||||
|
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
|
||||||
|
|
||||||
|
@Mixin(TridentItem.class)
|
||||||
|
public abstract class TridentItemMixin {
|
||||||
|
|
||||||
|
@ModifyArgs(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;addVelocity(DDD)V"))
|
||||||
|
private void modifyVelocity(Args args) {
|
||||||
|
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
|
||||||
|
if (!tridentBoost.isEnabled()) return;
|
||||||
|
args.set(0, (double) args.get(0) * tridentBoost.multiplier.getValue());
|
||||||
|
args.set(1, (double) args.get(1) * tridentBoost.multiplier.getValue());
|
||||||
|
args.set(2, (double) args.get(2) * tridentBoost.multiplier.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyExpressionValue(method = "use", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isTouchingWaterOrRain()Z"))
|
||||||
|
private boolean allowUseOutOfWaterPre(boolean original) {
|
||||||
|
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
|
||||||
|
return (tridentBoost.outOfWater.getValue() && tridentBoost.isEnabled()) || original;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ModifyExpressionValue(method = "onStoppedUsing", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;isTouchingWaterOrRain()Z"))
|
||||||
|
private boolean allowUseOutOfWaterPost(boolean original) {
|
||||||
|
TridentBoost tridentBoost = ModuleManager.INSTANCE.getModuleByClass(TridentBoost.class);
|
||||||
|
return (tridentBoost.outOfWater.getValue() && tridentBoost.isEnabled()) || original;
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-3
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.misc;
|
||||||
|
|
||||||
import me.retucio.sputnik.Sputnik;
|
import me.retucio.sputnik.Sputnik;
|
||||||
|
|
||||||
@@ -30,8 +30,9 @@ public abstract class FontManagerMixin {
|
|||||||
if (id.equals(StyleSpriteSource.Font.DEFAULT.id())) {
|
if (id.equals(StyleSpriteSource.Font.DEFAULT.id())) {
|
||||||
cir.setReturnValue(getStorageInternal(
|
cir.setReturnValue(getStorageInternal(
|
||||||
Identifier.of(
|
Identifier.of(
|
||||||
Sputnik.MOD_ID,
|
Sputnik.MOD_ID,
|
||||||
fonts.font.getValue())
|
fonts.getFont()
|
||||||
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.misc;
|
||||||
|
|
||||||
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;
|
||||||
+11
-6
@@ -1,20 +1,22 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.misc;
|
||||||
|
|
||||||
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 me.retucio.sputnik.ui.screen.UpdateScreen;
|
||||||
|
import me.retucio.sputnik.util.VersionChecker;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
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.jspecify.annotations.Nullable;
|
||||||
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;
|
||||||
@@ -33,6 +35,10 @@ public abstract class MinecraftClientMixin {
|
|||||||
|
|
||||||
// eventos
|
// eventos
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
@Nullable
|
||||||
|
public Screen currentScreen;
|
||||||
|
|
||||||
@Inject(method = "tick", at = @At("HEAD"))
|
@Inject(method = "tick", at = @At("HEAD"))
|
||||||
private void onTickPre(CallbackInfo ci) {
|
private void onTickPre(CallbackInfo ci) {
|
||||||
Sputnik.INSTANCE.onTick();
|
Sputnik.INSTANCE.onTick();
|
||||||
@@ -68,7 +74,6 @@ public abstract class MinecraftClientMixin {
|
|||||||
if (event.isCancelled()) ci.cancel();
|
if (event.isCancelled()) ci.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// telemetría
|
// telemetría
|
||||||
|
|
||||||
@Inject(method = "isTelemetryEnabledByApi", at = @At("RETURN"), cancellable = true)
|
@Inject(method = "isTelemetryEnabledByApi", at = @At("RETURN"), cancellable = true)
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.misc;
|
||||||
|
|
||||||
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;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.misc;
|
||||||
|
|
||||||
import me.retucio.sputnik.util.interfaces.IVec3d;
|
import me.retucio.sputnik.util.interfaces.IVec3d;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import com.llamalad7.mixinextras.sugar.Local;
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
import com.mojang.brigadier.ParseResults;
|
import com.mojang.brigadier.ParseResults;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import me.retucio.sputnik.mixin.accessor.ConfirmServerResourcePackScreenAccessor;
|
import me.retucio.sputnik.mixin.accessors.ConfirmServerResourcePackScreenAccessor;
|
||||||
import me.retucio.sputnik.mixin.accessor.PackAccessor;
|
import me.retucio.sputnik.mixin.accessors.PackAccessor;
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
||||||
import me.retucio.sputnik.util.interfaces.IConfirmScreen;
|
import me.retucio.sputnik.util.interfaces.IConfirmScreen;
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
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
-2
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
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
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import me.retucio.sputnik.util.interfaces.IMessageHandler;
|
import me.retucio.sputnik.util.interfaces.IMessageHandler;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import me.retucio.sputnik.module.ModuleManager;
|
import me.retucio.sputnik.module.ModuleManager;
|
||||||
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
import me.retucio.sputnik.module.modules.network.RPackBypass;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import net.minecraft.client.session.telemetry.TelemetryManager;
|
import net.minecraft.client.session.telemetry.TelemetryManager;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.network;
|
||||||
|
|
||||||
import com.mojang.authlib.yggdrasil.YggdrasilUserApiService;
|
import com.mojang.authlib.yggdrasil.YggdrasilUserApiService;
|
||||||
import com.mojang.authlib.yggdrasil.response.UserAttributesResponse;
|
import com.mojang.authlib.yggdrasil.response.UserAttributesResponse;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.player;
|
||||||
|
|
||||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||||
+16
-9
@@ -1,12 +1,10 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.player;
|
||||||
|
|
||||||
import me.retucio.sputnik.event.events.AttackEntityEvent;
|
import me.retucio.sputnik.event.events.interact.*;
|
||||||
import me.retucio.sputnik.event.events.BreakBlockEvent;
|
|
||||||
import me.retucio.sputnik.event.events.InteractEntityEvent;
|
|
||||||
import me.retucio.sputnik.event.events.PlaceBlockEvent;
|
|
||||||
import me.retucio.sputnik.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;
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
@@ -18,6 +16,7 @@ import net.minecraft.util.Hand;
|
|||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
import 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;
|
||||||
@@ -29,6 +28,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
import static me.retucio.sputnik.Sputnik.EVENT_BUS;
|
import static me.retucio.sputnik.Sputnik.EVENT_BUS;
|
||||||
import static me.retucio.sputnik.Sputnik.mc;
|
import static me.retucio.sputnik.Sputnik.mc;
|
||||||
|
|
||||||
|
|
||||||
@Mixin(ClientPlayerInteractionManager.class)
|
@Mixin(ClientPlayerInteractionManager.class)
|
||||||
public abstract class ClientPlayerInteractionManagerMixin {
|
public abstract class ClientPlayerInteractionManagerMixin {
|
||||||
|
|
||||||
@@ -38,12 +38,15 @@ public abstract class ClientPlayerInteractionManagerMixin {
|
|||||||
@Unique
|
@Unique
|
||||||
Freecam freecam;
|
Freecam freecam;
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
FastUse fastUse;
|
||||||
|
|
||||||
@Inject(method = "<init>", at = @At("TAIL"))
|
@Inject(method = "<init>", at = @At("TAIL"))
|
||||||
private void getModules(MinecraftClient client, ClientPlayNetworkHandler networkHandler, CallbackInfo ci) {
|
private void getModules(MinecraftClient client, ClientPlayNetworkHandler networkHandler, CallbackInfo ci) {
|
||||||
freecam = ModuleManager.INSTANCE.getModuleByClass(Freecam.class);
|
freecam = ModuleManager.INSTANCE.getModuleByClass(Freecam.class);
|
||||||
|
fastUse = ModuleManager.INSTANCE.getModuleByClass(FastUse.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Inject(method = "breakBlock", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "breakBlock", at = @At("HEAD"), cancellable = true)
|
||||||
private void onBlockBreak(BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
private void onBlockBreak(BlockPos pos, CallbackInfoReturnable<Boolean> cir) {
|
||||||
BreakBlockEvent event = EVENT_BUS.post(new BreakBlockEvent(pos));
|
BreakBlockEvent event = EVENT_BUS.post(new BreakBlockEvent(pos));
|
||||||
@@ -57,6 +60,12 @@ public abstract class ClientPlayerInteractionManagerMixin {
|
|||||||
if (event.isCancelled()) cir.cancel();
|
if (event.isCancelled()) cir.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject(method = "attackBlock", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void onAttackBlock(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
AttackBlockEvent event = EVENT_BUS.post(new AttackBlockEvent(pos, direction));
|
||||||
|
if (event.isCancelled()) cir.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
@Inject(method = "interactEntity", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "interactEntity", at = @At("HEAD"), cancellable = true)
|
||||||
private void onEntityInteract(PlayerEntity player, Entity entity, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
|
private void onEntityInteract(PlayerEntity player, Entity entity, Hand hand, CallbackInfoReturnable<ActionResult> cir) {
|
||||||
if (mc.player != player) return;
|
if (mc.player != player) return;
|
||||||
@@ -72,10 +81,8 @@ public abstract class ClientPlayerInteractionManagerMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Inject(method = "updateBlockBreakingProgress", at = @At("HEAD"))
|
||||||
@Inject(method = "updateBlockBreakingProgress", at = @At(value = "FIELD", target = "Lnet/minecraft/client/network/ClientPlayerInteractionManager;blockBreakingCooldown:I"))
|
|
||||||
private void modifyBlockBreakingCooldown(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> cir) {
|
private void modifyBlockBreakingCooldown(BlockPos pos, Direction direction, CallbackInfoReturnable<Boolean> cir) {
|
||||||
FastUse fastUse = ModuleManager.INSTANCE.getModuleByClass(FastUse.class);
|
|
||||||
if (!fastUse.isEnabled() || !fastUse.mining.getValue()) return;
|
if (!fastUse.isEnabled() || !fastUse.mining.getValue()) return;
|
||||||
blockBreakingCooldown = fastUse.miningCooldown.getIntValue();
|
blockBreakingCooldown = fastUse.miningCooldown.getIntValue();
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.player;
|
||||||
|
|
||||||
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;
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package me.retucio.sputnik.mixin.mixins.player;
|
||||||
|
|
||||||
|
import me.retucio.sputnik.Sputnik;
|
||||||
|
import me.retucio.sputnik.event.events.interact.SwitchSlotEvent;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(PlayerInventory.class)
|
||||||
|
public abstract class PlayerInventoryMixin {
|
||||||
|
|
||||||
|
@Shadow
|
||||||
|
private int selectedSlot;
|
||||||
|
|
||||||
|
@Inject(method = "setSelectedSlot", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void onSwitchSlot(int slot, CallbackInfo ci) {
|
||||||
|
if (selectedSlot == slot) return;
|
||||||
|
SwitchSlotEvent event = Sputnik.EVENT_BUS.post(new SwitchSlotEvent(selectedSlot, slot));
|
||||||
|
if (event.isCancelled()) ci.cancel();
|
||||||
|
if (event.getSlot() != slot) this.selectedSlot = event.getSlot();
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package me.retucio.sputnik.mixin;
|
package me.retucio.sputnik.mixin.mixins.render;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
||||||
import me.retucio.sputnik.util.render.GlintRenderLayer;
|
import me.retucio.sputnik.util.render.GlintRenderLayer;
|
||||||
Loaded 100 of 233 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user