I'm trying to render an item in GUI, and upon hover, I want to display an image above it. However, this image is rendered beneath the item. Is this even possible?
final PoseStack poseStack2 = RenderSystem.getModelViewStack();
poseStack2.pushPose();
poseStack2.mulPoseMatrix(poseStack.last().pose());
poseStack2.translate(x, y, 0f);
poseStack2.scale(scale, scale, scale);
Minecraft.getInstance().getItemRenderer().renderAndDecorateFakeItem(itemStack, 0, 0);
RenderSystem.disableBlend();
poseStack2.popPose();
RenderSystem.applyModelViewMatrix(); // Reset to the current pose stack
if (isHovered) {
poseStack.pushPose();
RenderSystem.enableBlend();
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
RenderSystem.setShaderTexture(0, BG);
Screen.blit(poseStack, x, y, 0, 0, SIZE, SIZE, SIZE, SIZE);
RenderSystem.disableBlend();
poseStack.popPose();
}