aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/mixin
diff options
context:
space:
mode:
authorAnthony Hilyard <anthony.hilyard@gmail.com>2021-11-23 11:35:00 -0800
committerAnthony Hilyard <anthony.hilyard@gmail.com>2021-11-23 11:35:00 -0800
commit45ba481ef75db5e0f9e09b8695da4a911da16fdb (patch)
treef97188d054901e8c64497df46dff400eab8ea1b8 /src/main/java/com/anthonyhilyard/iceberg/mixin
parent1a86b08671478a158a7561bf6f32da760acc490c (diff)
downloadIceberg-45ba481ef75db5e0f9e09b8695da4a911da16fdb.tar.gz
Iceberg-45ba481ef75db5e0f9e09b8695da4a911da16fdb.tar.bz2
Iceberg-45ba481ef75db5e0f9e09b8695da4a911da16fdb.zip
Initial 1.18 port.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/mixin')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/mixin/ScreenMixin.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/mixin/ScreenMixin.java b/src/main/java/com/anthonyhilyard/iceberg/mixin/ScreenMixin.java
index 98c8a27..06e0e90 100644
--- a/src/main/java/com/anthonyhilyard/iceberg/mixin/ScreenMixin.java
+++ b/src/main/java/com/anthonyhilyard/iceberg/mixin/ScreenMixin.java
@@ -114,9 +114,12 @@ public class ScreenMixin extends AbstractContainerEventHandler
{
// Do colors now, sure why not.
ColorResult result = RenderTooltipEvents.COLOR.invoker().onColor(tooltipStack, components, poseStack, x, y, font, background, borderStart, borderEnd, false);
- background = result.background();
- borderStart = result.borderStart();
- borderEnd = result.borderEnd();
+ if (result != null)
+ {
+ background = result.background();
+ borderStart = result.borderStart();
+ borderEnd = result.borderEnd();
+ }
Screen.fillGradient(matrix4f, bufferBuilder, left - 3, top - 4, left + width + 3, top - 3, zIndex, background, background);
Screen.fillGradient(matrix4f, bufferBuilder, left - 3, top + height + 3, left + width + 3, top + height + 4, zIndex, background, background);