Clear depth after rendering item stack icons
This commit is contained in:
parent
e084221fde
commit
109145c3ce
@ -48,6 +48,7 @@ data class ItemStackIcon(private val itemStack: ItemStack, val width: Float = 16
|
||||
override fun render(guiGraphics: GuiGraphics, x: Float, y: Float, width: Float, height: Float) {
|
||||
if (x % 1f == 0f && y % 1f == 0f && width == 16f && height == 16f) {
|
||||
guiGraphics.renderFakeItem(itemStack, x.toInt(), y.toInt())
|
||||
clearDepth(guiGraphics.pose(), x, y, width, height)
|
||||
} else {
|
||||
val pose = guiGraphics.pose()
|
||||
|
||||
@ -59,6 +60,8 @@ data class ItemStackIcon(private val itemStack: ItemStack, val width: Float = 16
|
||||
|
||||
guiGraphics.renderFakeItem(itemStack, x.toInt(), y.toInt())
|
||||
pose.popPose()
|
||||
|
||||
clearDepth(pose, x, y, width, height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user