Take doubles as arguments in fromRenderable
This commit is contained in:
parent
60bf5377cd
commit
c23ad38d54
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue