aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/items/recipes/ArrowWidget.kt
blob: db0cf605815b063b4ad269318203a12166192b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package moe.nea.firmament.features.items.recipes

import me.shedaniel.math.Dimension
import me.shedaniel.math.Point
import me.shedaniel.math.Rectangle
import net.minecraft.client.gui.GuiGraphics
import net.minecraft.client.renderer.RenderPipelines
import net.minecraft.resources.ResourceLocation

class ArrowWidget(override var position: Point) : RecipeWidget() {
	override val size: Dimension
		get() = Dimension(14, 14)

	companion object {
		val arrowSprite = ResourceLocation.withDefaultNamespace("container/furnace/lit_progress")
	}

	override fun render(
		guiGraphics: GuiGraphics,
		mouseX: Int,
		mouseY: Int,
		partialTick: Float
	) {
		guiGraphics.blitSprite(
			RenderPipelines.GUI_TEXTURED,
			arrowSprite,
			14,
			14,
			0,
			0,
			position.x,
			position.y,
			14,
			14
		)
	}

}