aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/items/recipes/EntityWidget.kt
blob: 88d91ad013910f8e5039a9181029f26a34c816c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package moe.nea.firmament.features.items.recipes

import me.shedaniel.math.Rectangle
import net.minecraft.client.gui.GuiGraphics
import net.minecraft.world.entity.LivingEntity
import moe.nea.firmament.gui.entity.EntityRenderer

class EntityWidget(override val rect: Rectangle, val entity: LivingEntity) : RecipeWidget() {
	override fun render(
		guiGraphics: GuiGraphics,
		mouseX: Int,
		mouseY: Int,
		partialTick: Float
	) {
		EntityRenderer.renderEntity(
			entity, guiGraphics,
			rect.x, rect.y,
			rect.width.toDouble(), rect.height.toDouble(),
			mouseX.toDouble(), mouseY.toDouble()
		)
	}
}