Jump to content

Recommended Posts

Posted (edited)

I would like to have a tile entity that renders it's items in-world on top of itself.

 

Can I get some pointers as to where to look for examples of that sort of thing?

Also, just a few more questions:

1. Is it possible to just use a TER for the items and have the block itself just be a baked model?

2. Do I need to use a container for the tile entity if I'm not going to add a GUI for it?

Edited by Awsome
Posted (edited)

Look here to see different examples of tile entity renderers: https://github.com/TheGreyGhost/MinecraftByExample/tree/1-15-2-working/src/main/java/minecraftbyexample/mbe21_tileentityrenderer

Here is an outdated (1.12) example that does what you want to do, so maybe you can get inspiration from: https://wiki.mcjty.eu/modding/index.php?title=Render_Block_TESR_/_OBJ-1.12

To answer your questions:

1 - Yes, the examples i linked do that (though the second example loads an OBJ model)

2 - If you want to just display an item on top of your block, i think you just need to store an ItemStack in your tile entity...it really depends on how you want to interact with the block (for example right click on the block puts/takes the item) or if it needs more complicate behaviour

Edited by Beethoven92

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

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