Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JOB

Members
  • Joined

  • Last visited

  1. Thank you, You were right i looked more deeply in the way that the inventory is generated on the GUI and found this method : renderItemIntoGUI(ItemStack stack, int x, int y) in the ItemRenderer class and it is really easy to use. For example i use it like this : public static finale Minecraft MC = Minecraft.getInstance(); MC.getItemRenderer().renderItemIntoGUI(MC.player.getHeldItemMainhand(), 200, 200); For some reasons when i first read the ItemRenderer class i completely passed over it.
  2. Resolved my issue. To get the TextureAtlasSprite of an item i use : public static final Minecraft MC = Minecraft.getInstance(); public static final PlayerEntity player = MC.player; TextureAtlasSprite texture = MC.getTextureMap().getSprite(player.getHeldItemMainHand().getItem().getRegistryName());
  3. Hello, I am currently trying to draw the texture of the current held item by the player somewhere else on the inGameGui. I am using the RenderGameOverlayEvent.post and i can easily drawString but i don't know how to draw texture. I tried using the blit method but i don't know how to get the TextureAtlasSprite of an item (wich is needed for the method). I can get the ResourceLocation of the item but i have no clue for the TextureAtlasSprite. Could i also have explanation on the bindTexture(ResourceLocation resource) method ? Thank you for any reply.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.