diff --git a/cambios.md b/cambios.md index dbc8604..18b0b01 100644 --- a/cambios.md +++ b/cambios.md @@ -1,4 +1,4 @@ -# v4.3 +# v4.4 ## novedades @@ -6,15 +6,19 @@ #### módulos nuevos: -- mira plus: personalizaciones a la mira (crosshair) -- moro: te permite robar items de cofres más fácilmente - ### arreglos / mejoras -- info. de bloque ahora funciona y tal -- arreglado varios crashes +- brilli brilli ya funciona +- zoom ya funciona ## problemas reconocidos -- lo de siempre, + +- lo de siempre, además de: + - `colocar en aire` no funciona si el bloque está muy cerca, aunque no colisione con el jugador + - `delay de paquetes` puede crashear el juego + - las cabezas de `chat plus` solo se dibujar en la pantalla del chat, no en el overlay + - movimiento laggy en `cámara libre` + - `inventario plus` no funciona en creativo + - `RPC de Discord` no funciona e incluso puede provocar crashes + - `destello de enchants.` no funciona. diff --git a/gradle.properties b/gradle.properties index 9c66313..2595374 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,6 @@ discord_rpc_version=1.0.3 neutrino_version=1.1.0 jdk_version=25 -mod_version=4.3 +mod_version=4.4 maven_group=me.retucio archives_base_name=sputnik \ No newline at end of file diff --git a/src/main/java/me/retucio/sputnik/mixin/mixins/render/GameRendererMixin.java b/src/main/java/me/retucio/sputnik/mixin/mixins/render/GameRendererMixin.java index 7f7f009..afdf14c 100644 --- a/src/main/java/me/retucio/sputnik/mixin/mixins/render/GameRendererMixin.java +++ b/src/main/java/me/retucio/sputnik/mixin/mixins/render/GameRendererMixin.java @@ -1,6 +1,7 @@ package me.retucio.sputnik.mixin.mixins.render; +import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import me.retucio.sputnik.event.render.GetFOVEvent; import me.retucio.sputnik.module.ModuleManager; import me.retucio.sputnik.module.modules.camera.Freecam; @@ -56,15 +57,16 @@ public abstract class GameRendererMixin { } } + @ModifyExpressionValue(method = "renderLevel", at = @At(value = "INVOKE", target = "Ljava/lang/Math;max(FF)F", ordinal = 0)) + private float applyCameraTransformationsMathHelperLerpProxy(float original) { + return (noRender.isEnabled() && !noRender.nauseaEffect.getValue()) ? 0 : original; + } + + @Inject(method = "renderItemInHand", at = @At("HEAD"), cancellable = true) private void renderHand(CameraRenderState cameraState, float deltaPartialTick, Matrix4fc modelViewMatrix, CallbackInfo ci) { if ((zoom.isEnabled() && !zoom.showHands.getValue()) || (freecam.isEnabled() && !freecam.renderHands.getValue())) ci.cancel(); } - - @ModifyVariable(method = "renderLevel", at = @At(value = "STORE"), name = "skew") - private float noRenderNauseaDistortion(float scaledNauseaEffectFactor) { - return (noRender.isEnabled() && !noRender.nauseaEffect.getValue()) ? 0 : scaledNauseaEffectFactor; - } } diff --git a/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapMixin.java b/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapMixin.java new file mode 100644 index 0000000..859e4b7 --- /dev/null +++ b/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapMixin.java @@ -0,0 +1,40 @@ +package me.retucio.sputnik.mixin.mixins.render; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.textures.GpuTexture; +import me.retucio.sputnik.module.ModuleManager; +import me.retucio.sputnik.module.modules.camera.Fullbright; +import net.minecraft.client.renderer.Lightmap; +import net.minecraft.client.renderer.state.LightmapRenderState; +import net.minecraft.util.ARGB; +import net.minecraft.util.profiling.Profiler; +import net.minecraft.util.profiling.ProfilerFiller; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Lightmap.class) +public abstract class LightmapMixin { + + @Shadow @Final + private GpuTexture texture; + + @Inject(method = "render", at = @At("HEAD"), cancellable = true) + private void makeThingsBright(LightmapRenderState renderState, CallbackInfo ci) { + if (ModuleManager.INSTANCE.getModuleByClass(Fullbright.class).isEnabled() + && ModuleManager.INSTANCE.getModuleByClass(Fullbright.class).mode.is(Fullbright.Modes.GAMMA)) + { + ProfilerFiller profiler = Profiler.get(); + profiler.push("lightmap"); + + RenderSystem.getDevice().createCommandEncoder() + .clearColorTexture(texture, ARGB.color(255, 255, 255, 255)); + + profiler.pop(); + ci.cancel(); + } + } +} diff --git a/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapRenderStateExtractorMixin.java b/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapRenderStateExtractorMixin.java new file mode 100644 index 0000000..c1d8914 --- /dev/null +++ b/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapRenderStateExtractorMixin.java @@ -0,0 +1,30 @@ +package me.retucio.sputnik.mixin.mixins.render; + +import me.retucio.sputnik.module.ModuleManager; +import me.retucio.sputnik.module.modules.camera.Fullbright; +import me.retucio.sputnik.module.modules.render.NoRender; +import net.minecraft.client.renderer.LightmapRenderStateExtractor; +import net.minecraft.world.entity.LivingEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + + +@Mixin(LightmapRenderStateExtractor.class) +public abstract class LightmapRenderStateExtractorMixin { + + @Unique NoRender noRender; + + @Inject(method = "", at = @At("TAIL")) + private void getModules(CallbackInfo ci) { + noRender = ModuleManager.INSTANCE.getModuleByClass(NoRender.class); + } + + @Inject(method = "calculateDarknessScale", at = @At("HEAD"), cancellable = true) + private void noRenderDarkness(LivingEntity camera, float darknessGamma, float partialTickTime, CallbackInfoReturnable cir) { + if (noRender.isEnabled() && !noRender.darknessEffect.getValue()) cir.setReturnValue(0f); + } +} \ No newline at end of file diff --git a/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapTextureManagerMixin.java b/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapTextureManagerMixin.java deleted file mode 100644 index 61a3312..0000000 --- a/src/main/java/me/retucio/sputnik/mixin/mixins/render/LightmapTextureManagerMixin.java +++ /dev/null @@ -1,54 +0,0 @@ -package me.retucio.sputnik.mixin.mixins.render; - -import com.llamalad7.mixinextras.sugar.Local; -import com.mojang.blaze3d.systems.RenderSystem; -import me.retucio.sputnik.module.ModuleManager; -import me.retucio.sputnik.module.modules.camera.Fullbright; -import me.retucio.sputnik.module.modules.render.NoRender; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.LightmapRenderStateExtractor; -import net.minecraft.client.renderer.state.LightmapRenderState; -import net.minecraft.util.ARGB; -import net.minecraft.util.profiling.ProfilerFiller; -import net.minecraft.world.entity.LivingEntity; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - - -@Mixin(LightmapRenderStateExtractor.class) -public abstract class LightmapTextureManagerMixin { - - @Unique Fullbright fullbright; - @Unique NoRender noRender; - - @Inject(method = "", at = @At("TAIL")) - private void getModules(CallbackInfo ci) { - fullbright = ModuleManager.INSTANCE.getModuleByClass(Fullbright.class); - noRender = ModuleManager.INSTANCE.getModuleByClass(NoRender.class); - } - - @Inject(method = "extract", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiling/ProfilerFiller;push(Ljava/lang/String;)V", shift = At.Shift.AFTER), cancellable = true) - private void update(LightmapRenderState renderState, float partialTicks, CallbackInfo ci, @Local(name = "profiler") ProfilerFiller profiler) { - if (fullbright.isEnabled() && fullbright.mode.is(Fullbright.Modes.GAMMA)) { - RenderSystem.getDevice().createCommandEncoder().clearColorTexture(Minecraft.getInstance().gameRenderer.lightmap().texture(), - ARGB.color( - fullbright.color.getA(), - fullbright.color.getR(), - fullbright.color.getG(), - fullbright.color.getB() - ) - ); - profiler.pop(); - ci.cancel(); - } - } - - @Inject(method = "calculateDarknessScale", at = @At("HEAD"), cancellable = true) - private void noRenderDarkness(LivingEntity camera, float darknessGamma, float partialTickTime, CallbackInfoReturnable cir) { - if (noRender.isEnabled() && !noRender.darknessEffect.getValue()) cir.setReturnValue(0f); - } -} \ No newline at end of file diff --git a/src/main/java/me/retucio/sputnik/module/modules/camera/Fullbright.java b/src/main/java/me/retucio/sputnik/module/modules/camera/Fullbright.java index 99e7128..8ada6ca 100644 --- a/src/main/java/me/retucio/sputnik/module/modules/camera/Fullbright.java +++ b/src/main/java/me/retucio/sputnik/module/modules/camera/Fullbright.java @@ -1,7 +1,7 @@ package me.retucio.sputnik.module.modules.camera; import me.retucio.sputnik.mixin.accessors.MobEffectInstanceAccessor; -import me.retucio.sputnik.mixin.mixins.render.LightmapTextureManagerMixin; +import me.retucio.sputnik.mixin.mixins.render.LightmapRenderStateExtractorMixin; import me.retucio.sputnik.module.Category; import me.retucio.sputnik.module.Module; import me.retucio.sputnik.module.setting.settings.ColorSetting; @@ -14,7 +14,7 @@ import org.lwjgl.glfw.GLFW; import java.awt.*; /** continúa en: - * @see LightmapTextureManagerMixin + * @see LightmapRenderStateExtractorMixin * * @author retucio */ diff --git a/src/main/java/me/retucio/sputnik/ui/widgets/buttons/ModuleButton.java b/src/main/java/me/retucio/sputnik/ui/widgets/buttons/ModuleButton.java index 0ddcd3f..3afad9e 100644 --- a/src/main/java/me/retucio/sputnik/ui/widgets/buttons/ModuleButton.java +++ b/src/main/java/me/retucio/sputnik/ui/widgets/buttons/ModuleButton.java @@ -53,7 +53,7 @@ public class ModuleButton extends Button { ClickGUI.INSTANCE.closeSettingsFrame(module); else ClickGUI.INSTANCE.openSettingsFrame(module, - parent.getX() + parent.getW() + 120, parent.getY() + offset); + parent.getX() + parent.getW() + 120, parent.getRenderY() + offset); } } } diff --git a/src/main/resources/sputnik.mixins.json b/src/main/resources/sputnik.mixins.json index 52316f9..82eaeb0 100644 --- a/src/main/resources/sputnik.mixins.json +++ b/src/main/resources/sputnik.mixins.json @@ -77,7 +77,8 @@ "mixins.render.ItemFeatureRendererMixin", "mixins.render.ItemInHandRendererMixin", "mixins.render.LevelRendererMixin", - "mixins.render.LightmapTextureManagerMixin", + "mixins.render.LightmapMixin", + "mixins.render.LightmapRenderStateExtractorMixin", "mixins.render.LivingEntityRendererMixin", "mixins.render.MobEffectFogEnvironmentMixin", "mixins.render.OverlayTextureMixin",