Round absolute values to not render at half a pixel
This commit is contained in:
parent
f80b913d61
commit
fc096c28aa
@ -17,6 +17,7 @@ import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.math.max
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@JvmRecord
|
||||
data class ScreenPos(val x: Float, val y: Float)
|
||||
@ -417,7 +418,7 @@ open class EditablePanel<out S : Screen> @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
poseStack.pushPose()
|
||||
poseStack.translate(absoluteX.toDouble(), absoluteY.toDouble(), accumulatedDepth.toDouble())
|
||||
poseStack.translate(absoluteX.roundToInt().toDouble(), absoluteY.roundToInt().toDouble(), accumulatedDepth.toDouble())
|
||||
innerRender(poseStack, mouseX, mouseY, partialTick)
|
||||
poseStack.popPose()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user