Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Rendering an itemstack above an entity
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
The_Fireplace

Rendering an itemstack above an entity

By The_Fireplace, March 31, 2017 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

The_Fireplace    11

The_Fireplace

The_Fireplace    11

  • Creeper Killer
  • The_Fireplace
  • Forge Modder
  • 11
  • 241 posts
Posted March 31, 2017

Hey guys, I want to render an itemstack from a slot in my entity's inventory above the entity. I would prefer for it to render like the EntityItem does. My question is, how do you recommend I do this? I would like to avoid causing a noticeable performance hit if possible.

It should also be noted that I plan to have this rendering disabled by default, and enabled by either using a keybind or equipping an item.

  • Quote

If I helped please press the Thank You button.

 

Check out my mods at http://www.curse.com/users/The_Fireplace/projects

Share this post


Link to post
Share on other sites

diesieben07    7590

diesieben07

diesieben07    7590

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7590
  • 54991 posts
Posted March 31, 2017

In your Renderer's doRender method you need to not only render your entity, but also the item. You can see how to render the item in RenderEntityItem.

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Draco18s
      GUI Documentation

      By Draco18s · Posted 25 minutes ago

      GUIs aren't that difficult. There's dozens of tutorials for them and they haven't really changed all that much in ten years.
    • Xenfo
      Mod Blocker

      By Xenfo · Posted 41 minutes ago

      Any mod blockers that actually work? Please link them if yes.
    • diesieben07
      Tessellator ignores lighting?

      By diesieben07 · Posted 1 hour ago

      Neither 1.10 now 1.14 are supported here. Please refer to the supported versions page: https://forums.minecraftforge.net/topic/91712-supported-version-directory/
    • CookieLukas
      Tessellator ignores lighting?

      By CookieLukas · Posted 1 hour ago

      Oh,  sorry, the code was 1.10.2, but as its not allowed here, I updated it to 1.14.4.
    • diesieben07
      Forge isn't working on Minecraft Realms

      By diesieben07 · Posted 1 hour ago

      1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • T1ps
      3
      GUI Documentation

      By T1ps
      Started Tuesday at 10:14 PM

    • Xenfo
      0
      Mod Blocker

      By Xenfo
      Started 41 minutes ago

    • CookieLukas
      3
      Tessellator ignores lighting?

      By CookieLukas
      Started 2 hours ago

    • Extrodonary
      1
      Forge isn't working on Minecraft Realms

      By Extrodonary
      Started 1 hour ago

    • Liahim
      0
      [1.16.4-1.16.5] Seed for Biome Provider and Chunk Generator

      By Liahim
      Started 1 hour ago

  • Who's Online (See full list)

    • bananapizzuh
    • Xenfo
    • Warsade
    • monkeysHK
    • Microcellule
    • Draco18s
    • ChampionAsh5357
    • philip-elsner@gmx.net
    • Beethoven92
    • Mango106
    • Luis_ST
    • Liahim
    • diesieben07
    • Mounty
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Rendering an itemstack above an entity
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community