aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java b/src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java
index 48184b9..29cc39b 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/util/Tooltips.java
@@ -222,8 +222,6 @@ public class Tooltips
poseStack.pushPose();
final int zLevel = 400;
- float f = itemRenderer.blitOffset;
- itemRenderer.blitOffset = zLevel;
Tesselator tesselator = Tesselator.getInstance();
BufferBuilder bufferbuilder = tesselator.getBuilder();
@@ -245,12 +243,9 @@ public class Tooltips
}, matrix4f, bufferbuilder, rectX, rectY, rect.getWidth(), rect.getHeight(), zLevel);
RenderSystem.enableDepthTest();
- RenderSystem.disableTexture();
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
BufferUploader.drawWithShader(bufferbuilder.end());
- RenderSystem.disableBlend();
- RenderSystem.enableTexture();
BufferSource bufferSource = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder());
poseStack.translate(0.0f, 0.0f, zLevel);
@@ -273,17 +268,16 @@ public class Tooltips
}
bufferSource.endBatch();
- poseStack.popPose();
tooltipTop = rectY;
for (int componentNumber = 0; componentNumber < info.getComponents().size(); ++componentNumber)
{
ClientTooltipComponent imageComponent = (ClientTooltipComponent)info.getComponents().get(componentNumber);
- imageComponent.renderImage(info.getFont(), rectX, tooltipTop, poseStack, itemRenderer, zLevel);
+ imageComponent.renderImage(info.getFont(), rectX, tooltipTop, poseStack, itemRenderer);
tooltipTop += imageComponent.getHeight() + (componentNumber == 0 ? 2 : 0);
}
- itemRenderer.blitOffset = f;
+ poseStack.popPose();
RenderTooltipEvents.POSTEXT.invoker().onPost(stack, info.getComponents(), poseStack, rectX, rectY, info.getFont(), rect.getWidth(), rect.getHeight(), comparison, index);
}
@@ -489,9 +483,9 @@ public class Tooltips
// Find the title component, which is the first text component.
int titleIndex = 0;
- for (ClientTooltipComponent clienttooltipcomponent : components)
+ for (ClientTooltipComponent clientTooltipComponent : components)
{
- if (clienttooltipcomponent instanceof ClientTextTooltip)
+ if (clientTooltipComponent instanceof ClientTextTooltip)
{
break;
}