Raised

Raised

4M Downloads

Smooth Scroll Compatibility

Closed this issue · 4 comments

commented

When using Smooth Scroll with Raised, the selector's bottom row of pixels aren't attached to the animation.

Screencast_20250629_201631.webm

Not sure if compatibility is needed on their side or this side.

commented

This looks to be only an issue if the texture fix is set to patch or auto (which uses patch if no resource pack contains a texture for the replace method). It will work fine if you set to to replace.

It would appear that Smooth Scrolling runs a modify ARG on the vanilla blitSprite method to adjust its position, targeting that specific ordinal.

Raised injects an innerBlit at that before point to add the missing portion of texture below. Raised cannot use blitSprite here because it does not want to draw a whole texture. Unfortunately, since these calls are to different methods, I don't think there is any way for both mods to ensure that each other's mixins enclose eachother through some sort of slice.

https://github.com/SmajloSlovakian/Minecraft-Smooth-Scrolling/blob/dev/src/main/java/smsk/smoothscroll/mixin/Hotbar/HotbarMixin.java

commented

hi, i finally got to fixing some issues... i have just committed a relatively small change so that i use wrapoperation instead of modifyargs when modifying the position along with matrix translate... if you, @yurisuika do the same thing, it might fix the issue (i'll have to probably change the mixin priority though, so that i wrap your wrapoperation)
i'm going to try to do this and i will tell if it worked for me... if you have a bit of a different proposal, feel free to share it with me here

commented

yeah, it seems to work
here is my proposed code change to your mod:

    @WrapOperation(method = "renderItemHotbar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 1))
    private void patchHotbarSelector(GuiGraphics guiGraphics, RenderPipeline pipeline, ResourceLocation sprite, int x, int y, int width, int height, Operation<Void> operation, @Local(ordinal = 0) Player player) {
        operation.call(guiGraphics, pipeline, sprite, x, y, width, height);
        if (Configure.getTexture() == Resource.Texture.PATCH  || (Configure.getTexture() == Resource.Texture.AUTO && !Pack.getPack())) {
            x = (guiGraphics.guiWidth() / 2) - 92 + player.getInventory().getSelectedSlot() * 20;
            y = guiGraphics.guiHeight();
            ((GuiGraphicsInvoker) guiGraphics).invokeInnerBlit(RenderPipelines.GUI_TEXTURED, ResourceLocation.tryParse("textures/gui/sprites/hud/hotbar_selection.png"), x, x + 24, y, y + 1, 0, 1, 1 / 23.0F, 0, -1);
        }
    }

if you have any questions, let me know ;)

commented

https://github.com/yurisuika/Raised/actions/runs/17876719312

I've made that changed and downloaded your latest build. As far as I can tell it seems to work as desired.