Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1eed6f957 |
No files matched your search
+14
-5
@@ -11,20 +11,29 @@ base {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "FDD Maven"
|
||||
url = "https://maven.firstdark.dev/releases"
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven {
|
||||
name = "FDD Maven"
|
||||
url = "https://maven.firstdark.dev/releases"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// mc
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
|
||||
// mappings
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
|
||||
// fabric & su api
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}"
|
||||
|
||||
// otros
|
||||
// sistema de eventos
|
||||
modImplementation "com.github.retuci0:neutrino:${project.neutrino_version}"
|
||||
|
||||
// rpc de discord
|
||||
include(modImplementation "dev.firstdark.discordrpc:discord-rpc:1.0.3")
|
||||
}
|
||||
|
||||
|
||||
+8
-4
@@ -1,18 +1,22 @@
|
||||
# v3.2
|
||||
# v3.3
|
||||
|
||||
## novedades
|
||||
|
||||
- cambiado de sistema de eventos
|
||||
- categoría de inventario
|
||||
|
||||
### adiciones
|
||||
|
||||
#### 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
|
||||
- reponer: repone items a medida que se usan de forma automática
|
||||
|
||||
### arreglos / mejoras
|
||||
|
||||
- ahora el aviso de actualizaciones ya funciona bien
|
||||
- ahora el grosor de línea de hitboxes funciona
|
||||
- ahora cabezas de chatplus funciona, a medias
|
||||
|
||||
## problemas reconocidos
|
||||
|
||||
- es posible que algunos módulos hayan dejado de funcionar correctamente, ya que he cambiado de sistema de eventos
|
||||
- muchos, pero repórtalos en la página de problemas si quieres para que queden bien registrados
|
||||
+3
-1
@@ -8,6 +8,8 @@ loom_version=1.13-SNAPSHOT
|
||||
|
||||
fabric_api_version=0.140.2+1.21.11
|
||||
|
||||
mod_version=3.1
|
||||
neutrino_version=1.1.0
|
||||
|
||||
mod_version=3.3
|
||||
maven_group=me.retucio
|
||||
archives_base_name=sputnik
|
||||
@@ -1,20 +1,18 @@
|
||||
package me.retucio.sputnik;
|
||||
|
||||
import com.ibm.icu.text.CaseMap;
|
||||
import com.github.retucio.neutrino.EventBus;
|
||||
import me.retucio.sputnik.cape.CapeManager;
|
||||
import me.retucio.sputnik.command.CommandManager;
|
||||
import me.retucio.sputnik.command.commands.BindCommand;
|
||||
|
||||
import me.retucio.sputnik.config.ConfigManager;
|
||||
|
||||
import me.retucio.sputnik.event.EventBus;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
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.LoadClickGUIEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.LoadCommandManagerEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.LoadModuleManagerEvent;
|
||||
import me.retucio.sputnik.event.ShutdownEvent;
|
||||
import me.retucio.sputnik.event.interact.OpenScreenEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadCapeManagerEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadClickGUIEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadCommandManagerEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadModuleManagerEvent;
|
||||
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
@@ -53,14 +51,6 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
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 {
|
||||
|
||||
@@ -94,15 +84,15 @@ public class Sputnik implements ClientModInitializer {
|
||||
|
||||
VersionChecker.check();
|
||||
|
||||
EVENT_BUS.register(this);
|
||||
EVENT_BUS.subscribe(this);
|
||||
|
||||
EVENT_BUS.register(ChatUtil.class);
|
||||
EVENT_BUS.register(DrawUtil.class);
|
||||
EVENT_BUS.register(EntityUtil.class);
|
||||
EVENT_BUS.register(InventoryUtil.class);
|
||||
EVENT_BUS.register(MiscUtil.class);
|
||||
EVENT_BUS.register(NetworkUtil.class);
|
||||
EVENT_BUS.register(RenderUtil.class);
|
||||
EVENT_BUS.subscribe(ChatUtil.class);
|
||||
EVENT_BUS.subscribe(DrawUtil.class);
|
||||
EVENT_BUS.subscribe(EntityUtil.class);
|
||||
EVENT_BUS.subscribe(InventoryUtil.class);
|
||||
EVENT_BUS.subscribe(MiscUtil.class);
|
||||
EVENT_BUS.subscribe(NetworkUtil.class);
|
||||
EVENT_BUS.subscribe(RenderUtil.class);
|
||||
|
||||
Lists.init();
|
||||
Textures.init();
|
||||
@@ -243,7 +233,6 @@ public class Sputnik implements ClientModInitializer {
|
||||
}
|
||||
|
||||
// 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();
|
||||
@@ -252,7 +241,6 @@ public class Sputnik implements ClientModInitializer {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onStop(ShutdownEvent event) {
|
||||
ConfigManager.save();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package me.retucio.sputnik.command;
|
||||
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.command.commands.*;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.command.CommandSource;
|
||||
|
||||
@@ -52,8 +52,8 @@ public class CommandManager {
|
||||
|
||||
for (Command command : commands) {
|
||||
for (Method method : command.getClass().getDeclaredMethods()) {
|
||||
if (method.isAnnotationPresent(SubscribeEvent.class)) {
|
||||
Sputnik.EVENT_BUS.register(command);
|
||||
if (method.isAnnotationPresent(EventListener.class)) {
|
||||
Sputnik.EVENT_BUS.subscribe(command);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package me.retucio.sputnik.command.commands;
|
||||
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import me.retucio.sputnik.command.Command;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.TickEvent;
|
||||
import me.retucio.sputnik.event.TickEvent;
|
||||
import me.retucio.sputnik.ui.screen.PreviewScreen;
|
||||
import me.retucio.sputnik.util.ChatUtil;
|
||||
import me.retucio.sputnik.util.InventoryUtil;
|
||||
@@ -35,7 +34,6 @@ public class EnderChestCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTick(TickEvent.Post event) {
|
||||
if (shouldOpenEchest) {
|
||||
shouldOpenEchest = false;
|
||||
|
||||
@@ -6,8 +6,7 @@ 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.event.network.PacketEvent;
|
||||
import me.retucio.sputnik.util.ChatUtil;
|
||||
|
||||
import net.minecraft.client.network.ClientCommandSource;
|
||||
@@ -90,7 +89,6 @@ public class PluginsCommand extends Command {
|
||||
node.getChildren().forEach(this::checkNodeForPlugins);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
private void onPacketReceive(PacketEvent.Receive event) {
|
||||
if (!scanning) return;
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ package me.retucio.sputnik.command.commands;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import me.retucio.sputnik.command.Command;
|
||||
import me.retucio.sputnik.command.args.EntityArgumentType;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.input.KeyEvent;
|
||||
import me.retucio.sputnik.event.input.KeyEvent;
|
||||
import me.retucio.sputnik.util.EntityUtil;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -38,7 +37,6 @@ public class SpectateCommand extends Command {
|
||||
);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onKey(KeyEvent event) {
|
||||
if (mc.getCameraEntity() != mc.player && mc.currentScreen == null
|
||||
&& event.getKey() == GLFW.GLFW_KEY_ESCAPE && event.getAction() != GLFW.GLFW_RELEASE ) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package me.retucio.sputnik.config;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.*;
|
||||
import me.retucio.sputnik.event.sputnik.*;
|
||||
import me.retucio.sputnik.module.setting.settings.*;
|
||||
import me.retucio.sputnik.ui.screen.ClickGUI;
|
||||
|
||||
@@ -38,19 +37,17 @@ public class ClientConfig {
|
||||
public Map<String, String> hudImagePaths = new HashMap<>();
|
||||
|
||||
// posición de la barra de búsqueda (x, y)
|
||||
public int[] searchBarPosition = new int[]{340, 16};
|
||||
public int[] searchBarPosition = new int[] { 340, 16 };
|
||||
|
||||
public ClientConfig() {
|
||||
EVENT_BUS.register(this);
|
||||
EVENT_BUS.subscribe(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onToggleModule(ToggleModuleEvent event) {
|
||||
ConfigManager.setModuleState(event.getModule());
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@SubscribeEvent
|
||||
public void onUpdateSetting(UpdateSettingEvent event) {
|
||||
if (mc == null || !event.shouldSave()) return;
|
||||
|
||||
@@ -71,24 +68,20 @@ public class ClientConfig {
|
||||
ConfigManager.setSetting(event.getSetting(), value);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onOpenSettingsFrame(SettingsFrameEvent.Open event) {
|
||||
ConfigManager.setFramePosition(event.getFrame());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCloseSettingsFrame(SettingsFrameEvent.Close event) {
|
||||
settingsFrames.remove(event.getFrame().getModule().getName());
|
||||
ConfigManager.save();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onMoveSettingsFrame(SettingsFrameEvent.Move event) {
|
||||
settingsFrames.replace(event.getFrame().getModule().getName(), new int[]{event.getFrame().getX(), event.getFrame().getY()});
|
||||
ConfigManager.save();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onExtendModuleFrame(ModuleFrameEvent.Extend event) {
|
||||
extendableFrames.put("M", new FrameData(
|
||||
ClickGUI.INSTANCE.getModulesFrame().getX(),
|
||||
@@ -96,7 +89,6 @@ public class ClientConfig {
|
||||
ClickGUI.INSTANCE.getModulesFrame().extended));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onMoveModuleFrame(ModuleFrameEvent.Move event) {
|
||||
extendableFrames.replace("M", new FrameData(
|
||||
ClickGUI.INSTANCE.getModulesFrame().getX(),
|
||||
@@ -104,7 +96,6 @@ public class ClientConfig {
|
||||
ClickGUI.INSTANCE.getModulesFrame().extended));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onExtendGUISettingsFrame(GUISettingsFrameEvent.Extend event) {
|
||||
extendableFrames.put("S", new FrameData(
|
||||
ClickGUI.INSTANCE.getGuiSettingsFrame().getX(),
|
||||
@@ -112,7 +103,6 @@ public class ClientConfig {
|
||||
ClickGUI.INSTANCE.getGuiSettingsFrame().extended));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onMoveGUISettingsFrame(GUISettingsFrameEvent.Move event) {
|
||||
extendableFrames.replace("S", new FrameData(
|
||||
ClickGUI.INSTANCE.getGuiSettingsFrame().getX(),
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
// evento base, cancelable (usado en mixins)
|
||||
public class Event {
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
cancelled = true;
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
|
||||
// al llamar un evento, se guarda en el bus de eventos, de donde luego se puede detectar si ese evento ha sucedido
|
||||
public class EventBus {
|
||||
|
||||
private final Map<Class<?>, List<ListenerMethod>> listeners = new HashMap<>();
|
||||
|
||||
private record ListenerMethod(Object instance, Method method) {}
|
||||
|
||||
public void register(Object listener) {
|
||||
Class<?> targetClass;
|
||||
|
||||
if (listener instanceof Class<?> clazz) {
|
||||
targetClass = clazz; // "listeners" estáticos
|
||||
listener = null;
|
||||
} else {
|
||||
targetClass = listener.getClass();
|
||||
}
|
||||
|
||||
for (Method method : targetClass.getDeclaredMethods()) {
|
||||
if (!method.isAnnotationPresent(SubscribeEvent.class)) continue;
|
||||
if (method.getParameterCount() != 1) continue;
|
||||
|
||||
Class<?> eventType = method.getParameterTypes()[0];
|
||||
method.setAccessible(true);
|
||||
|
||||
if (listener == null && !Modifier.isStatic(method.getModifiers())) continue;
|
||||
|
||||
listeners.computeIfAbsent(eventType, k -> new ArrayList<>())
|
||||
.add(new ListenerMethod(listener, method));
|
||||
}
|
||||
}
|
||||
|
||||
public void subscribe(Object listener) { register(listener); }
|
||||
|
||||
public void unregister(Object listener) {
|
||||
for (List<ListenerMethod> list : listeners.values()) {
|
||||
list.removeIf(lm -> lm.instance == listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void unsubscribe(Object listener) { unregister(listener); }
|
||||
|
||||
public <T extends Event> T post(T event) {
|
||||
List<ListenerMethod> list = listeners.get(event.getClass());
|
||||
if (list != null) {
|
||||
for (ListenerMethod lm : new ArrayList<>(list)) { // copiar para evitar CME
|
||||
try {
|
||||
lm.method.invoke(lm.instance, event);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
public boolean isRegistered(Object listener) {
|
||||
for (List<ListenerMethod> list : listeners.values()) {
|
||||
for (ListenerMethod lm : list) {
|
||||
if (lm.instance == listener) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events;
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
public enum Stage {
|
||||
PRE, // antes de que haya sucedido
|
||||
POST; // después de que haya sucedido
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
// anotación para registar un "listener", que escucha cuando se llama un evento
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface SubscribeEvent {}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events;
|
||||
package me.retucio.sputnik.event;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package me.retucio.sputnik.event.events.input;
|
||||
package me.retucio.sputnik.event.input;
|
||||
|
||||
import me.retucio.sputnik.module.modules.misc.ChatPlus;
|
||||
import net.minecraft.text.ClickEvent;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.input;
|
||||
package me.retucio.sputnik.event.input;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.io.KeyboardMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.input;
|
||||
package me.retucio.sputnik.event.input;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.io.MouseMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.input;
|
||||
package me.retucio.sputnik.event.input;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.io.MouseMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import net.minecraft.entity.vehicle.AbstractBoatEntity;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
public class ClipAtLedgeEvent extends Event {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.item.ItemStackMixin;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Hand;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
public class SwitchSlotEvent extends Event {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.interact;
|
||||
package me.retucio.sputnik.event.interact;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Hand;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.world.ClientWorldMixin;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.world.ChunkOcclusionDataBuilderMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.network.ClientConnectionMixin;
|
||||
import net.minecraft.client.network.ServerInfo;
|
||||
import net.minecraft.network.DisconnectionInfo;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.MinecraftClientMixin;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
|
||||
+3
-9
@@ -1,7 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import me.retucio.sputnik.event.Stage;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.network.ClientConnectionMixin;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
|
||||
@@ -16,20 +15,15 @@ public class PacketEvent {
|
||||
public static class Send extends Event {
|
||||
|
||||
private final Packet<?> packet;
|
||||
private final Stage stage;
|
||||
|
||||
public Send(Packet<?> packet, Stage stage) {
|
||||
this.packet = packet;
|
||||
this.stage = stage;
|
||||
this.setStage(stage);
|
||||
}
|
||||
|
||||
public Packet<?> getPacket() {
|
||||
return packet;
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return stage;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Receive extends Event {
|
||||
+6
-4
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.hud.ChatHudMixin;
|
||||
import net.minecraft.client.gui.hud.MessageIndicator;
|
||||
import net.minecraft.text.Text;
|
||||
@@ -12,7 +12,7 @@ public class ReceiveMessageEvent extends Event {
|
||||
|
||||
private Text text;
|
||||
private MessageIndicator indicator;
|
||||
private int id;
|
||||
private final int id;
|
||||
private boolean modified = false;
|
||||
|
||||
public ReceiveMessageEvent(Text text, MessageIndicator indicator, int id) {
|
||||
@@ -43,5 +43,7 @@ public class ReceiveMessageEvent extends Event {
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.world.ClientWorldMixin;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.network;
|
||||
package me.retucio.sputnik.event.network;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.network.ClientPlayNetworkHandlerMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.entity.EntityMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.render.GameRendererMixin;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.misc.GameOptionsMixin;
|
||||
import net.minecraft.client.option.Perspective;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.render.WorldRendererMixin;
|
||||
import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.render.HeldItemRendererMixin;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Hand;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
public class RenderBlockOutlineEvent extends Event {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.hud.BossBarHudMixin;
|
||||
import net.minecraft.client.gui.hud.ClientBossBar;
|
||||
import net.minecraft.text.Text;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.render;
|
||||
package me.retucio.sputnik.event.render;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.mixin.mixins.render.HeldItemRendererMixin;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Hand;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cada que se interactúa con el marco de ajustes de la interfaz
|
||||
public class GUISettingsFrameEvent {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cuando carga el gestor de capas
|
||||
public class LoadCapeManagerEvent extends Event {}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cuando carga la interfaz del mod
|
||||
public class LoadClickGUIEvent extends Event {}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cuando carga el gestor de comandos
|
||||
public class LoadCommandManagerEvent extends Event {}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
public class LoadConfigEvent extends Event {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cuando carga el gestor de módulos
|
||||
public class LoadModuleManagerEvent extends Event {}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
|
||||
// se genera cada que se interactúa con el marco de módulos
|
||||
public class ModuleFrameEvent {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.ui.widgets.frames.SettingsFrame;
|
||||
|
||||
// se genera cada que se interactúa con un marco de ajustes de un módulo
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
|
||||
// se genera cada que se enciende o apaga un módulo
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.event.events.sputnik;
|
||||
package me.retucio.sputnik.event.sputnik;
|
||||
|
||||
import me.retucio.sputnik.event.Event;
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import me.retucio.sputnik.module.setting.Setting;
|
||||
|
||||
// se genera cada que se cambia el valor de un ajuste
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.entity;
|
||||
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.interact.BoatMoveEvent;
|
||||
import me.retucio.sputnik.event.interact.BoatMoveEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.movement.BoatFly;
|
||||
import net.minecraft.entity.MovementType;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.entity;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import me.retucio.sputnik.event.events.render.ChangeRotationEvent;
|
||||
import me.retucio.sputnik.event.render.ChangeRotationEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
import me.retucio.sputnik.module.modules.camera.Freelook;
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin.mixins.hud;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import me.retucio.sputnik.event.events.render.RenderBossbarEvent;
|
||||
import me.retucio.sputnik.event.render.RenderBossbarEvent;
|
||||
import net.minecraft.client.gui.hud.BossBarHud;
|
||||
import net.minecraft.client.gui.hud.ClientBossBar;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package me.retucio.sputnik.mixin.mixins.hud;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReceiver;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.ChatPlus;
|
||||
import net.minecraft.client.font.Alignment;
|
||||
import net.minecraft.client.font.DrawnTextConsumer;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.hud.ChatHud;
|
||||
import net.minecraft.text.OrderedText;
|
||||
import net.minecraft.util.math.ColorHelper;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
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.ModifyArg;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(ChatHud.Interactable.class)
|
||||
public abstract class ChatHudInteractableMixin {
|
||||
|
||||
@Unique
|
||||
private static ChatPlus chatPlus;
|
||||
|
||||
@Shadow @Final
|
||||
private DrawContext context;
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void getModules(DrawContext context, TextRenderer textRenderer, int mouseX, int mouseY, boolean bl, CallbackInfo ci) {
|
||||
chatPlus = ModuleManager.INSTANCE.getModuleByClass(ChatPlus.class);
|
||||
}
|
||||
|
||||
@ModifyReceiver(method = "text", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/DrawnTextConsumer;text(Lnet/minecraft/client/font/Alignment;IILnet/minecraft/client/font/DrawnTextConsumer$Transformation;Lnet/minecraft/text/OrderedText;)V"))
|
||||
private DrawnTextConsumer onRender_beforeDrawTextWithShadow(DrawnTextConsumer instance, Alignment alignment, int x, int y, DrawnTextConsumer.Transformation transformation, OrderedText orderedText) {
|
||||
chatPlus.beforeDrawMessage(context, y, ColorHelper.getWhite(transformation.opacity()));
|
||||
return instance;
|
||||
}
|
||||
|
||||
@ModifyArg(method = "text", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/DrawnTextConsumer;text(Lnet/minecraft/client/font/Alignment;IILnet/minecraft/client/font/DrawnTextConsumer$Transformation;Lnet/minecraft/text/OrderedText;)V"), index = 1)
|
||||
private int modifyX(int x) {
|
||||
return (chatPlus.isEnabled() && chatPlus.showHeads.getValue()) ? x + 10 : x;
|
||||
}
|
||||
|
||||
@Inject(method = "text", at = @At("TAIL"))
|
||||
private void onRender_afterDrawTextWithShadow(int y, float f, OrderedText text, CallbackInfoReturnable<Boolean> cir) {
|
||||
chatPlus.afterDrawMessage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package me.retucio.sputnik.mixin.mixins.hud;
|
||||
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.ChatPlus;
|
||||
import net.minecraft.client.gui.hud.ChatHudLine;
|
||||
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(targets = "net.minecraft.client.gui.hud.ChatHud$1", remap = false)
|
||||
public abstract class ChatHudLineConsumerMixin {
|
||||
|
||||
@Inject(method = "accept", at = @At("HEAD"))
|
||||
private void setLine(ChatHudLine.Visible line, int y, float opacity, CallbackInfo ci) {
|
||||
ModuleManager.INSTANCE.getModuleByClass(ChatPlus.class).line = line;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin.mixins.hud;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import me.retucio.sputnik.event.events.network.ReceiveMessageEvent;
|
||||
import me.retucio.sputnik.event.network.ReceiveMessageEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.ChatPlus;
|
||||
import me.retucio.sputnik.util.interfaces.IChatHud;
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin.mixins.hud;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.render.Render2DEvent;
|
||||
import me.retucio.sputnik.event.render.Render2DEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.ChatPlus;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.io;
|
||||
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.input.KeyEvent;
|
||||
import me.retucio.sputnik.event.input.KeyEvent;
|
||||
import net.minecraft.client.Keyboard;
|
||||
import net.minecraft.client.input.KeyInput;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.io;
|
||||
|
||||
import me.retucio.sputnik.event.events.input.MouseClickEvent;
|
||||
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
|
||||
import me.retucio.sputnik.event.input.MouseClickEvent;
|
||||
import me.retucio.sputnik.event.input.MouseScrollEvent;
|
||||
import net.minecraft.client.Mouse;
|
||||
import net.minecraft.client.input.MouseInput;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.item;
|
||||
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.ShulkerPeek;
|
||||
import me.retucio.sputnik.module.modules.inventory.ShulkerPeek;
|
||||
import net.minecraft.block.ShulkerBoxBlock;
|
||||
import net.minecraft.component.type.TooltipDisplayComponent;
|
||||
import net.minecraft.item.BlockItem;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.mixin.mixins.item;
|
||||
|
||||
import me.retucio.sputnik.event.events.interact.DamageItemEvent;
|
||||
import me.retucio.sputnik.event.interact.DamageItemEvent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.mixin.mixins.misc;
|
||||
|
||||
import me.retucio.sputnik.event.events.render.PerspectiveChangeEvent;
|
||||
import me.retucio.sputnik.event.render.PerspectiveChangeEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
import net.minecraft.client.option.GameOptions;
|
||||
|
||||
@@ -2,15 +2,13 @@ package me.retucio.sputnik.mixin.mixins.misc;
|
||||
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.network.JoinWorldEvent;
|
||||
import me.retucio.sputnik.event.events.interact.OpenScreenEvent;
|
||||
import me.retucio.sputnik.event.events.ShutdownEvent;
|
||||
import me.retucio.sputnik.event.events.TickEvent;
|
||||
import me.retucio.sputnik.event.events.interact.UseItemEvent;
|
||||
import me.retucio.sputnik.event.network.JoinWorldEvent;
|
||||
import me.retucio.sputnik.event.interact.OpenScreenEvent;
|
||||
import me.retucio.sputnik.event.ShutdownEvent;
|
||||
import me.retucio.sputnik.event.TickEvent;
|
||||
import me.retucio.sputnik.event.interact.UseItemEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
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.gui.screen.Screen;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package me.retucio.sputnik.mixin.mixins.network;
|
||||
|
||||
import com.github.retucio.neutrino.Event;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import me.retucio.sputnik.event.Stage;
|
||||
import me.retucio.sputnik.event.events.network.DisconnectEvent;
|
||||
import me.retucio.sputnik.event.events.network.PacketEvent;
|
||||
import me.retucio.sputnik.event.network.DisconnectEvent;
|
||||
import me.retucio.sputnik.event.network.PacketEvent;
|
||||
import net.minecraft.network.ClientConnection;
|
||||
import net.minecraft.network.DisconnectionInfo;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
@@ -23,13 +23,13 @@ public abstract class ClientConnectionMixin {
|
||||
|
||||
@Inject(method = "send(Lnet/minecraft/network/packet/Packet;Lio/netty/channel/ChannelFutureListener;)V", at = @At("HEAD"), cancellable = true)
|
||||
private void onSendPacketPre(Packet<?> packet, ChannelFutureListener channelFutureListener, CallbackInfo ci) {
|
||||
PacketEvent.Send event = EVENT_BUS.post(new PacketEvent.Send(packet, Stage.PRE));
|
||||
PacketEvent.Send event = EVENT_BUS.post(new PacketEvent.Send(packet, Event.Stage.PRE));
|
||||
if (event.isCancelled()) ci.cancel();
|
||||
}
|
||||
|
||||
@Inject(method = "send(Lnet/minecraft/network/packet/Packet;Lio/netty/channel/ChannelFutureListener;)V", at = @At("TAIL"), cancellable = true)
|
||||
private void onSendPacketPost(Packet<?> packet, ChannelFutureListener channelFutureListener, CallbackInfo ci) {
|
||||
PacketEvent.Send event = EVENT_BUS.post(new PacketEvent.Send(packet, Stage.POST));
|
||||
PacketEvent.Send event = EVENT_BUS.post(new PacketEvent.Send(packet, Event.Stage.POST));
|
||||
if (event.isCancelled()) ci.cancel();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin.mixins.network;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import me.retucio.sputnik.command.CommandManager;
|
||||
import me.retucio.sputnik.event.events.network.SendMessageEvent;
|
||||
import me.retucio.sputnik.event.network.SendMessageEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.render.NoRender;
|
||||
import me.retucio.sputnik.util.ChatUtil;
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.world.NoMiningInterruptions;
|
||||
import me.retucio.sputnik.module.modules.player.PortalGUI;
|
||||
import me.retucio.sputnik.module.modules.inventory.PortalGUI;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.network.ClientPlayerEntity;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.mixin.mixins.player;
|
||||
|
||||
import me.retucio.sputnik.event.events.interact.*;
|
||||
import me.retucio.sputnik.event.interact.*;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
import me.retucio.sputnik.module.modules.player.FastUse;
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.retucio.sputnik.mixin.mixins.player;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.interact.ClipAtLedgeEvent;
|
||||
import me.retucio.sputnik.event.interact.ClipAtLedgeEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.render.Nametags;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.player;
|
||||
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.interact.SwitchSlotEvent;
|
||||
import me.retucio.sputnik.event.interact.SwitchSlotEvent;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
+9
@@ -2,9 +2,11 @@ package me.retucio.sputnik.mixin.mixins.render;
|
||||
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.render.Hitboxes;
|
||||
import net.minecraft.client.render.DrawStyle;
|
||||
import net.minecraft.client.render.debug.EntityHitboxDebugRenderer;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
|
||||
@Mixin(EntityHitboxDebugRenderer.class)
|
||||
@@ -16,4 +18,11 @@ public abstract class EntityHitboxDebugRendererMixin {
|
||||
if (hitboxes.isEnabled()) return hitboxes.color.getRGB();
|
||||
return original;
|
||||
}
|
||||
|
||||
@ModifyArg(method = "drawHitbox", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/debug/gizmo/GizmoDrawing;box(Lnet/minecraft/util/math/Box;Lnet/minecraft/client/render/DrawStyle;)Lnet/minecraft/world/debug/gizmo/VisibilityConfigurable;"))
|
||||
private DrawStyle modifyHitboxLineWidth(DrawStyle original) {
|
||||
Hitboxes hitboxes = ModuleManager.INSTANCE.getModuleByClass(Hitboxes.class);
|
||||
if (hitboxes.isEnabled()) return DrawStyle.stroked(original.stroke(), hitboxes.lineWidth.getFloatValue());
|
||||
return original;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.render;
|
||||
|
||||
|
||||
import me.retucio.sputnik.event.events.render.GetFOVEvent;
|
||||
import me.retucio.sputnik.event.render.GetFOVEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
import me.retucio.sputnik.module.modules.misc.UnfocusedCpu;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package me.retucio.sputnik.mixin.mixins.render;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
|
||||
import me.retucio.sputnik.event.events.render.RenderHeldItemEvent;
|
||||
import me.retucio.sputnik.event.events.render.RenderArmEvent;
|
||||
import me.retucio.sputnik.event.render.RenderHeldItemEvent;
|
||||
import me.retucio.sputnik.event.render.RenderArmEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.player.HandView;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
|
||||
@@ -3,8 +3,8 @@ package me.retucio.sputnik.mixin.mixins.render;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import com.mojang.blaze3d.buffers.GpuBufferSlice;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.render.Render3DEvent;
|
||||
import me.retucio.sputnik.event.events.render.RenderBlockOutlineEvent;
|
||||
import me.retucio.sputnik.event.render.Render3DEvent;
|
||||
import me.retucio.sputnik.event.render.RenderBlockOutlineEvent;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.camera.Freecam;
|
||||
import me.retucio.sputnik.module.modules.render.NoRender;
|
||||
@@ -15,10 +15,8 @@ import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.RotationAxis;
|
||||
import net.minecraft.util.profiler.Profiler;
|
||||
import org.joml.Matrix4f;
|
||||
import org.joml.Matrix4fc;
|
||||
import org.joml.Vector4f;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.*;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import com.llamalad7.mixinextras.sugar.Local;
|
||||
import me.retucio.sputnik.mixin.accessors.KeyBindingAccessor;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
import me.retucio.sputnik.module.modules.misc.CreativeInventoryHotbarKeybinds;
|
||||
import me.retucio.sputnik.module.modules.inventory.CreativeInventoryHotbarKeybinds;
|
||||
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
|
||||
import net.minecraft.client.input.KeyInput;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@@ -3,7 +3,7 @@ package me.retucio.sputnik.mixin.mixins.screen;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import me.retucio.sputnik.command.CommandManager;
|
||||
import me.retucio.sputnik.config.ConfigManager;
|
||||
import me.retucio.sputnik.event.events.input.ClientClickEvent;
|
||||
import me.retucio.sputnik.event.input.ClientClickEvent;
|
||||
import me.retucio.sputnik.ui.widgets.frames.settings.ClientSettingsFrame;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package me.retucio.sputnik.mixin.mixins.world;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.events.interact.BlockShapeEvent;
|
||||
import me.retucio.sputnik.event.interact.BlockShapeEvent;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package me.retucio.sputnik.mixin.mixins.world;
|
||||
|
||||
import me.retucio.sputnik.event.events.network.ChunkOcclusionEvent;
|
||||
import me.retucio.sputnik.event.network.ChunkOcclusionEvent;
|
||||
import net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.mixin.mixins.world;
|
||||
|
||||
import me.retucio.sputnik.event.events.network.AddEntityEvent;
|
||||
import me.retucio.sputnik.event.events.network.RemoveEntityEvent;
|
||||
import me.retucio.sputnik.event.network.AddEntityEvent;
|
||||
import me.retucio.sputnik.event.network.RemoveEntityEvent;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -12,6 +12,7 @@ public enum Category {
|
||||
RENDER("renderizado"),
|
||||
|
||||
NETWORK("red"),
|
||||
INVENTORY("inventario"),
|
||||
|
||||
CLIENT("cliente"),
|
||||
MISC("misc."),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package me.retucio.sputnik.module;
|
||||
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.config.ConfigManager;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.ToggleModuleEvent;
|
||||
import me.retucio.sputnik.event.sputnik.ToggleModuleEvent;
|
||||
import me.retucio.sputnik.module.setting.SettingGroup;
|
||||
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
|
||||
import me.retucio.sputnik.module.setting.settings.EnumSetting;
|
||||
@@ -104,8 +104,8 @@ public class Module {
|
||||
public void onEnable() {
|
||||
if (notify.getValue()) ChatUtil.info(getName() + " fue activado");
|
||||
for (Method method : getClass().getDeclaredMethods())
|
||||
if (method.isAnnotationPresent(SubscribeEvent.class)) {
|
||||
Sputnik.EVENT_BUS.register(this);
|
||||
if (method.isAnnotationPresent(EventListener.class)) {
|
||||
Sputnik.EVENT_BUS.subscribe(this);
|
||||
break;
|
||||
}
|
||||
Sputnik.EVENT_BUS.post(new ToggleModuleEvent(this));
|
||||
@@ -113,8 +113,8 @@ public class Module {
|
||||
|
||||
public void onDisable() {
|
||||
if (notify.getValue()) ChatUtil.info(getName() + " fue desactivado");
|
||||
if (Sputnik.EVENT_BUS.isRegistered(this))
|
||||
Sputnik.EVENT_BUS.unregister(this);
|
||||
if (Sputnik.EVENT_BUS.isSubscribed(this))
|
||||
Sputnik.EVENT_BUS.unsubscribe(this);
|
||||
Sputnik.EVENT_BUS.post(new ToggleModuleEvent(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module;
|
||||
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.module.modules.client.DiscordRPC;
|
||||
import me.retucio.sputnik.module.modules.client.HUD;
|
||||
import me.retucio.sputnik.module.modules.camera.*;
|
||||
@@ -9,6 +9,7 @@ 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.inventory.*;
|
||||
import me.retucio.sputnik.module.modules.misc.*;
|
||||
import me.retucio.sputnik.module.modules.movement.*;
|
||||
import me.retucio.sputnik.module.modules.network.*;
|
||||
@@ -51,8 +52,8 @@ public class ModuleManager {
|
||||
// registrar los "listeners" necesarios
|
||||
for (Module module : getEnabledModules()) {
|
||||
for (Method method : module.getClass().getDeclaredMethods()) {
|
||||
if (method.isAnnotationPresent(SubscribeEvent.class)) {
|
||||
Sputnik.EVENT_BUS.register(module);
|
||||
if (method.isAnnotationPresent(EventListener.class)) {
|
||||
Sputnik.EVENT_BUS.subscribe(module);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -90,6 +91,7 @@ public class ModuleManager {
|
||||
add(new ChatPlus());
|
||||
add(new CreativeInventoryHotbarKeybinds());
|
||||
add(new FakePlayer());
|
||||
add(new Replenish());
|
||||
add(new ScreenshotPlus());
|
||||
add(new ShulkerPeek());
|
||||
add(new UnfocusedCpu());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module.modules.camera;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.network.PacketEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.network.PacketEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.settings.EnumSetting;
|
||||
@@ -50,7 +50,7 @@ public class Autism extends Module {
|
||||
));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onPacketSend(PacketEvent.Send event) {
|
||||
if (event.getPacket() instanceof PlayerMoveC2SPacket.LookAndOnGround packet
|
||||
&& packet.getYaw(yaw) != yaw) event.cancel();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package me.retucio.sputnik.module.modules.camera;
|
||||
|
||||
import me.retucio.sputnik.event.Stage;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.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 com.github.retucio.neutrino.Event;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.input.KeyEvent;
|
||||
import me.retucio.sputnik.event.input.MouseClickEvent;
|
||||
import me.retucio.sputnik.event.input.MouseScrollEvent;
|
||||
import me.retucio.sputnik.event.interact.*;
|
||||
import me.retucio.sputnik.event.network.ChunkOcclusionEvent;
|
||||
import me.retucio.sputnik.event.network.DisconnectEvent;
|
||||
import me.retucio.sputnik.event.network.PacketEvent;
|
||||
import me.retucio.sputnik.mixin.mixins.entity.EntityMixin;
|
||||
import me.retucio.sputnik.mixin.mixins.io.KeyInputMixin;
|
||||
import me.retucio.sputnik.mixin.mixins.player.ClientPlayerInteractionManagerMixin;
|
||||
@@ -207,10 +207,10 @@ public class Freecam extends Module {
|
||||
pos.set(pos.x + dx, pos.y + dy, pos.z + dz);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onSendPacket(PacketEvent.Send event) {
|
||||
if (!isEnabled() || !cancelActionPackets.getValue()) return;
|
||||
if (event.getStage() != Stage.PRE) return;
|
||||
if (event.getStage() != Event.Stage.PRE) return;
|
||||
|
||||
Packet<?> packet = event.getPacket();
|
||||
if (packet instanceof PlayerActionC2SPacket
|
||||
@@ -221,7 +221,7 @@ public class Freecam extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onKey(KeyEvent event) {
|
||||
if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
|
||||
if (mc.currentScreen != null) return;
|
||||
@@ -254,7 +254,7 @@ public class Freecam extends Module {
|
||||
if (shouldCancel) event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onMouseClick(MouseClickEvent event) { // por si el restrasado del usuario usa el ratón para moverse
|
||||
if (KeyUtil.isKeyDown(GLFW.GLFW_KEY_F3)) return;
|
||||
if (mc.currentScreen != null) return;
|
||||
@@ -287,7 +287,7 @@ public class Freecam extends Module {
|
||||
if (shouldCancel) event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onMouseScroll(MouseScrollEvent event) {
|
||||
if (scrollSens.getValue() > 0 && mc.currentScreen == null && scrollKey.isDown()) {
|
||||
speed += event.getVertical() / 4 * (scrollSens.getValue() * speed);
|
||||
@@ -296,17 +296,17 @@ public class Freecam extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onChunkOcclusion(ChunkOcclusionEvent event) {
|
||||
event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onLeaveGame(DisconnectEvent event) {
|
||||
toggle();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onPacketReceive(PacketEvent.Receive event) {
|
||||
if (mc.player == null) return; // el jugador probablemente nunca sea nulo bajo estas circunstancias pero quién sabe
|
||||
|
||||
@@ -321,7 +321,7 @@ public class Freecam extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onOpenScreen(OpenScreenEvent event) {
|
||||
unpress();
|
||||
stopMoving();
|
||||
@@ -332,22 +332,22 @@ public class Freecam extends Module {
|
||||
|
||||
// los paquetes ya se cancelan, pero visualmente estos eventos se siguen dando
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onBreakBlock(BreakBlockEvent event) {
|
||||
if (cancelActionPackets.getValue()) event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onPlaceBlock(PlaceBlockEvent event) {
|
||||
if (cancelActionPackets.getValue()) event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onInteractEntity(InteractEntityEvent event) {
|
||||
if (cancelActionPackets.getValue()) event.cancel();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onAttack(AttackEntityEvent event) {
|
||||
if (cancelActionPackets.getValue()) event.cancel();
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package me.retucio.sputnik.module.modules.camera;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
|
||||
import me.retucio.sputnik.event.events.render.PerspectiveChangeEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.input.MouseScrollEvent;
|
||||
import me.retucio.sputnik.event.render.PerspectiveChangeEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.SettingGroup;
|
||||
@@ -45,12 +45,12 @@ public class PerspectivePlus extends Module {
|
||||
super.onEnable();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onPerspectiveChange(PerspectiveChangeEvent event) {
|
||||
distance = defaultDistance.getValue();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onMouseScroll(MouseScrollEvent event) {
|
||||
if (mc.options.getPerspective() == net.minecraft.client.option.Perspective.FIRST_PERSON
|
||||
|| mc.currentScreen != null || scrollSens.getValue() <= 0) return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module.modules.camera;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.render.ChangeRotationEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.render.ChangeRotationEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
|
||||
@@ -40,7 +40,7 @@ public class Rotations extends Module {
|
||||
);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onChangeRotation(ChangeRotationEvent event) {
|
||||
if (smooth.getValue()
|
||||
&& (event.getYaw() != yaw.getFloatValue() || event.getPitch() != pitch.getFloatValue())){
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package me.retucio.sputnik.module.modules.camera;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.render.GetFOVEvent;
|
||||
import me.retucio.sputnik.event.events.input.MouseScrollEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.render.GetFOVEvent;
|
||||
import me.retucio.sputnik.event.input.MouseScrollEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.SettingGroup;
|
||||
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
|
||||
import me.retucio.sputnik.module.setting.settings.KeySetting;
|
||||
import me.retucio.sputnik.module.setting.settings.NumberSetting;
|
||||
import me.retucio.sputnik.ui.screen.UpdateScreen;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
// continúa en GameRendererMixin
|
||||
@@ -88,7 +87,6 @@ public class Zoom extends Module {
|
||||
mc.options.getMouseSensitivity().setValue(prevMouseSens * mouseSensMultiplier.getValue());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
private void onMouseScroll(MouseScrollEvent event) {
|
||||
boolean key = scrollKey.getValue() == GLFW.GLFW_KEY_UNKNOWN || scrollKey.isDown();
|
||||
if (isEnabled() && scrollSens.getValue() > 0 && key) {
|
||||
@@ -99,7 +97,7 @@ public class Zoom extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onGetFov(GetFOVEvent event) {
|
||||
event.setFov((float) (event.getFov() / value));
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package me.retucio.sputnik.module.modules.client;
|
||||
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.Sputnik;
|
||||
import me.retucio.sputnik.command.CommandManager;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.TickEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.LoadClickGUIEvent;
|
||||
import me.retucio.sputnik.event.events.sputnik.LoadCommandManagerEvent;
|
||||
import me.retucio.sputnik.event.TickEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadClickGUIEvent;
|
||||
import me.retucio.sputnik.event.sputnik.LoadCommandManagerEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.ModuleManager;
|
||||
@@ -111,13 +111,13 @@ public class GUI extends Module {
|
||||
Category.CLIENT,
|
||||
GLFW.GLFW_KEY_RIGHT_SHIFT);
|
||||
|
||||
me.retucio.sputnik.Sputnik.EVENT_BUS.register(this);
|
||||
Sputnik.EVENT_BUS.subscribe(this);
|
||||
keyMode.setVisible(false);
|
||||
notify.setVisible(false);
|
||||
searchBar.onUpdate(v -> matchCase.setVisible(v));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
public void onLoadCommandManager(LoadCommandManagerEvent event) {
|
||||
commandPrefix.onUpdate(CommandManager.INSTANCE::setPrefix);
|
||||
commandPrefix.setDefaultValue(CommandManager.INSTANCE.getPrefix());
|
||||
@@ -128,7 +128,7 @@ public class GUI extends Module {
|
||||
});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
public void onLoadClickGUI(LoadClickGUIEvent event) {
|
||||
color.onUpdate(v -> {
|
||||
Colors.red = color.getR();
|
||||
@@ -139,7 +139,7 @@ public class GUI extends Module {
|
||||
});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
public void onTick(TickEvent.Post event) {
|
||||
if (color.isRainbow()) {
|
||||
Colors.red = color.getR();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module.modules.combat;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.interact.AttackEntityEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.interact.AttackEntityEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
|
||||
@@ -33,7 +33,7 @@ public class AttributeSwapper extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
public void onAttack(AttackEntityEvent event) {
|
||||
prevSlot = mc.player.getInventory().getSelectedSlot();
|
||||
mc.player.getInventory().setSelectedSlot(slot.getIntValue() - 1);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module.modules.combat;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.network.PacketEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.network.PacketEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.settings.BooleanSetting;
|
||||
@@ -46,8 +46,8 @@ public class MaceKill extends Module {
|
||||
max.onUpdate(v -> height.setVisible(!v));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@EventListener
|
||||
private void onPacketSend(PacketEvent.Send event) {
|
||||
if (mc.player == null) return;
|
||||
if (mc.player.getMainHandStack().getItem() == Items.MACE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package me.retucio.sputnik.module.modules.combat;
|
||||
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.render.Render3DEvent;
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import me.retucio.sputnik.event.render.Render3DEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.SettingGroup;
|
||||
@@ -121,7 +121,7 @@ public class ProjectileTrajectories extends Module {
|
||||
});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
public void onRenderWorld(Render3DEvent event) {
|
||||
if (mc.player == null) return;
|
||||
renderProjectileTrajectory(event.getMatrices());
|
||||
|
||||
@@ -114,6 +114,7 @@ public class SpearKill extends Module {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+7
-7
@@ -1,9 +1,9 @@
|
||||
package me.retucio.sputnik.module.modules.misc;
|
||||
package me.retucio.sputnik.module.modules.inventory;
|
||||
|
||||
import com.github.retucio.neutrino.EventListener;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
import me.retucio.sputnik.event.SubscribeEvent;
|
||||
import me.retucio.sputnik.event.events.network.DisconnectEvent;
|
||||
import me.retucio.sputnik.event.events.network.PacketEvent;
|
||||
import me.retucio.sputnik.event.network.DisconnectEvent;
|
||||
import me.retucio.sputnik.event.network.PacketEvent;
|
||||
import me.retucio.sputnik.module.Category;
|
||||
import me.retucio.sputnik.module.Module;
|
||||
import me.retucio.sputnik.module.setting.settings.NumberSetting;
|
||||
@@ -51,7 +51,7 @@ public class BundleDupe extends Module {
|
||||
public BundleDupe() {
|
||||
super("dupe de bundle",
|
||||
"dupea items usando un bundle y un libro",
|
||||
Category.MISC
|
||||
Category.INVENTORY
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ public class BundleDupe extends Module {
|
||||
this.waitingForKeepAlive = false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onDisconnect(DisconnectEvent event) {
|
||||
this.toggle();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@EventListener
|
||||
private void onPacketSend(PacketEvent.Send event) {
|
||||
if (this.dupeActivated && event.getPacket() instanceof PlayerActionC2SPacket) {
|
||||
event.cancel();
|
||||
Loaded 100 of 151 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user