diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/IGUIRenderable.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/IGUIRenderable.kt index 716d9a1c2..44f5b5937 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/IGUIRenderable.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/IGUIRenderable.kt @@ -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) } } }