Posted October 9, 20204 yr 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 October 9, 20204 yr by Awsome
October 9, 20204 yr 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 October 9, 20204 yr by Beethoven92 Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
October 10, 20204 yr Author I managed to get it working, I just looked at the campfire tile entity's renderer as an example.
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.