Jump to content

Befell

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Befell

  1. I am trying to render an item in a container. I have found that Minecraft.getMinecraft().fontRenderedObj.drawString() works but I do not know how to do the correct x and y. Someone had made this code, the position is right but only works in chests. int guiLeft = (guiContainer.width - 176) / 2; int inventoryRows = inventory.getSizeInventory() / 9; int ySize = 222 - 108 + inventoryRows * 18; int guiTop = (guiContainer.height - ySize) / 2; int slotX = (int) ((guiLeft + inventorySlot.xDisplayPosition) / scaleFactor); int slotY = (int) ((guiTop + inventorySlot.yDisplayPosition) / scaleFactor);
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.