Take doubles as arguments in fromRenderable

This commit is contained in:
Username404-59 2021-04-30 19:53:35 +02:00
parent 60bf5377cd
commit c23ad38d54
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}