Posted June 2, 20169 yr So I want to achieve something similar to the way the Arcane Pedestals from Thaumcraft work, wherein they render the item they are holding above them, but I have no idea how to go about that. I currently have a tile entity that will store and item upon clicking it, so how would I get it so that it displays the items it has above it? No signature for you!
June 2, 20169 yr This may help with some ideas but, explains more about the object model, but it does show one way to add an item. Render Block TESR / OBJ-1.9
June 2, 20169 yr Author Hmm. I can't seem to get it to work. I can get the model loaded, but the item never renders. No errors or anything. No signature for you!
June 2, 20169 yr I had some issues getting it to work initially too. But I realized that the item was rendering, but it was rendering outside of my view. I messed up the translations. I looked at the code for the Project E and that was similar, but not updated to 1.9. After some head scratching and testing I got it to work. The end result for me is a piano with and Item that can be placed on the music rack.
June 2, 20169 yr Author Wow, that's really cool. Just check my translations and they were off as well. Ty for the help. No signature for you!
June 2, 20169 yr Author Okay, one last thing. With the way my tile entity works, it can store up to 8 items, and will display them all. To do this I created a for loop (the items are stored in a list) and then would render each item, translating and scaling each time. However, the translate and scale functions are relative, which makes it a little harder to display this sort of stuff, is there a way I can 'reset' the position and scale of the render? i.e. is there some function like GlStateManager.position(x,y,z) or do I have to make my translations/scale changes and then manually revert them afterwards? No signature for you!
June 2, 20169 yr Pushing and popping the GL state comes to mind. I do that because I have three models that I need to apply different translation and rotations to. The music rack, bench and the inventory item to be displayed. I'm using TESR for now, but I'd like to convert over to the new animation system. My goal is to have the music rack flip up and down and the bench move in and out. The piano itself is based on the vanilla bed code. So one block, two models. The the rack and bench are just normal json defined models rendered in the TESR.
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.