This commit is contained in:
retuci0 committed 2026-04-30 22:24:33 +02:00
1 parent e84382367e
commit 47ad2c67c5
16 files changed
+289 -28

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ mod para Minecraft Fabric 26.1 que añade algunas cosas QOL, mayormente relacion
3. descargar el .jar
4. moverlo a tu directorio de mods (probablemente `%appdata%/.minecraft/mods`)
asegúrate de tener una version de Minecraft y Fabric compatibles con el mod (MC `26.1`; Fabric `0.18.5`)
asegúrate de tener una version de Minecraft y Fabric compatibles con el mod (MC `26.1.2`; Fabric `0.19.2`)
es posible que haya problemas al usarlo junto a otros mods, especialmente junto a otros clientes, pues pueden conflictar entre ellos.
### para frikis de 200 de iq
+8 -4
View File
@@ -1,4 +1,4 @@
# v4.2
# v4.3
## novedades
@@ -6,11 +6,15 @@
#### módulos nuevos:
- mira plus: personalizaciones a la mira (crosshair)
- moro: te permite robar items de cofres más fácilmente
### arreglos / mejoras
- freecam ya no crashea, pero el movimiento se siente laggy
- info. de bloque ahora funciona y tal
- arreglado varios crashes
## problemas reconocidos
- brilli brilli (modo gamma) solo funciona al cambiar el modo de poción a gamma, y no al activarlo sin más
- lo de siempre, pero más
- lo de siempre, +
+1 -1
View File
@@ -10,6 +10,6 @@ discord_rpc_version=1.0.3
neutrino_version=1.1.0
jdk_version=25
mod_version=4.2
mod_version=4.3
maven_group=me.retucio
archives_base_name=sputnik
@@ -1,9 +1,12 @@
package me.retucio.sputnik.mixin.mixins.hud;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import me.retucio.sputnik.Sputnik;
import me.retucio.sputnik.event.render.Render2DEvent;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.camera.CrosshairPlus;
import me.retucio.sputnik.module.modules.misc.ChatPlus;
import me.retucio.sputnik.module.modules.camera.Freecam;
import me.retucio.sputnik.module.modules.render.NoRender;
@@ -11,12 +14,16 @@ import me.retucio.sputnik.ui.hud.HudRenderer;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.renderer.RenderPipelines;
import net.minecraft.resources.Identifier;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;
@Mixin(Gui.class)
public abstract class GuiMixin {
@@ -75,6 +82,18 @@ public abstract class GuiMixin {
HudRenderer.render(gui, dt);
}
@Redirect(method = "extractCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphicsExtractor;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/Identifier;IIII)V", ordinal = 0))
private void onRenderCrosshair(GuiGraphicsExtractor gui, RenderPipeline pipeline, Identifier id, int x, int y, int width, int height) {
// dangerous abbreviation
CrosshairPlus cp = ModuleManager.INSTANCE.getModuleByClass(CrosshairPlus.class);
int color = cp.isEnabled() ? cp.color.getRGB() : -1;
int w = cp.isEnabled() ? cp.width.getIntValue() : width;
int h = cp.isEnabled() ? cp.height.getIntValue() : height;
gui.blitSprite(pipeline, id, (gui.guiWidth() - w) / 2, (gui.guiHeight() - h) / 2, w, h, color);
}
@ModifyExpressionValue(method = "extractCrosshair", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/CameraType;isFirstPerson()Z"))
private boolean alwaysRenderCrosshairInFreecam(boolean firstPerson) {
return ModuleManager.INSTANCE.getModuleByClass(Freecam.class).isEnabled() || firstPerson;
@@ -59,7 +59,7 @@ public abstract class FogRendererMixin {
args.set(0, original.x);
args.set(1, original.y);
args.set(2, original.z);
args.set(3, 0);
args.set(3, 0f);
}
}
@@ -0,0 +1,49 @@
package me.retucio.sputnik.mixin.mixins.screen;
import me.retucio.sputnik.module.ModuleManager;
import me.retucio.sputnik.module.modules.inventory.Burglar;
import net.minecraft.client.gui.components.Button;
import net.minecraft.client.gui.layouts.LinearLayout;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component;
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(AbstractContainerScreen.class)
public abstract class AbstractContainerScreenMixin {
@Inject(method = "init", at = @At("RETURN"))
private void addStealAndDumpButtons(CallbackInfo ci) {
Burglar burglar = ModuleManager.INSTANCE.getModuleByClass(Burglar.class);
if (!burglar.isEnabled()) return;
AbstractContainerScreen<?> screen = (AbstractContainerScreen<?>) (Object) this;
int bw = 50;
int bh = 20;
int gap = 10;
int w = bw * 2 + gap;
int bgLeft = (screen.width - screen.imageWidth) / 2;
int bgTop = (screen.height - screen.imageHeight) / 2;
int bx = bgLeft + (screen.imageWidth - w) / 2;
int by = bgTop - bh - 5;
if (burglar.showStealButton.getValue()) {
Button stealButton = Button.builder(Component.literal("robar"), bnutton -> {
burglar.steal(screen);
}).bounds(bx, by, bw, bh).build();
screen.addRenderableWidget(stealButton);
}
if (burglar.showDumpButton.getValue()) {
Button dumpButton = Button.builder(Component.literal("dejar"), button -> {
burglar.dump(screen);
}).bounds(bx + bw + gap, by, bw, bh).build();
screen.addRenderableWidget(dumpButton);
}
}
}
@@ -67,6 +67,7 @@ public class ModuleManager {
private void addCamera() {
add(new Autism());
add(new CrosshairPlus());
add(new Freecam());
add(new Freelook());
add(new Fullbright());
@@ -102,6 +103,7 @@ public class ModuleManager {
private void addInventory() {
add(new BundleDupe());
add(new Burglar());
add(new CreativeInventoryHotbarKeybinds());
add(new InventoryPlus());
add(new Offhand());
@@ -0,0 +1,48 @@
package me.retucio.sputnik.module.modules.camera;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import me.retucio.sputnik.module.Category;
import me.retucio.sputnik.module.Module;
import me.retucio.sputnik.module.setting.settings.ColorSetting;
import me.retucio.sputnik.module.setting.settings.NumberSetting;
import java.awt.*;
/** continúa en:
* @see me.retucio.sputnik.mixin.mixins.hud.GuiMixin#onRenderCrosshair
*
* @author retucio
*/
public class CrosshairPlus extends Module {
public final ColorSetting color = sgGeneral.add(new ColorSetting(
"color",
"color de la mira",
new Color(255, 255, 255, 255),
false
));
public final NumberSetting width = sgGeneral.add(new NumberSetting(
"anchura",
"anchura de la mira",
15,
1,
150,
1
));
public final NumberSetting height = sgGeneral.add(new NumberSetting(
"altura",
"altura de la mira",
15,
1,
150,
1
));
public CrosshairPlus() {
super("mira plus", "customiza la mira (crosshair)", Category.CAMERA);
}
}
@@ -0,0 +1,96 @@
package me.retucio.sputnik.module.modules.inventory;
import com.github.retucio.neutrino.EventListener;
import me.retucio.sputnik.event.input.KeyEvent;
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.util.ChatUtil;
import me.retucio.sputnik.util.InventoryUtil;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.world.Container;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.ItemStack;
import org.jspecify.annotations.NonNull;
import org.lwjgl.glfw.GLFW;
import java.util.List;
/**
* @author retucio
*/
public class Burglar extends Module {
private final SettingGroup sgKeys = addSg(new SettingGroup("teclas", true));
private final KeySetting triggerKey = sgKeys.add(new KeySetting(
"tecla activadora",
"tecla a mantener para que las otras teclas funcionen",
GLFW.GLFW_KEY_LEFT_CONTROL
));
private final KeySetting stealKey = sgKeys.add(new KeySetting(
"robar",
"tecla para robar todo",
GLFW.GLFW_KEY_S
));
private final KeySetting dumpKey = sgKeys.add(new KeySetting(
"dejar",
"tecla para dejar todo",
GLFW.GLFW_KEY_D
));
public final BooleanSetting showStealButton = sgGeneral.add(new BooleanSetting(
"mostrar botón de robar",
"mostrar un botón para robar todo en los inventarios de contenedores",
true
));
public final BooleanSetting showDumpButton = sgGeneral.add(new BooleanSetting(
"mostrar botón de dejar",
"mostrar un botón para dejar todo en los inventarios de contenedores",
true
));
public Burglar() {
super("moro", "roba cofres con más facilidad", Category.INVENTORY);
}
@EventListener
private void onKey(KeyEvent event) {
if (!triggerKey.isDown() || event.getAction() != GLFW.GLFW_PRESS
|| !(mc.screen instanceof AbstractContainerScreen<?> container)) return;
if (event.getKey() == stealKey.getValue()) steal(container);
if (event.getKey() == dumpKey.getValue()) dump(container);
}
public void steal(@NonNull AbstractContainerScreen<?> container) {
AbstractContainerMenu menu = container.getMenu();
int stacks = menu.slots.size() - 36;
for (int i = 0; i < stacks; i++) {
if (!menu.getSlot(i).hasItem()) continue;
InventoryUtil.quickMove(i, container);
}
}
public void dump(@NonNull AbstractContainerScreen<?> container) {
AbstractContainerMenu menu = container.getMenu();
int stacks = menu.slots.size() - 36;
if (stacks <= 0) return;
for (int slot = stacks; slot <= menu.slots.size() - 1; slot++) {
if (!menu.getSlot(slot).hasItem()) continue;
InventoryUtil.quickMove(slot, container);
}
}
}
@@ -25,7 +25,7 @@ public class BlockOutline extends Module {
private final NumberSetting lineWidth = sgGeneral.add(new NumberSetting(
"grosor",
"grosor de las líneas",
0.5,
1,
0.1,
10,
0.1
@@ -66,7 +66,7 @@ public class NoRender extends Module {
public final BooleanSetting stuckArrows = sgMisc.add(new BooleanSetting("flechas clavadas", "renderizar flechas clavadas en jugadores", false));
public NoRender() {
super("no extractRenderState",
super("no render",
"customiza qué se renderiza y qué no",
Category.RENDER);
}
@@ -10,6 +10,9 @@ import me.retucio.sputnik.module.setting.settings.EnumSetting;
import me.retucio.sputnik.module.setting.settings.KeySetting;
import me.retucio.sputnik.util.ChatUtil;
import net.minecraft.core.BlockPos;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.Identifier;
import net.minecraft.world.inventory.DataSlot;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.Property;
@@ -18,6 +21,8 @@ import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import org.lwjgl.glfw.GLFW;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
public class BlockInfo extends Module {
@@ -76,16 +81,45 @@ public class BlockInfo extends Module {
}
private void copy(BlockHitResult result, Collection<Property<?>> data) {
String json = new Gson().toJson(data);
String name = mc.level.getBlockState(result.getBlockPos()).getBlock().getDescriptionId();
Vec3 pos = result.getLocation();
BlockPos pos = result.getBlockPos();
BlockState state = mc.level.getBlockState(pos);
Map<String, String> propertyMap = new LinkedHashMap<>();
for (Property<?> property : data) {
propertyMap.put(property.getName(), state.getValue(property).toString());
}
if (propertyMap.isEmpty()) {
ChatUtil.warn("no hay propiedades que copiar para este bloque");
return;
}
String json = new Gson().toJson(propertyMap);
switch (copy.getValue()) {
case JSON -> mc.keyboardHandler.setClipboard(json);
case COMMAND -> mc.keyboardHandler.setClipboard(
String.format("/setblock %f %f %f %s %s", pos.x, pos.y, pos.z, name, json));
String.format("/setblock %d %d %d %s", pos.getX(), pos.getY(), pos.getZ(), formatBlockState(state))
);
}
}
private String formatBlockState(BlockState state) {
Identifier id = BuiltInRegistries.BLOCK.getKey(state.getBlock());
StringBuilder sb = new StringBuilder(id.toString());
Collection<Property<?>> props = state.getProperties();
if (!props.isEmpty()) {
sb.append("[");
boolean first = true;
for (Property<?> prop : props) {
if (!first) sb.append(",");
sb.append(prop.getName()).append("=").append(state.getValue(prop).toString());
first = false;
}
sb.append("]");
}
return sb.toString();
}
private enum CopyMode {
DONT("no copiar"),
COMMAND("copiar comando /setblock"),
@@ -82,6 +82,7 @@ public class KeyUtil {
case GLFW.GLFW_KEY_RIGHT -> "derecha";
case GLFW.GLFW_KEY_PAGE_UP -> "pág. arriba";
case GLFW.GLFW_KEY_PAGE_DOWN -> "pág. abajo";
case GLFW.GLFW_KEY_CAPS_LOCK -> "bloq. mayús.";
default -> {
if (key >= GLFW.GLFW_KEY_F1 && key <= GLFW.GLFW_KEY_F25)
yield "F" + (key - GLFW.GLFW_KEY_F1 + 1); // F1–F25
@@ -42,32 +42,34 @@ public class Lists {
// intentar traducir nombres y fallar miserablemente
public static void init() {
entityNames = getMapOfLists(entityList,
entityList.stream().map(entity -> Component.translatable(entity.getDescriptionId()).getString()).toList());
entityList.stream().map(entity -> Component.translatable(
entity.getDescriptionId()
).getString()).toList());
particleNames = getMapOfLists(particleList,
particleList.stream().map(particle -> Component.translatable(
BuiltInRegistries.PARTICLE_TYPE.getKey(particle).toShortLanguageKey()
).toString()).toList());
BuiltInRegistries.PARTICLE_TYPE.getKey(particle).toLanguageKey()
).getString()).toList());
itemNames = getMapOfLists(itemList,
itemList.stream().map(item -> Component.translatable(
item.getDescriptionId()).getString()
).toList());
item.getDescriptionId()
).getString()).toList());
blockNames = getMapOfLists(blockList,
blockList.stream().map(block -> Component.translatable(
block.getDescriptionId()).getString()
).toList());
block.getDescriptionId()
).getString()).toList());
soundNames = getMapOfLists(soundList,
soundList.stream().map(sound -> Component.translatable(
sound.location().toShortLanguageKey()).getString()
).toList());
sound.location().toShortLanguageKey()
).getString()).toList());
screenNames = getMapOfLists(screenList,
screenList.stream().map(screen -> Component.translatable(
BuiltInRegistries.MENU.getKey(screen).toShortLanguageKey()).getString()
).toList());
BuiltInRegistries.MENU.getKey(screen).toLanguageKey()
).getString()).toList());
colorList.addAll(Arrays.asList(
RED, ORANGE, YELLOW, LIME, GREEN, CYAN,
+7 -2
View File
@@ -33,9 +33,14 @@ accessible field net/minecraft/client/particle/Particle hasPhysics Z
# renderizado 3d
accessible method net/minecraft/client/renderer/rendertype/RenderType <init> (Ljava/lang/String;Lnet/minecraft/client/renderer/rendertype/RenderSetup;)V
# pantallas
accessible field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen imageWidth I
accessible field net/minecraft/client/gui/screens/inventory/AbstractContainerScreen imageHeight I
accessible method net/minecraft/client/gui/screens/Screen addRenderableWidget (Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener;
accessible method net/minecraft/world/inventory/MenuType register (Ljava/lang/String;Lnet/minecraft/world/inventory/MenuType$MenuSupplier;)Lnet/minecraft/world/inventory/MenuType;
# misc.
accessible class net/minecraft/world/entity/projectile/FishingHook$FishHookState
accessible method net/minecraft/client/Minecraft startUseItem ()V
accessible class net/minecraft/world/entity/projectile/FishingHook$FishHookState
accessible method net/minecraft/client/KeyboardHandler keyPress (JILnet/minecraft/client/input/KeyEvent;)V
accessible method net/minecraft/client/renderer/entity/layers/WingsLayer getPlayerElytraTexture (Lnet/minecraft/client/renderer/entity/state/HumanoidRenderState;)Lnet/minecraft/resources/Identifier;
accessible method net/minecraft/world/inventory/MenuType register (Ljava/lang/String;Lnet/minecraft/world/inventory/MenuType$MenuSupplier;)Lnet/minecraft/world/inventory/MenuType;
+3 -2
View File
@@ -24,9 +24,9 @@
"mixins.network.ConnectionMixin",
"mixins.network.ServerConnectorMixin",
"mixins.network.YggdrasilUserApiServiceMixin",
"mixins.player.PlayerMixin",
"mixins.player.InputMixin",
"mixins.player.PlayerInventoryMixin",
"mixins.player.PlayerMixin",
"mixins.world.BlockCollisionsMixin"
],
"injectors": {
@@ -56,11 +56,11 @@
"mixins.misc.FontManagerMixin",
"mixins.misc.MinecraftMixin",
"mixins.misc.OptionsMixin",
"mixins.network.ChatListenerMixin",
"mixins.network.ClientCommonPacketListenerImplMixin",
"mixins.network.ClientPacketListenerMixin",
"mixins.network.ClientTelemetryManagerMixin",
"mixins.network.CommandSuggestionsMixin",
"mixins.network.ChatListenerMixin",
"mixins.network.ServerDataMixin",
"mixins.network.ServerPackStatusMixin",
"mixins.player.LocalPlayerMixin",
@@ -88,6 +88,7 @@
"mixins.render.SkyRendererMixin",
"mixins.render.WeatherEffectRendererMixin",
"mixins.render.WingsLayerMixin",
"mixins.screen.AbstractContainerScreenMixin",
"mixins.screen.ChatScreenMixin",
"mixins.screen.ConfirmScreenMixin",
"mixins.screen.CreativeModeInventoryScreenMixin",