-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Describe the bug
WATUT’s RenderHelper.renderWithTooltipEnd assumes that the PoseStack always contains at least one entry. In environments where other mods modify or pop the PoseStack earlier in the render pipeline, this results in a client crash:
java.util.NoSuchElementException at java.util.ArrayDeque.getLast(ArrayDeque.java:413) at com.mojang.blaze3d.vertex.PoseStack.getLast(PoseStack.java:70) at com.corosus.watut.client.screen.RenderHelper.renderWithTooltipEnd(RenderHelper.java:316)
Expected behavior
WATUT should safely check whether the PoseStack is empty before calling getLast() or performing operations that assume a non‑empty stack.
Instead, if the PoseStack has been fully popped by another mod’s GUI mixin, WATUT attempts to access the last matrix entry and crashes the client.
Mod and Minecraft version:
- Version: watut-forge-1.20.1-1.2.3
Additional context
I can't tell you what triggered this, I can only tell you that putting a null guard on poseStack should prevent this kind of rare exception to come up in the future. It seems to happen spontaneously when hitting 'TAB' to expand the player list on my heavily modified, massive pack.