xkorot Posted May 5 Share Posted May 5 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(); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.