This commit is contained in:
retuci0 committed 2025-12-22 18:54:02 +01:00
1 parent 6b2ec0e69a
commit 2329476fe4
86 files changed
+1177 -173

No files matched your search

@@ -77,6 +77,7 @@ public class CameraTweaks implements ClientModInitializer {
System.setProperty("java.awt.headless", "false");
mc = MinecraftClient.getInstance();
ConfigManager.load();
EVENT_BUS.register(this);
EVENT_BUS.register(MiscUtil.class);
@@ -95,8 +96,6 @@ public class CameraTweaks implements ClientModInitializer {
HudEditorScreen.INSTANCE = new HudEditorScreen();
EVENT_BUS.post(new LoadClickGUIEvent());
ConfigManager.load();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
ConfigManager.save();
EVENT_BUS.post(new ShutdownEvent());
@@ -105,14 +104,14 @@ public class CameraTweaks implements ClientModInitializer {
// se ejecuta cada tick, es decir, 20 veces por segundo
public void onTick() {
ModuleManager.INSTANCE.getEnabledModules().forEach(Module::onTick);
if (!settingsApplied
&& ConfigManager.getConfig() != null
&& mc.player != null && mc.world != null) {
&& !ConfigManager.hasLoaded()) {
ConfigManager.applyConfig();
settingsApplied = true;
}
ModuleManager.INSTANCE.getEnabledModules().forEach(Module::onTick);
}
@@ -173,7 +172,6 @@ public class CameraTweaks implements ClientModInitializer {
// maneja la lógica de apertura de la interfaz
private void handleClickGUIKey(int key, boolean anyFocused) {
if (key != ClientSettingsFrame.guiSettings.getKey() || anyFocused) return;
if (!(mc != null && mc.world != null && mc.player != null)) 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
@@ -189,7 +187,6 @@ public class CameraTweaks implements ClientModInitializer {
// manejar la lógica de apertura del editor de elementos del hud, con la misma lógica que handleClickGUIKey()
private void handleHudEditorKey(int key, boolean anyFocused) {
if (key != ModuleManager.INSTANCE.getModuleByClass(HUD.class).editorKey.getKey() || anyFocused) return;
if (!(mc != null && mc.world != null && mc.player != null)) return;
if (mc.currentScreen != HudEditorScreen.INSTANCE) {
prevScreen = mc.currentScreen;
@@ -2,10 +2,14 @@ package me.retucio.camtweaks.command;
import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.camtweaks.CameraTweaks;
import me.retucio.camtweaks.command.commands.*;
import me.retucio.camtweaks.event.SubscribeEvent;
import me.retucio.camtweaks.module.Module;
import net.minecraft.client.MinecraftClient;
import net.minecraft.command.CommandSource;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Comparator;
@@ -30,7 +34,7 @@ public class CommandManager {
public static void registerCommands() {
addCommand(new BindCommand());
addCommand(new CopyScreenshotCommand());
// addCommand(new EnderChestCommand()); no funciona D:
addCommand(new EnderChestCommand());
addCommand(new GarbageCleanerCommand());
addCommand(new PeekCommand());
addCommand(new PrefixCommand());
@@ -40,6 +44,15 @@ public class CommandManager {
addCommand(new ToggleCommand());
commands.sort(Comparator.comparing(Command::getName));
for (Command command : commands) {
for (Method method : command.getClass().getDeclaredMethods()) {
if (method.isAnnotationPresent(SubscribeEvent.class)) {
CameraTweaks.EVENT_BUS.register(command);
break;
}
}
}
}
public static void addCommand(Command command) {
@@ -1,37 +1,59 @@
package me.retucio.camtweaks.command.commands;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import me.retucio.camtweaks.CameraTweaks;
import me.retucio.camtweaks.command.Command;
import me.retucio.camtweaks.event.SubscribeEvent;
import me.retucio.camtweaks.event.events.DisconnectEvent;
import me.retucio.camtweaks.event.events.OpenScreenEvent;
import me.retucio.camtweaks.event.events.PacketEvent;
import me.retucio.camtweaks.event.events.TickEvent;
import me.retucio.camtweaks.ui.screen.PreviewScreen;
import me.retucio.camtweaks.util.ChatUtil;
import me.retucio.camtweaks.util.MiscUtil;
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen;
import net.minecraft.command.CommandSource;
import net.minecraft.inventory.EnderChestInventory;
import net.minecraft.inventory.Inventories;
import net.minecraft.inventory.Inventory;
import net.minecraft.inventory.SimpleInventory;
import net.minecraft.network.packet.s2c.play.CloseScreenS2CPacket;
import net.minecraft.screen.GenericContainerScreenHandler;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
// accede a los contenidos de tu enderchest
public class EnderChestCommand extends Command {
private boolean shouldOpenEchest = false;
public EnderChestCommand() {
super("echest", "muestra el contenido de tu enderchest", "ec", "enderchest");
super("echest", "muestra el contenido de tu enderchest (solo de ver)", "ec", "enderchest");
}
@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(ctx -> {
mc.execute(() -> { // para evitar llamar setScreen desde el hilo equivocado, que causa crashes
EnderChestInventory enderChestInv = mc.player.getEnderChestInventory();
mc.execute(() -> {
if (mc.player == null) return;
if (MiscUtil.getEchestInv() == null) {
ChatUtil.warn("necesitas abrir un enderchest una vez primero");
return;
}
// llámame imbécil pero no tengo ni idea de por qué no se abre
mc.setScreen(new GenericContainerScreen(
GenericContainerScreenHandler.createGeneric9x3(mc.player.currentScreenHandler.syncId + 1, mc.player.getInventory(), enderChestInv),
mc.player.getInventory(),
Text.translatable("container.enderchest")
));
shouldOpenEchest = true;
});
return SUCCESS;
});
}
@SubscribeEvent
public void tickEvent(TickEvent.Post event) {
if (shouldOpenEchest) {
shouldOpenEchest = false;
if (MiscUtil.getEchestInv() != null)
mc.setScreen(new PreviewScreen(MiscUtil.getEchestInv(), null));
}
}
}
@@ -23,6 +23,7 @@ public class ConfigManager {
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create();
private static final File CONFIG_FILE = new File("camera_tweaks.json");
private static boolean loaded = false;
private static ClientConfig config = null;
@@ -93,6 +94,8 @@ public class ConfigManager {
CameraTweaks.LOGGER.info("posiciones de frames cargadas");
ClickGUI.INSTANCE.refreshListButtons();
loaded = true;
}
public static ClientConfig getConfig() {
@@ -166,4 +169,8 @@ public class ConfigManager {
private static void ensureConfig() {
if (config == null) config = new ClientConfig();
}
public static boolean hasLoaded() {
return loaded;
}
}
@@ -0,0 +1,23 @@
package me.retucio.camtweaks.event.events;
import me.retucio.camtweaks.event.Event;
import net.minecraft.item.ItemStack;
public class DamageItemEvent extends Event {
private final int amount;
private final ItemStack stack;
public DamageItemEvent(int amount, ItemStack stack) {
this.amount = amount;
this.stack = stack;
}
public int getAmount() {
return amount;
}
public ItemStack getStack() {
return stack;
}
}
@@ -0,0 +1,32 @@
package me.retucio.camtweaks.event.events;
import me.retucio.camtweaks.event.Event;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
public class UseItemEvent extends Event {
private ItemStack stack;
private Hand hand;
public UseItemEvent(ItemStack stack, Hand hand) {
this.stack = stack;
this.hand = hand;
}
public ItemStack getStack() {
return stack;
}
public void setStack(ItemStack stack) {
this.stack = stack;
}
public Hand getHand() {
return hand;
}
public void setHand(Hand hand) {
this.hand = hand;
}
}
@@ -0,0 +1,20 @@
package me.retucio.camtweaks.mixin;
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
import me.retucio.camtweaks.util.render.GlintRenderLayer;
import net.minecraft.client.render.BufferBuilderStorage;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.util.BufferAllocator;
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(BufferBuilderStorage.class)
public abstract class BufferStorageMixin {
@Inject(method = "assignBufferBuilder", at = @At("HEAD"))
private static void addGlintTypes(Object2ObjectLinkedOpenHashMap<RenderLayer, BufferAllocator> builderStorage, RenderLayer layer, CallbackInfo ci) {
GlintRenderLayer.addGlintTypes(builderStorage);
}
}
@@ -0,0 +1,67 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.mixin.accessor.ConfirmServerResourcePackScreenAccessor;
import me.retucio.camtweaks.mixin.accessor.PackAccessor;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.RPackBypass;
import me.retucio.camtweaks.util.interfaces.IConfirmScreen;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.network.ClientCommonNetworkHandler;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.client.option.ServerList;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.packet.c2s.common.ResourcePackStatusC2SPacket;
import net.minecraft.text.Text;
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.callback.CallbackInfoReturnable;
import java.net.URL;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
@Mixin(ClientCommonNetworkHandler.class)
public abstract class ClientCommonNetworkHandlerMixin {
@Shadow @Final protected MinecraftClient client;
@Shadow @Final protected ServerInfo serverInfo;
@Shadow @Final protected ClientConnection connection;
@Unique // tardar 3 segundos porque algunos servers
private final Executor DELAYED_EXECUTOR = CompletableFuture.delayedExecutor(3L, TimeUnit.SECONDS);
@Inject(method = "createConfirmServerResourcePackScreen", at = @At("TAIL"))
private void setScreenBypassAction(UUID id, URL url, String hash, boolean required, Text prompt, CallbackInfoReturnable<Screen> cir) {
RPackBypass bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
if (!bypassPack.isEnabled()) return;
final Screen screen = cir.getReturnValue();
((IConfirmScreen) screen).smegma$setBypassAction(() -> {
client.setScreen(((ConfirmServerResourcePackScreenAccessor) screen).getParentScreen());
if (this.serverInfo != null) {
this.serverInfo.setResourcePackPolicy(bypassPack.getPolicy());
this.client.getServerResourcePackProvider().acceptAll();
ServerList.updateServerListEntry(this.serverInfo);
}
bypass(((ConfirmServerResourcePackScreenAccessor) screen).getRequests().stream().map(PackAccessor::callId).toList());
});
}
@Unique
public void bypass(List<UUID> ids) {
ids.forEach(id -> connection.send(new ResourcePackStatusC2SPacket(id, ResourcePackStatusC2SPacket.Status.ACCEPTED)));
ids.forEach(id -> connection.send(new ResourcePackStatusC2SPacket(id, ResourcePackStatusC2SPacket.Status.DOWNLOADED)));
DELAYED_EXECUTOR.execute(() ->
ids.forEach(id -> connection.send(new ResourcePackStatusC2SPacket(id, ResourcePackStatusC2SPacket.Status.SUCCESSFULLY_LOADED)))
);
}
}
@@ -0,0 +1,39 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.RPackBypass;
import me.retucio.camtweaks.util.interfaces.IConfirmScreen;
import net.minecraft.client.gui.screen.ConfirmScreen;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.DirectionalLayoutWidget;
import net.minecraft.text.Text;
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.callback.CallbackInfo;
@Mixin(ConfirmScreen.class)
public abstract class ConfirmScreenMixin extends Screen implements IConfirmScreen {
@Shadow protected DirectionalLayoutWidget layout;
@Unique private Runnable bypassAction = null;
protected ConfirmScreenMixin(final Text title) {
super(title);
}
@Inject(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ConfirmScreen;addButtons(Lnet/minecraft/client/gui/widget/DirectionalLayoutWidget;)V", shift = At.Shift.AFTER))
protected void addBypassButton(CallbackInfo ci) {
RPackBypass bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
if (this.bypassAction != null && bypassPack.isEnabled())
this.layout.add(ButtonWidget.builder(bypassPack.BYPASS_TEXT, $ -> this.bypassAction.run()).build());
}
@Override
public void smegma$setBypassAction(Runnable bypass) {
this.bypassAction = bypass;
}
}
@@ -3,6 +3,7 @@ package me.retucio.camtweaks.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.CritsPlus;
import me.retucio.camtweaks.util.Colors;
import net.minecraft.client.particle.BillboardParticle;
import net.minecraft.client.particle.DamageParticle;
import net.minecraft.client.particle.ParticleTextureSheet;
@@ -32,9 +33,7 @@ abstract class DamageParticleFactoryMixin {
if (!crits.isEnabled()) return original;
if (crits.rainbow.isEnabled()) {
float speed = 10001 - crits.rainbowSpeed.getFloatValue();
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color gamning = Color.getHSBColor(hue, 1, 1);
Color gamning = Colors.rainbowColor(crits.rainbowSpeed.getIntValue(), crits.alpha.getIntValue());
original.setColor(
gamning.getRed() / 255f,
gamning.getGreen() / 255f,
@@ -0,0 +1,19 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.GlintPlus;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.entity.equipment.EquipmentRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(EquipmentRenderer.class)
public abstract class EquipmentRendererMixin {
@Redirect(method = "render(Lnet/minecraft/client/render/entity/equipment/EquipmentModel$LayerType;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/client/model/Model;Ljava/lang/Object;Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/command/OrderedRenderCommandQueue;ILnet/minecraft/util/Identifier;II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getArmorEntityGlint()Lnet/minecraft/client/render/RenderLayer;"))
private RenderLayer redirectArmorEntityGlint() {
GlintPlus glintPlus = ModuleManager.INSTANCE.getModuleByClass(GlintPlus.class);
return glintPlus.getArmorEntityGlint();
}
}
@@ -0,0 +1,34 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.GlintPlus;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.item.ItemRenderer;
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.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ItemRenderer.class)
public abstract class ItemRendererMixin {
@Unique
private static GlintPlus glintPlus;
@Inject(method = "<init>", at = @At("TAIL"))
private void getModules(CallbackInfo ci) {
glintPlus = ModuleManager.INSTANCE.getModuleByClass(GlintPlus.class);
}
@Redirect(method = "getItemGlintConsumer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getGlint()Lnet/minecraft/client/render/RenderLayer;"))
private static RenderLayer getGlint() {
return glintPlus.getGlint();
}
@Redirect(method = "getItemGlintConsumer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getEntityGlint()Lnet/minecraft/client/render/RenderLayer;"))
private static RenderLayer getEntityGlint() {
return glintPlus.getEntityGlint();
}
}
@@ -0,0 +1,20 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.event.events.DamageItemEvent;
import net.minecraft.item.ItemStack;
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;
import static me.retucio.camtweaks.CameraTweaks.EVENT_BUS;
@Mixin(ItemStack.class)
public abstract class ItemStackMixin {
@Inject(method = "setDamage", at = @At("HEAD"))
private void onDamage(int damage, CallbackInfo ci) {
ItemStack stack = (ItemStack) (Object) this;
EVENT_BUS.post(new DamageItemEvent(damage, stack));
}
}
@@ -5,9 +5,11 @@ import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.textures.GpuTexture;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.Fullbright;
import me.retucio.camtweaks.module.modules.NoRender;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.GameRenderer;
import net.minecraft.client.render.LightmapTextureManager;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.ColorHelper;
import net.minecraft.util.profiler.Profiler;
import org.spongepowered.asm.mixin.Final;
@@ -17,6 +19,7 @@ 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;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LightmapTextureManager.class)
public abstract class LightmapTextureManagerMixin {
@@ -24,12 +27,16 @@ public abstract class LightmapTextureManagerMixin {
@Unique
Fullbright fullbright;
@Unique
NoRender noRender;
@Shadow @Final
private GpuTexture glTexture;
@Inject(method = "<init>", at = @At("TAIL"))
private void getModules(GameRenderer renderer, MinecraftClient client, CallbackInfo ci) {
fullbright = ModuleManager.INSTANCE.getModuleByClass(Fullbright.class);
noRender = ModuleManager.INSTANCE.getModuleByClass(NoRender.class);
}
@Inject(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;push(Ljava/lang/String;)V", shift = At.Shift.AFTER), cancellable = true)
@@ -45,4 +52,9 @@ public abstract class LightmapTextureManagerMixin {
ci.cancel();
}
}
@Inject(method = "getDarkness", at = @At("HEAD"), cancellable = true)
private void noRenderDarkness(LivingEntity entity, float factor, float tickProgress, CallbackInfoReturnable<Float> cir) {
if (noRender.isEnabled() && !noRender.darknessEffect.isEnabled()) cir.setReturnValue(0f);
}
}
@@ -7,11 +7,13 @@ import me.retucio.camtweaks.CameraTweaks;
import me.retucio.camtweaks.event.events.OpenScreenEvent;
import me.retucio.camtweaks.event.events.ShutdownEvent;
import me.retucio.camtweaks.event.events.TickEvent;
import me.retucio.camtweaks.event.events.UseItemEvent;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.FastUse;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Hand;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -20,6 +22,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import static me.retucio.camtweaks.CameraTweaks.EVENT_BUS;
import static me.retucio.camtweaks.CameraTweaks.mc;
@Mixin(MinecraftClient.class)
public abstract class MinecraftClientMixin {
@@ -54,6 +57,13 @@ public abstract class MinecraftClientMixin {
cir.setReturnValue(false);
}
@Inject(method = "doItemUse", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;getStackInHand(Lnet/minecraft/util/Hand;)Lnet/minecraft/item/ItemStack;"), cancellable = true)
private void onUseItem(CallbackInfo ci, @Local Hand hand) {
if (mc.player == null) return;
UseItemEvent event = EVENT_BUS.post(new UseItemEvent(mc.player.getStackInHand(hand), hand));
if (event.isCancelled()) ci.cancel();
}
@Inject(method = "doItemUse", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;isItemEnabled(Lnet/minecraft/resource/featuretoggle/FeatureSet;)Z"))
private void modifyItemUseCooldown(CallbackInfo ci, @Local ItemStack stack) {
FastUse fastUse = ModuleManager.INSTANCE.getModuleByClass(FastUse.class);
@@ -0,0 +1,44 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.RPackBypass;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.Arrays;
@Mixin(ServerInfo.ResourcePackPolicy.class)
public abstract class ResourcePackPolicyMixin {
@Unique
private static ServerInfo.ResourcePackPolicy BYPASS;
@Invoker("<init>")
public static ServerInfo.ResourcePackPolicy init(final String enumName, final int enumOrdinal, final String name) {
throw new AssertionError();
}
@Inject(method = "values", at = @At("TAIL"), cancellable = true)
private static void addVariant(CallbackInfoReturnable<ServerInfo.ResourcePackPolicy[]> cir) {
RPackBypass bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
if (!bypassPack.isEnabled()) return;
ServerInfo.ResourcePackPolicy[] values = cir.getReturnValue();
final int ordinal = values.length;
cir.setReturnValue(values = Arrays.copyOfRange(values, 0, ordinal + 1));
values[ordinal] = BYPASS = init(bypassPack.ENUM_NAME, ordinal, "bypass");
}
@Inject(method = "getName", at = @At("HEAD"), cancellable = true)
private void addToGetName(final CallbackInfoReturnable<Text> cir) {
RPackBypass bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
if (BYPASS == (Object) this && bypassPack.isEnabled())
cir.setReturnValue(bypassPack.BYPASS_TEXT);
}
}
@@ -3,6 +3,7 @@ package me.retucio.camtweaks.mixin;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import me.retucio.camtweaks.CameraTweaks;
import me.retucio.camtweaks.command.CommandManager;
import me.retucio.camtweaks.config.ConfigManager;
import me.retucio.camtweaks.event.events.ClientClickEvent;
import me.retucio.camtweaks.ui.frames.ClientSettingsFrame;
import net.minecraft.SharedConstants;
@@ -31,6 +32,7 @@ public class ScreenMixin {
@Inject(method = "render", at = @At("HEAD"))
private void renderWatermark(DrawContext context, int mouseX, int mouseY, float deltaTicks, CallbackInfo ci) {
if (!ConfigManager.hasLoaded()) return; // para evitar dibujar la marca de agua por defecto
String watermark = ClientSettingsFrame.guiSettings.watermark.getValue();
if (watermark == null || watermark.isEmpty()) return;
context.drawText(mc.textRenderer, watermark,
@@ -0,0 +1,22 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.RPackBypass;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.client.resource.server.ServerResourcePackManager;
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.CallbackInfoReturnable;
@Mixin(targets = "net.minecraft.client.gui.screen.multiplayer.ConnectScreen$1")
public abstract class ServerConnectorMixin {
@Inject(method = "toAcceptanceStatus", at = @At("HEAD"), cancellable = true)
private static void guardSwitchCase(ServerInfo.ResourcePackPolicy policy, CallbackInfoReturnable<ServerResourcePackManager.AcceptanceStatus> cir) {
RPackBypass bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
if (!bypassPack.isEnabled()) return;
if (policy == bypassPack.getPolicy())
cir.setReturnValue(ServerResourcePackManager.AcceptanceStatus.ALLOWED);
}
}
@@ -0,0 +1,54 @@
package me.retucio.camtweaks.mixin;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.RPackBypass;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.nbt.NbtCompound;
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.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ServerInfo.class)
public abstract class ServerInfoMixin {
@Shadow private ServerInfo.ResourcePackPolicy resourcePackPolicy;
@Unique private boolean isBypassStatus;
@Unique
private static RPackBypass bypassPack;
@Inject(method = "<init>", at = @At("TAIL"))
private void getModules(String name, String address, ServerInfo.ServerType serverType, CallbackInfo ci) {
bypassPack = ModuleManager.INSTANCE.getModuleByClass(RPackBypass.class);
}
@Inject(method = "fromNbt", at = @At("TAIL"))
private static void addToRead(NbtCompound root, CallbackInfoReturnable<ServerInfo> cir) {
if (!bypassPack.isEnabled()) return;
if (root.getBoolean(bypassPack.TAG_NAME, false))
cir.getReturnValue().setResourcePackPolicy(bypassPack.getPolicy());
}
@Inject(method = "toNbt", at = @At("HEAD"))
private void preWrite(CallbackInfoReturnable<NbtCompound> cir) {
if (!bypassPack.isEnabled()) return;
if (this.resourcePackPolicy == bypassPack.getPolicy()) {
this.isBypassStatus = true;
this.resourcePackPolicy = ServerInfo.ResourcePackPolicy.PROMPT;
}
}
@Inject(method = "toNbt", at = @At("TAIL"))
private void addToWrite(CallbackInfoReturnable<NbtCompound> cir) {
if (!bypassPack.isEnabled()) return;
if (this.isBypassStatus) {
cir.getReturnValue().putBoolean(bypassPack.TAG_NAME, true);
this.resourcePackPolicy = bypassPack.getPolicy();
this.isBypassStatus = false;
}
}
}
@@ -0,0 +1,28 @@
package me.retucio.camtweaks.mixin;
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.NoRender;
import net.minecraft.client.render.fog.StatusEffectFogModifier;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.registry.entry.RegistryEntry;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@Mixin(StatusEffectFogModifier.class)
public abstract class StatusEffectFogModifierMixin {
@Shadow
public abstract RegistryEntry<StatusEffect> getStatusEffect();
@ModifyReturnValue(method = "shouldApply", at = @At("RETURN"))
public boolean noRenderBadEffects(boolean original) {
NoRender noRender = ModuleManager.INSTANCE.getModuleByClass(NoRender.class);
if (!noRender.isEnabled()) return original;
if (getStatusEffect() == StatusEffects.BLINDNESS && !noRender.blindnessEffect.isEnabled()) return false;
if (getStatusEffect() == StatusEffects.DARKNESS && !noRender.darknessEffect.isEnabled()) return false;
return original;
}
}
@@ -8,6 +8,7 @@ import me.retucio.camtweaks.module.ModuleManager;
import me.retucio.camtweaks.module.modules.BlockOutline;
import me.retucio.camtweaks.module.modules.Freecam;
import me.retucio.camtweaks.module.modules.NoRender;
import me.retucio.camtweaks.util.Colors;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.*;
import net.minecraft.client.render.state.WorldRenderState;
@@ -77,16 +78,7 @@ public abstract class WorldRendererMixin {
if (!outline.isEnabled()) return ColorHelper.withAlpha(alpha, rgb);
if (outline.rainbow.isEnabled()) {
float speed = 10001 - outline.rainbowSpeed.getFloatValue(); // 10001 para evitar divisiones por cero
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color gamingProMax = Color.getHSBColor(hue, 1, 1);
return new Color(
gamingProMax.getRed(),
gamingProMax.getGreen(),
gamingProMax.getBlue(),
outline.alpha.getIntValue()
).getRGB();
return Colors.rainbowInt(outline.rainbowSpeed.getIntValue(), outline.alpha.getIntValue());
} else {
return new Color(
outline.red.getIntValue(),
@@ -0,0 +1,18 @@
package me.retucio.camtweaks.mixin.accessor;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.network.ClientCommonNetworkHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import java.util.List;
@Mixin(ClientCommonNetworkHandler.ConfirmServerResourcePackScreen.class)
public interface ConfirmServerResourcePackScreenAccessor {
@Accessor("parent")
Screen getParentScreen();
@Accessor("packs")
List<? extends PackAccessor> getRequests();
}
@@ -0,0 +1,14 @@
package me.retucio.camtweaks.mixin.accessor;
import net.minecraft.client.network.ClientCommonNetworkHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
import java.util.UUID;
@Mixin(ClientCommonNetworkHandler.ConfirmServerResourcePackScreen.Pack.class)
public interface PackAccessor {
@Invoker
UUID callId();
}
@@ -40,6 +40,7 @@ public class ModuleManager {
modules.add(new Freecam());
modules.add(new Freelook());
modules.add(new Fullbright());
modules.add(new GlintPlus());
modules.add(new HandView());
modules.add(new Headhitters());
modules.add(new HUD());
@@ -50,10 +51,11 @@ public class ModuleManager {
modules.add(new PerspectivePlus());
modules.add(new PortalGUI());
modules.add(new Rotations());
modules.add(new RPackBypass());
modules.add(new ScreenshotPlus());
modules.add(new ShulkerPeek());
modules.add(new TimeChanger());
// modules.add(new TooltipsPlus());
modules.add(new WarnLowDurability());
modules.add(new Zoom());
modules.sort(Comparator.comparing(module -> module.getName().toLowerCase()));
@@ -31,7 +31,11 @@ public class Freelook extends Module {
public Freelook() {
super("perspectiva libre", "te permite mover la cámara de la perspectiva sin mover la del jugador, o vice versa");
assignKey(GLFW.GLFW_KEY_B);
keyMode.setDefaultValue(KeyModes.HOLD);
keyMode.setValue(KeyModes.HOLD);
notify.setDefaultValue(false);
notify.setEnabled(false);
}
@@ -104,14 +104,18 @@ public class GUI extends Module {
green.onUpdate(g -> applyRGBAColorUpdates());
blue.onUpdate(b -> applyRGBAColorUpdates());
alpha.onUpdate(a -> applyRGBAColorUpdates());
// muy mierdas la solución pero funciona
red.reset();
green.reset();
blue.reset();
alpha.reset();
}
@SubscribeEvent
public void onTick(TickEvent.Post event) {
if (rainbow.isEnabled()) {
float speed = (float) (rainbowSpeed.getMax() - rainbowSpeed.getValue());
float hue = (System.currentTimeMillis() % (long) speed) / speed;
Color color = Color.getHSBColor(hue, saturation.getFloatValue(), brightness.getFloatValue());
Color color = Colors.rainbowColor(rainbowSpeed.getIntValue(), alpha.getIntValue(), saturation.getFloatValue(), brightness.getFloatValue());
Colors.red = color.getRed();
Colors.green = color.getGreen();
@@ -0,0 +1,87 @@
package me.retucio.camtweaks.module.modules;
import me.retucio.camtweaks.module.Module;
import me.retucio.camtweaks.module.settings.BooleanSetting;
import me.retucio.camtweaks.module.settings.EnumSetting;
import me.retucio.camtweaks.util.render.GlintRenderLayer;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.DyeColor;
import java.awt.*;
/** continúa en:
* @see me.retucio.camtweaks.mixin.BufferStorageMixin
* @see me.retucio.camtweaks.mixin.EquipmentRendererMixin
* @see me.retucio.camtweaks.mixin.ItemRendererMixin
*/
public class GlintPlus extends Module {
public BooleanSetting items = addSetting(new BooleanSetting("items", "modificar el destello de encantamiento de los items", true));
public BooleanSetting armor = addSetting(new BooleanSetting("armadura", "modificar el destello de encantamiento de la armadura", true));
public EnumSetting<GlintColors> glintColor = addSetting(new EnumSetting<>("colores", "color del glint", GlintColors.class, GlintColors.PURPLE));
public GlintPlus() {
super("destello de enchants.", "modifica el color del brillo de los encantamientos");
}
public RenderLayer getGlint() {
int color = getColor();
if (!isEnabled() || !items.isEnabled()) return RenderLayer.getGlint();
return GlintRenderLayer.glintColor.get(color);
}
public RenderLayer getEntityGlint() {
int color = getColor();
if (!isEnabled() || !items.isEnabled()) return RenderLayer.getEntityGlint();
return GlintRenderLayer.entityGlintColor.get(color);
}
public RenderLayer getArmorEntityGlint() {
int color = getColor();
if (!isEnabled() || !armor.isEnabled()) return RenderLayer.getArmorEntityGlint();
return GlintRenderLayer.armorEntityGlintColor.get(color);
}
public int getColor() {
String colorName = glintColor.getValue().getRealName().toLowerCase();
switch (colorName) {
case "rainbow":
return DyeColor.values().length;
case "none":
return DyeColor.values().length + 1;
}
for (DyeColor dye : DyeColor.values())
if (dye.name().equalsIgnoreCase(colorName)) return dye.getIndex();
return -1;
}
public enum GlintColors {
RED("rojo"),
ORANGE("naranja"),
YELLOW("amarillo"),
LIME("lima"),
GREEN("verde"),
CYAN("cian"),
LIGHT_BLUE("celeste"),
BLUE("azul"),
PURPLE("morado"),
MAGENTA("magenta"),
PINK("rosa"),
BROWN("marrón"),
BLACK("negro"),
GRAY("gris"),
LIGHT_GRAY("plata"),
WHITE("blanco"),
RAINBOW("gay."),
NONE("desactivado");
private final String name;
GlintColors(String name) { this.name = name; }
@Override public String toString() { return name; }
public String getRealName() { return super.toString(); }
}
}
@@ -11,12 +11,12 @@ import net.minecraft.util.Formatting;
/** continúa en:
* @see me.retucio.camtweaks.mixin.ClientPlayNetworkHandlerMixin
* @see me.retucio.camtweaks.mixin.EntityEffectParticleEffectMixin
* @see me.retucio.camtweaks.mixin.FogRendererMixin
* @see me.retucio.camtweaks.mixin.GameRendererMixin
* @see me.retucio.camtweaks.mixin.InGameHudMixin
* @see me.retucio.camtweaks.mixin.InGameOverlayRendererMixin
* @see me.retucio.camtweaks.mixin.ParticleManagerMixin
* @see me.retucio.camtweaks.mixin.StatusEffectFogModifierMixin
* @see me.retucio.camtweaks.mixin.StuckArrowsFeatureRendererMixin
* @see me.retucio.camtweaks.mixin.TextRendererDrawerMixin
* @see me.retucio.camtweaks.mixin.WeatherRenderingMixin
@@ -0,0 +1,29 @@
package me.retucio.camtweaks.module.modules;
import me.retucio.camtweaks.module.Module;
import net.minecraft.client.network.ServerInfo;
import net.minecraft.text.Text;
/** continúa en:
* @see me.retucio.camtweaks.mixin.ClientCommonNetworkHandlerMixin
* @see me.retucio.camtweaks.mixin.ConfirmScreenMixin
* @see me.retucio.camtweaks.mixin.ResourcePackPolicyMixin
* @see me.retucio.camtweaks.mixin.ServerConnectorMixin
* @see me.retucio.camtweaks.mixin.ServerInfoMixin
*/
public class RPackBypass extends Module {
public String TAG_NAME = "bypassTextures";
public String ENUM_NAME = "BYPASS";
public Text BYPASS_TEXT = Text.literal("nuh uh");
public RPackBypass() {
super("bypassear packs", "te permite omitir packs de recursos forzados por servers");
}
public ServerInfo.ResourcePackPolicy getPolicy() {
return ServerInfo.ResourcePackPolicy.valueOf(ENUM_NAME);
}
}
@@ -6,34 +6,28 @@ import me.retucio.camtweaks.mixin.accessor.HandledScreenAccessor;
import me.retucio.camtweaks.module.Module;
import me.retucio.camtweaks.module.settings.BooleanSetting;
import me.retucio.camtweaks.module.settings.KeySetting;
import me.retucio.camtweaks.ui.screen.ShulkerPreviewScreen;
import me.retucio.camtweaks.ui.screen.PreviewScreen;
import me.retucio.camtweaks.util.ChatUtil;
import me.retucio.camtweaks.util.Colors;
import me.retucio.camtweaks.util.MiscUtil;
import net.minecraft.block.ShulkerBoxBlock;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
import net.minecraft.component.ComponentType;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.ContainerComponent;
import net.minecraft.component.type.TooltipDisplayComponent;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.tooltip.TooltipType;
import net.minecraft.screen.slot.Slot;
import net.minecraft.text.Text;
import org.lwjgl.glfw.GLFW;
import java.awt.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.function.Consumer;
/**
*
*/
public class ShulkerPeek extends Module {
public KeySetting previewKey = addSetting(new KeySetting("tecla de previsualización", "tecla a mantener para previsualizar", GLFW.GLFW_KEY_LEFT_ALT));
@@ -45,23 +39,23 @@ public class ShulkerPeek extends Module {
super("prev. de shulkers", "te permite previsualizar el contenido de shulkers desde el inventario");
// colores y tal (https://github.com/kgriff0n/shulker-preview)
SHULKER_COLORS.put(Items.SHULKER_BOX, new Color(142, 108, 142));
SHULKER_COLORS.put(Items.WHITE_SHULKER_BOX, new Color(225, 230, 230));
SHULKER_COLORS.put(Items.LIGHT_GRAY_SHULKER_BOX, new Color(137, 137, 128));
SHULKER_COLORS.put(Items.GRAY_SHULKER_BOX, new Color(60, 65, 68));
SHULKER_COLORS.put(Items.BLACK_SHULKER_BOX, new Color(31, 31, 35));
SHULKER_COLORS.put(Items.BROWN_SHULKER_BOX, new Color(113, 70, 39));
SHULKER_COLORS.put(Items.RED_SHULKER_BOX, new Color(152, 36, 34));
SHULKER_COLORS.put(Items.ORANGE_SHULKER_BOX, new Color(241, 114, 15));
SHULKER_COLORS.put(Items.YELLOW_SHULKER_BOX, new Color(249, 196, 35));
SHULKER_COLORS.put(Items.LIME_SHULKER_BOX, new Color(110, 185, 24));
SHULKER_COLORS.put(Items.GREEN_SHULKER_BOX, new Color(83, 107, 29));
SHULKER_COLORS.put(Items.CYAN_SHULKER_BOX, new Color(22, 133, 144));
SHULKER_COLORS.put(Items.LIGHT_BLUE_SHULKER_BOX, new Color(57, 177, 215));
SHULKER_COLORS.put(Items.BLUE_SHULKER_BOX, new Color(49, 52, 152));
SHULKER_COLORS.put(Items.PURPLE_SHULKER_BOX, new Color(113, 37, 166));
SHULKER_COLORS.put(Items.MAGENTA_SHULKER_BOX, new Color(183, 61, 172));
SHULKER_COLORS.put(Items.PINK_SHULKER_BOX, new Color(239, 135, 166));
SHULKER_COLORS.put(Items.SHULKER_BOX, Colors.LAVENDER);
SHULKER_COLORS.put(Items.WHITE_SHULKER_BOX, Colors.WHITE);
SHULKER_COLORS.put(Items.LIGHT_GRAY_SHULKER_BOX, Colors.SILVER);
SHULKER_COLORS.put(Items.GRAY_SHULKER_BOX, Colors.GRAY);
SHULKER_COLORS.put(Items.BLACK_SHULKER_BOX, Colors.BLACK);
SHULKER_COLORS.put(Items.BROWN_SHULKER_BOX, Colors.BROWN);
SHULKER_COLORS.put(Items.RED_SHULKER_BOX, Colors.RED);
SHULKER_COLORS.put(Items.ORANGE_SHULKER_BOX, Colors.ORANGE);
SHULKER_COLORS.put(Items.YELLOW_SHULKER_BOX, Colors.YELLOW);
SHULKER_COLORS.put(Items.LIME_SHULKER_BOX, Colors.LIME);
SHULKER_COLORS.put(Items.GREEN_SHULKER_BOX, Colors.GREEN);
SHULKER_COLORS.put(Items.CYAN_SHULKER_BOX, Colors.CYAN);
SHULKER_COLORS.put(Items.LIGHT_BLUE_SHULKER_BOX, Colors.CELESTE);
SHULKER_COLORS.put(Items.BLUE_SHULKER_BOX, Colors.BLUE);
SHULKER_COLORS.put(Items.PURPLE_SHULKER_BOX, Colors.PURPLE);
SHULKER_COLORS.put(Items.MAGENTA_SHULKER_BOX, Colors.MAGENTA);
SHULKER_COLORS.put(Items.PINK_SHULKER_BOX, Colors.PINK);
}
@SubscribeEvent
@@ -75,31 +69,45 @@ public class ShulkerPeek extends Module {
}
if (event.getAction() == GLFW.GLFW_REPEAT) {
if (!(mc.currentScreen instanceof ShulkerPreviewScreen)) {
openPreviewScreen();
return;
}
if (mc.currentScreen instanceof PreviewScreen preview) {
if (preview.getType() != PreviewScreen.PreviewType.SHULKER)
openPreviewScreen();
} else openPreviewScreen();
return;
}
if (event.getAction() == GLFW.GLFW_RELEASE) {
if (mc.currentScreen instanceof ShulkerPreviewScreen preview)
if (mc.currentScreen instanceof PreviewScreen preview)
preview.close();
}
}
private void openPreviewScreen() {
if (!(mc.currentScreen instanceof HandledScreen<?> prevScreen)) return;
ItemStack stack;
Slot focusedSlot = ((HandledScreenAccessor) prevScreen).getFocusedSlot();
if (focusedSlot == null) return;
if (mc.currentScreen instanceof PreviewScreen previewScreen) {
int focusedSlot = previewScreen.getFocusedSlot();
if (focusedSlot == -1) return;
stack = previewScreen.getInventory().get(focusedSlot);
} else if (mc.currentScreen instanceof HandledScreen<?> handledScreen) {
stack = ((HandledScreenAccessor) handledScreen).getFocusedSlot().getStack();
} else return;
ItemStack stack = focusedSlot.getStack();
if (isShulkerEmpty(stack)) return;
if (stack.getItem() == Items.ENDER_CHEST) {
if (MiscUtil.getEchestInv() == null) {
ChatUtil.warn("abre un enderchest primero");
return;
}
mc.setScreen(new PreviewScreen(MiscUtil.getEchestInv(), mc.currentScreen));
return;
}
mc.setScreen(new ShulkerPreviewScreen(stack, prevScreen));
else if (isShulkerEmpty(stack)) return;
mc.setScreen(new PreviewScreen(stack, mc.currentScreen));
}
public static boolean isShulkerEmpty(ItemStack stack) {
if (stack == null) return true;
if (!(stack.getItem() instanceof BlockItem blockItem)) return true;
if (!(blockItem.getBlock() instanceof ShulkerBoxBlock)) return true;
@@ -1,51 +0,0 @@
package me.retucio.camtweaks.module.modules;
import me.retucio.camtweaks.module.Module;
import me.retucio.camtweaks.module.settings.BooleanSetting;
import me.retucio.camtweaks.module.settings.EnumSetting;
import me.retucio.camtweaks.module.settings.KeySetting;
import org.lwjgl.glfw.GLFW;
public class TooltipsPlus extends Module {
public EnumSetting<DisplayModes> displayMode = addSetting(new EnumSetting<>(
"mostrar", "cúando mostrar la cajita de los huevos", DisplayModes.class, DisplayModes.ALWAYS));
public KeySetting displayKey = addSetting(new KeySetting(
"tecla de visualización", "tecla a presionar para mostrar la cajita", GLFW.GLFW_KEY_LEFT_CONTROL));
public BooleanSetting middleClickPreview = addSetting(new BooleanSetting("preview de middle click",
"abre una interfaz con los contenidos de un bloque de almacenamiento al presionar el middle click (la ruedita)", false));
public EnumSetting<SizeFormat> itemSize = addSetting(new EnumSetting<>(
"tamaño del ítem", "cómo mostrar el tamaño del ítem en memoria", SizeFormat.class, SizeFormat.NONE));
public TooltipsPlus() {
super("tooltips plus", "mejoras varias a las cajitas de descripción de items");
}
public enum DisplayModes {
ALWAYS("siempre"),
KEY("al presionar una tecla"),
NEVER("nunca");
final String name;
DisplayModes(String name) { this.name = name; }
@Override public String toString() { return name; }
}
public enum SizeFormat {
NONE("no mostrar"),
BYTES("bytes"),
KB("kilobytes"),
MB("megabytes");
final String name;
SizeFormat(String name) { this.name = name; }
@Override public String toString() { return name; }
}
}
@@ -0,0 +1,49 @@
package me.retucio.camtweaks.module.modules;
import me.retucio.camtweaks.event.SubscribeEvent;
import me.retucio.camtweaks.event.events.DamageItemEvent;
import me.retucio.camtweaks.module.Module;
import me.retucio.camtweaks.module.settings.BooleanSetting;
import me.retucio.camtweaks.module.settings.NumberSetting;
import me.retucio.camtweaks.util.ChatUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
public class WarnLowDurability extends Module {
public NumberSetting limitPercentage = addSetting(new NumberSetting("porcentaje", "porcentaje de durabilidad restante a la que se te avisa",
5, 1, 100, 1));
public BooleanSetting message = addSetting(new BooleanSetting("mensaje", "enviar un mensaje para alertar al usuario", true));
public BooleanSetting sound = addSetting(new BooleanSetting("sonido", "reproducir un sonido para alertar al usuario", true));
public WarnLowDurability() {
super("aviso de baja dur.", "te avisa cuando la herramienta que sostengas sobrepase un límite de durabilidad");
}
@SubscribeEvent
public void onDecreaseDurability(DamageItemEvent event) {
if (mc.player == null || mc.world == null) return;
ItemStack stack = event.getStack();
double percentage = 100 * (1 - ((double) stack.getDamage() / stack.getMaxDamage()));
if (percentage <= limitPercentage.getValue()) {
if (sound.isEnabled())
mc.world.playSound(mc.player, mc.player.getBlockPos(),
SoundEvents.BLOCK_BELL_USE, SoundCategory.AMBIENT, 1, 1);
if (message.isEnabled()) {
String customName = stack.getCustomName() == null ? "" : " \"" + stack.getCustomName().getString() + "\"";
Text text = Text.literal(Formatting.AQUA + stack.getItemName().getString()
+ Formatting.GREEN + customName + Formatting.RESET
+ " a " + Formatting.GOLD + ((int) percentage + "") + "%"
+ Formatting.RESET + " de durabilidad");
mc.execute(() -> ChatUtil.warn(text)); // en mc.execute porque si lo llamo directamente, lo hago desde el thread del server que causa un error
}
}
}
}
@@ -38,19 +38,19 @@ public class Zoom extends Module {
public Zoom() {
super("zoom", "lupa");
super.keyMode.setValue(KeyModes.HOLD);
super.keyMode.setDefaultValue(KeyModes.HOLD);
super.notify.setEnabled(false);
super.notify.setDefaultValue(false);
assignKey(GLFW.GLFW_KEY_F);
keyMode.setDefaultValue(KeyModes.HOLD);
keyMode.setValue(KeyModes.HOLD);
notify.setDefaultValue(false);
notify.setEnabled(false);
}
@Override
public void onEnable() {
if (mc.options == null) return;
CameraTweaks.EVENT_BUS.register(this);
prevSmoothCam = mc.options.smoothCameraEnabled;
prevMouseSens = mc.options.getMouseSensitivity().getValue();
prevFov = mc.options.getFov().getValue();
@@ -58,18 +58,21 @@ public class Zoom extends Module {
mc.options.hudHidden = !showHUD.isEnabled();
value = defaultZoom.getValue();
super.onEnable();
}
@Override
public void onDisable() {
if (mc.options == null) return;
CameraTweaks.EVENT_BUS.unregister(this);
mc.options.smoothCameraEnabled = prevSmoothCam;
mc.options.getMouseSensitivity().setValue(prevMouseSens);
mc.options.hudHidden = prevHUD;
mc.worldRenderer.scheduleTerrainUpdate();
super.onDisable();
}
@Override
@@ -10,6 +10,7 @@ import me.retucio.camtweaks.module.modules.HUD;
import me.retucio.camtweaks.ui.screen.HudEditorScreen;
import me.retucio.camtweaks.ui.widgets.HudElement;
import me.retucio.camtweaks.util.Colors;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ChatScreen;
@@ -95,12 +96,9 @@ public class HudRenderer {
}
public static Color getColor(HUD hud) {
if (hud.rainbow.isEnabled()) {
float speed = 10001 - hud.rainbowSpeed.getFloatValue();
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color rgb = Color.getHSBColor(hue, 1, 1);
return new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue(), hud.alpha.getIntValue());
}
if (hud.rainbow.isEnabled())
return Colors.rainbowColor(hud.rainbowSpeed.getIntValue(), hud.alpha.getIntValue());
return new Color(hud.red.getIntValue(), hud.green.getIntValue(), hud.blue.getIntValue(), hud.alpha.getIntValue());
}
@@ -131,7 +129,7 @@ public class HudRenderer {
HUD hud = ModuleManager.INSTANCE.getModuleByClass(HUD.class);
if (!hud.isEnabled()) return;
if (mc.getDebugHud().shouldShowDebugHud() && !hud.showOnF3.isEnabled()) return;
if (mc.debugHudEntryList.isF3Enabled() && !hud.showOnF3.isEnabled()) return;
if (mc.currentScreen instanceof ChatScreen && !hud.showOnChat.isEnabled()) return;
initElements();
@@ -84,9 +84,29 @@ public class ClickGUI extends Screen {
filterSearchResults();
renderBottomGradient(ctx, scrollOffset);
super.render(ctx, mouseX, mouseY, delta);
}
// renderizar un gradiente negro leve en la parte inferior de la pantalla si el contenido excede el límite inferior de la pantalla, para indicarlo visualmente
private void renderBottomGradient(DrawContext ctx, int scrollOffset) {
int screenHeight = mc.getWindow().getScaledHeight();
int totalContentHeight = calculateContentHeight();
if (scrollOffset + screenHeight < totalContentHeight) {
int gradientHeight = 30;
int startY = screenHeight - gradientHeight;
for (int y = 0; y < gradientHeight; y++) {
float alpha = (float) y / gradientHeight;
int color = (int) (alpha * 0.7 * 255) << 24;
ctx.fill(0, startY + y, mc.getWindow().getScaledWidth(), startY + y + 1, color);
}
}
}
private int calculateContentHeight() {
int bottom = modulesFrame.y + modulesFrame.h + modulesFrame.totalHeight;
for (SettingsFrame frame : settingsFrames)
@@ -8,18 +8,19 @@ import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
// https://github.com/kgriff0n/shulker-preview/blob/master/src/main/java/io/github/kgriff0n/screen/FakeShulkerScreen.java
public class ShulkerPreviewScreen extends Screen {
public class PreviewScreen extends Screen {
private static final Identifier TEXTURE = Identifier.of(CameraTweaks.MOD_ID, "textures/gui/shulker.png");
private static final Identifier TEXTURE = Identifier.of(CameraTweaks.MOD_ID, "textures/gui/preview.png");
private int x, y;
private final int bgWidth = 176;
@@ -29,13 +30,29 @@ public class ShulkerPreviewScreen extends Screen {
private final Text title;
private final List<ItemStack> inventory;
private final Screen parent;
private final PreviewType type;
public ShulkerPreviewScreen(ItemStack shulker, Screen parent) {
private int focusedSlot;
public PreviewScreen(ItemStack shulker, Screen parent) {
super(Text.literal("previsualización del shulker"));
this.color = ShulkerPeek.SHULKER_COLORS.get(shulker.getItem());
this.title = shulker.getName();
this.inventory = shulker.get(DataComponentTypes.CONTAINER).stream().toList();
this.parent = parent;
this.type = PreviewType.SHULKER;
}
public PreviewScreen(Inventory inventory, Screen parent) {
super(Text.literal("echest"));
this.color = Colors.PURPLE;
this.title = Text.of("echest");
this.inventory = new ArrayList<>();
this.parent = parent;
this.type = PreviewType.ECHEST;
for (int i = 0; i < inventory.size(); i++)
this.inventory.add(inventory.getStack(i));
}
@Override
@@ -54,6 +71,7 @@ public class ShulkerPreviewScreen extends Screen {
int selectedSlot = getSlot(mouseX, mouseY);
if (selectedSlot > -1 && selectedSlot < inventory.size() && !inventory.get(selectedSlot).isOf(Items.AIR))
renderTooltip(ctx, inventory.get(selectedSlot), mouseX, mouseY);
focusedSlot = selectedSlot;
}
@Override
@@ -109,4 +127,25 @@ public class ShulkerPreviewScreen extends Screen {
public boolean shouldPause() {
return false;
}
public PreviewType getType() {
return this.type;
}
public Screen getParent() {
return parent;
}
public int getFocusedSlot() {
return focusedSlot;
}
public List<ItemStack> getInventory() {
return inventory;
}
public enum PreviewType {
SHULKER,
ECHEST;
}
}
@@ -2,7 +2,10 @@ package me.retucio.camtweaks.util;
import net.minecraft.util.Formatting;
import java.awt.*;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static me.retucio.camtweaks.ui.frames.ClientSettingsFrame.guiSettings;
@@ -28,10 +31,67 @@ public class Colors {
public static Color selectedHudElementOutlineColor;
public static Color unselectedHudElementOutlineColor;
public static Color RED = new Color(152, 36, 34);
public static Color ORANGE = new Color(241, 114, 15);
public static Color YELLOW = new Color(249, 196, 35);
public static Color LIME = new Color(110, 185, 24);
public static Color GREEN = new Color(83, 107, 29);
public static Color CYAN = new Color(22, 133, 144);
public static Color CELESTE = new Color(57, 177, 215);
public static Color BLUE = new Color(49, 52, 152);
public static Color PURPLE = new Color(113, 37, 166);
public static Color MAGENTA = new Color(183, 61, 172);
public static Color PINK = new Color(239, 135, 166);
public static Color LAVENDER = new Color(142, 108, 142);
public static Color WHITE = new Color(225, 230, 230);
public static Color SILVER = new Color(137, 137, 128);
public static Color GRAY = new Color(60, 65, 68);
public static Color BLACK = new Color(31, 31, 35);
public static Color BROWN = new Color(113, 70, 39);
static {
updateAllColors(new Color(red, green, blue, alpha));
}
public static int rainbowInt(int rainbowSpeed, int alpha) {
float speed = 10001 - rainbowSpeed; // 10001 para evitar divisiones por cero
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color gamingProMax = Color.getHSBColor(hue, 1, 1);
return new Color(
gamingProMax.getRed(),
gamingProMax.getGreen(),
gamingProMax.getBlue(),
alpha
).getRGB();
}
public static Color rainbowColor(int rainbowSpeed, int alpha) {
float speed = 10001 - rainbowSpeed; // 10001 para evitar divisiones por cero
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color gamingProMax = Color.getHSBColor(hue, 1, 1);
return new Color(
gamingProMax.getRed(),
gamingProMax.getGreen(),
gamingProMax.getBlue(),
alpha
);
}
public static Color rainbowColor(int rainbowSpeed, int alpha, float saturation, float brightness) {
float speed = 10001 - rainbowSpeed; // 10001 para evitar divisiones por cero
float hue = (System.currentTimeMillis() % (int) speed) / speed;
Color gamingProMax = Color.getHSBColor(hue, saturation, brightness);
return new Color(
gamingProMax.getRed(),
gamingProMax.getGreen(),
gamingProMax.getBlue(),
alpha
);
}
public static void updateAllColors(Color color) {
mainColor = color;
enabledToggleButtonColor = mixWithMainColor(new Color(10, 150, 10), 0.8f);
@@ -10,7 +10,11 @@ import net.minecraft.particle.ParticleTypes;
import net.minecraft.registry.Registries;
import net.minecraft.text.Text;
import java.awt.*;
import java.util.*;
import java.util.List;
import static me.retucio.camtweaks.util.Colors.*;
import static me.retucio.camtweaks.CameraTweaks.mc;
@@ -27,6 +31,8 @@ public class Lists {
public static final List<Block> blockList = Registries.BLOCK.stream().toList();
public static final List<Color> colorList = new ArrayList<>();
public static void init() {
// no consigo traducir el texto. a tomar por culo, se queda en inglés, si no entiendes pues a estudiar
entityNames = getMapOfLists(entityList,
@@ -38,6 +44,8 @@ public class Lists {
itemNames = getMapOfLists(itemList,
itemList.stream().map(item -> I18n.translate(item.getTranslationKey())).toList());
colorList.addAll(Arrays.asList(RED, ORANGE, YELLOW, LIME, GREEN, CYAN, CELESTE, BLUE, PURPLE, MAGENTA, PINK, LAVENDER, WHITE, SILVER, GRAY, BLACK, BROWN));
}
public static <T> Map<T, Boolean> allTrue(List<T> options) {
@@ -1,9 +1,16 @@
package me.retucio.camtweaks.util;
import me.retucio.camtweaks.event.SubscribeEvent;
import me.retucio.camtweaks.event.events.DisconnectEvent;
import me.retucio.camtweaks.event.events.OpenScreenEvent;
import me.retucio.camtweaks.event.events.TickEvent;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.GenericContainerScreen;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.Inventory;
import net.minecraft.screen.GenericContainerScreenHandler;
import net.minecraft.text.Text;
import net.minecraft.util.annotation.UsesSystemOut;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import org.joml.Vector3d;
@@ -13,8 +20,7 @@ import static me.retucio.camtweaks.CameraTweaks.mc;
public class MiscUtil {
public static Screen screen;
private MiscUtil() {}
private static Inventory echestInv;
@SubscribeEvent
public static void onTick(TickEvent.Post event) {
@@ -24,6 +30,23 @@ public class MiscUtil {
}
}
@SubscribeEvent
public static void onOpenScreen(OpenScreenEvent event) {
if (mc.player == null
|| event.getScreen() == null
|| !(mc.player.currentScreenHandler instanceof GenericContainerScreenHandler handler))
return;
if (event.getScreen() instanceof GenericContainerScreen screen
&& screen.getTitle().equals(Text.translatable("container.enderchest")))
echestInv = handler.getInventory();
}
@SubscribeEvent
public void onDisconnect(DisconnectEvent event) {
echestInv = null;
}
public static void copyVector(Vector3d destination, Vec3d source) {
destination.x = source.x;
destination.y = source.y;
@@ -36,4 +59,8 @@ public class MiscUtil {
vector.z = MathHelper.lerp(tickDelta, entity.lastRenderZ, entity.getZ());
return vector;
}
public static Inventory getEchestInv() {
return echestInv;
}
}
@@ -0,0 +1,6 @@
package me.retucio.camtweaks.util.interfaces;
public interface IConfirmScreen {
void smegma$setBypassAction(Runnable action);
}
@@ -0,0 +1,122 @@
package me.retucio.camtweaks.util.render;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.vertex.VertexFormat;
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
import me.retucio.camtweaks.CameraTweaks;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gl.RenderPipelines;
import net.minecraft.client.render.BuiltBuffer;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderPhase;
import net.minecraft.client.util.BufferAllocator;
import net.minecraft.util.DyeColor;
import net.minecraft.util.Identifier;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
/** clase modificada de RenderLayer para modificar el color del destello de encantamientos
* @see me.retucio.camtweaks.module.modules.GlintPlus
* yoinkeado de: https://github.com/Pepperoni-Jabroni/NoMorePurple/blob/main/src/main/java/pepjebs/no_more_purple/client/GlintRenderLayer.java
* (y actualizado)
*/
public class GlintRenderLayer extends RenderLayer {
public static List<RenderLayer> glintColor = newRenderList(GlintRenderLayer::buildGlintRenderLayer);
public static List<RenderLayer> entityGlintColor = newRenderList(GlintRenderLayer::buildEntityGlintRenderLayer);
public static List<RenderLayer> armorGlintColor = newRenderList(GlintRenderLayer::buildArmorGlintRenderLayer);
public static List<RenderLayer> armorEntityGlintColor = newRenderList(GlintRenderLayer::buildArmorEntityGlintRenderLayer);
public static void addGlintTypes(Object2ObjectLinkedOpenHashMap<RenderLayer, BufferAllocator> map) {
addGlintTypes(map, glintColor);
addGlintTypes(map, entityGlintColor);
addGlintTypes(map, armorGlintColor);
addGlintTypes(map, armorEntityGlintColor);
}
public GlintRenderLayer(String name, VertexFormat vertexFormat, VertexFormat.DrawMode drawMode, int expectedBufferSize, boolean hasCrumbling, boolean translucent, Runnable startAction, Runnable endAction) {
super(name, expectedBufferSize, hasCrumbling, translucent, startAction, endAction);
}
private static List<RenderLayer> newRenderList(Function<String, RenderLayer> func) {
ArrayList<RenderLayer> list = new ArrayList<>(DyeColor.values().length);
for (DyeColor color : DyeColor.values())
list.add(func.apply(color.name()));
list.add(func.apply("rainbow"));
list.add(func.apply("none"));
return list;
}
public static void addGlintTypes(Object2ObjectLinkedOpenHashMap<RenderLayer, BufferAllocator> map, List<RenderLayer> typeList) {
for(RenderLayer renderType : typeList)
if (!map.containsKey(renderType))
map.put(renderType, new BufferAllocator(renderType.getExpectedBufferSize()));
}
private static RenderLayer buildGlintRenderLayer(String name) {
final Identifier res = Identifier.of(CameraTweaks.MOD_ID, "textures/misc/glint_" + name.toLowerCase() + ".png");
return RenderLayer.of("glint_" + name, 256, RenderPipelines.GLINT, MultiPhaseParameters.builder()
.texturing(RenderPhase.GLINT_TEXTURING)
.texture(new Texture(res, false))
.texturing(GLINT_TEXTURING)
.build(false));
}
private static RenderLayer buildEntityGlintRenderLayer(String name) {
final Identifier res = Identifier.of(CameraTweaks.MOD_ID, "textures/misc/glint_" + name.toLowerCase() + ".png");
return RenderLayer.of("entity_glint_" + name, 256, RenderPipelines.GLINT, MultiPhaseParameters.builder()
.texturing(RenderPhase.ENTITY_GLINT_TEXTURING)
.texture(new Texture(res, false))
.target(ITEM_ENTITY_TARGET)
.texturing(ENTITY_GLINT_TEXTURING)
.build(false));
}
private static RenderLayer buildArmorGlintRenderLayer(String name) {
final Identifier res = Identifier.of(CameraTweaks.MOD_ID, "textures/misc/glint_" + name.toLowerCase() + ".png");
return RenderLayer.of("armor_glint_" + name, 256, RenderPipelines.GLINT, MultiPhaseParameters.builder()
.texturing(RenderPhase.ARMOR_ENTITY_GLINT_TEXTURING)
.texture(new Texture(res, false))
.texturing(GLINT_TEXTURING)
.layering(VIEW_OFFSET_Z_LAYERING)
.build(false));
}
private static RenderLayer buildArmorEntityGlintRenderLayer(String name) {
final Identifier res = Identifier.of(CameraTweaks.MOD_ID, "textures/misc/glint_" + name.toLowerCase() + ".png");
return RenderLayer.of("armor_entity_glint_" + name, 256, RenderPipelines.GLINT, MultiPhaseParameters.builder()
.texturing(RenderPhase.ARMOR_ENTITY_GLINT_TEXTURING)
.texture(new Texture(res, false))
.texturing(ENTITY_GLINT_TEXTURING)
.layering(VIEW_OFFSET_Z_LAYERING)
.build(false));
}
@Override
public void draw(BuiltBuffer buffer) {}
@Override
public VertexFormat getVertexFormat() { return VertexFormat.builder().build(); }
@Override
public VertexFormat.DrawMode getDrawMode() {
return null;
}
@Override
public RenderPipeline getRenderPipeline() {
return null;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@@ -0,0 +1,5 @@
{
"texture": {
"blur": true
}
}
+4 -1
View File
@@ -11,4 +11,7 @@ accessible field net/minecraft/entity/LivingEntity jumpingCooldown I
accessible method net/minecraft/client/render/WorldRenderer method_74752 (Lnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/Frustum;Z)V
accessible method net/minecraft/client/render/GameRenderer getProjectionMatrix (F)Lorg/joml/Matrix4f;
accessible method net/minecraft/client/render/command/DebugHitboxCommandRenderer renderDebugHitbox (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/entity/state/EntityHitboxAndView;Lnet/minecraft/client/render/VertexConsumer;F)V
accessible method net/minecraft/client/render/command/DebugHitboxCommandRenderer renderDebugHitbox (Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/entity/state/EntityHitboxAndView;Lnet/minecraft/client/render/VertexConsumer;F)V
accessible class net/minecraft/client/network/ClientCommonNetworkHandler$ConfirmServerResourcePackScreen
accessible class net/minecraft/client/network/ClientCommonNetworkHandler$ConfirmServerResourcePackScreen$Pack
+12
View File
@@ -9,11 +9,15 @@
"HandshakeC2SPacketMixin",
"ItemEntityMixin",
"ItemMixin",
"ItemStackMixin",
"KeyInputMixin",
"PlayerEntityMixin",
"ServerConnectorMixin",
"StringHelperMixin",
"Vec3dMixin",
"YggdrasilUserApiServiceMixin",
"accessor.ConfirmServerResourcePackScreenAccessor",
"accessor.PackAccessor",
"accessor.StatusEffectInstanceAccessor"
],
"injectors": {
@@ -24,6 +28,7 @@
},
"client": [
"BossBarHudMixin",
"BufferStorageMixin",
"CameraMixin",
"ChatHudLineMixin",
"ChatHudLineVisibleMixin",
@@ -32,19 +37,23 @@
"ChatScreenMixin",
"ChunkBorderDebugRendererMixin",
"ChunkOcclusionDataBuilderMixin",
"ClientCommonNetworkHandlerMixin",
"ClientPlayerEntityMixin",
"ClientPlayerInteractionManagerMixin",
"ClientPlayNetworkHandlerMixin",
"ClientWorldMixin",
"ClientWorldPropertiesMixin",
"ConfirmScreenMixin",
"DamageParticleFactoryMixin",
"DamageParticleMixin",
"EquipmentRendererMixin",
"FogRendererMixin",
"GameOptionsMixin",
"GameRendererMixin",
"HeldItemRendererMixin",
"InGameHudMixin",
"InGameOverlayRendererMixin",
"ItemRendererMixin",
"KeyboardMixin",
"LightmapTextureManagerMixin",
"LivingEntityRendererMixin",
@@ -53,9 +62,12 @@
"MouseMixin",
"OverlayTextureMixin",
"ParticleManagerMixin",
"ResourcePackPolicyMixin",
"ScreenMixin",
"ScreenshotRecorderMixin",
"ServerInfoMixin",
"SkyRendererMixin",
"StatusEffectFogModifierMixin",
"StuckArrowsFeatureRendererMixin",
"TelemetryManagerMixin",
"TextRendererDrawerMixin",