aboutsummaryrefslogtreecommitdiff
path: root/src/compat/rei/java/moe
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/rei/java/moe')
-rw-r--r--src/compat/rei/java/moe/nea/firmament/compat/rei/EntityWidget.kt13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/compat/rei/java/moe/nea/firmament/compat/rei/EntityWidget.kt b/src/compat/rei/java/moe/nea/firmament/compat/rei/EntityWidget.kt
index 2b9e4bf..1097654 100644
--- a/src/compat/rei/java/moe/nea/firmament/compat/rei/EntityWidget.kt
+++ b/src/compat/rei/java/moe/nea/firmament/compat/rei/EntityWidget.kt
@@ -25,24 +25,19 @@ class EntityWidget(
override fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float) {
try {
- context.matrices.push()
if (!hasErrored) {
- context.matrices.translate(point.x.toDouble(), point.y.toDouble(), 0.0)
- val xScale = size.width / defaultSize.width.toDouble()
- val yScale = size.height / defaultSize.height.toDouble()
- context.matrices.scale(xScale.toFloat(), yScale.toFloat(), 1.0F)
EntityRenderer.renderEntity(
entity!!,
context,
- 0, 0,
- (mouseX - point.x) * xScale,
- (mouseY - point.y) * yScale)
+ point.x, point.y,
+ size.width, size.height,
+ mouseX.toDouble(),
+ mouseY.toDouble())
}
} catch (ex: Exception) {
ErrorUtil.softError("Failed to render constructed entity: $entity", ex)
hasErrored = true
} finally {
- context.matrices.pop()
}
if (hasErrored) {
context.fill(point.x, point.y, point.x + size.width.toInt(), point.y + size.height.toInt(), 0xFFAA2222.toInt())