From 184af1d53ea032c946a43ed759a11b3c8f4bf116 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 4 Sep 2022 15:44:57 +0200 Subject: [PATCH] Update kirin --- gradle.properties | 2 +- .../minelittlepony/unicopia/container/DynamicContent.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6a03feb6..e9550724 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,4 +17,4 @@ org.gradle.daemon=false # Dependencies modmenu_version=4.0.6 minelp_version=4.6.1 - kirin_version=1.11.0 + kirin_version=1.11.1 diff --git a/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java b/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java index 9396d894..57b92d97 100644 --- a/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java +++ b/src/main/java/com/minelittlepony/unicopia/container/DynamicContent.java @@ -96,7 +96,7 @@ public class DynamicContent implements Content { return (bounds.width - 10) - elements.stream() .filter(PageElement::isFloating) .map(PageElement::bounds) - .filter(b -> b.contains(b.left + b.width / 2, yPosition)) + .filter(b -> b.containsY(yPosition)) .mapToInt(b -> b.width) .sum(); } @@ -105,7 +105,7 @@ public class DynamicContent implements Content { return elements.stream() .filter(p -> p.flow() == PageElement.Flow.LEFT) .map(PageElement::bounds) - .filter(b -> b.contains(b.left + b.width / 2, yPosition)) + .filter(b -> b.containsY(yPosition)) .mapToInt(b -> b.width) .sum(); } @@ -150,7 +150,7 @@ public class DynamicContent implements Content { elements.stream().filter(PageElement::isFloating).forEach(element -> { Bounds bounds = element.bounds(); matrices.push(); - matrices.translate(bounds.left, bounds.top, 0); + bounds.translate(matrices); element.draw(matrices, mouseX, mouseY, container); matrices.pop(); });