inglettronald/DulkirMod-Fabric

Incorrect injection causing unexpected matrix stack manipulation.

Closed this issue · 4 comments

Hi, Skyblocker dev here. We recently received reports of screen/container features conflicting with DulkirMod-Fabric (see Skyblocker#239). It seems that the matrix stack is being manipulated by Dulkir, caused by this injection, which injects before the push call and modifies the screen matrix when it should inject after the push call and only modify the tooltip matrix.

@Inject(method = "drawTooltip(Lnet/minecraft/client/font/TextRenderer;Ljava/util/List;IILnet/minecraft/client/gui/tooltip/TooltipPositioner;)V",
at = @At(target = "Lnet/minecraft/client/util/math/MatrixStack;push()V", value = "INVOKE"))
public void onPush(TextRenderer textRenderer, List<TooltipComponent> components, int x, int y, TooltipPositioner positioner, CallbackInfo ci) {
if (MinecraftClient.getInstance().currentScreen instanceof HandledScreen) {
TooltipImpl.INSTANCE.applyScale(matrices);
}
}

Thanks for bringing this to my attention. I'll look into fixing this soon, but I am quite busy atm so it might be a bit.

Sorry for the complaints and stuff, I understand how frustrating it can be to have compatibility/dependency issues to deal with in support tickets.

No problem, thanks for your work!

Should be resolved now, forgot to close