Skip to content

Commit

Permalink
Center items on cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
ATPStorages committed Aug 29, 2024
1 parent 82a6bf4 commit ebd8a5c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ open class ItemContainerWidget(
if (!it.isEmpty) {
val pose = pGuiGraphics.pose()
pose.pushPose()
pose.translate(0.0f, 0.0f, 232.0f)
pGuiGraphics.renderItem(it, pMouseX, pMouseY)
pGuiGraphics.renderItemDecorations(rgMinecraft.font, it, pMouseX, pMouseY)
val pMx = pMouseX - 8
val pMy = pMouseY - 8
pGuiGraphics.renderItem(it, pMx, pMy)
pGuiGraphics.renderItemDecorations(rgMinecraft.font, it, pMx, pMy)
pose.popPose()
}
}
Expand Down

0 comments on commit ebd8a5c

Please sign in to comment.