diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt index 0007033..03bcebe 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt @@ -23,8 +23,8 @@ abstract class Element( ((coordinateX >= this.x) && (coordinateX <= (this.x + this.width))) and ((coordinateY >= this.y) && (coordinateY <= (this.y + this.height))) companion object { private var caughtError: Boolean = false - fun fromRenderable(r: Renderable, x: Int, y: Int, width: Int, height: Int): Element { - return object: Element(x.toDouble(), y.toDouble(), width, height) { + fun fromRenderable(r: Renderable, x: Double, y: Double, width: Int, height: Int): Element { + return object: Element(x, y, width, height) { override fun render(poseStack: PoseStack?) = r.render(poseStack) } }