DARKHAWX Posted June 2, 2016 Posted June 2, 2016 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? Quote No signature for you!
Aeronica Posted June 2, 2016 Posted June 2, 2016 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 Quote
DARKHAWX Posted June 2, 2016 Author Posted June 2, 2016 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. Quote No signature for you!
Aeronica Posted June 2, 2016 Posted June 2, 2016 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. Quote
DARKHAWX Posted June 2, 2016 Author Posted June 2, 2016 Wow, that's really cool. Just check my translations and they were off as well. Ty for the help. Quote No signature for you!
DARKHAWX Posted June 2, 2016 Author Posted June 2, 2016 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? Quote No signature for you!
Aeronica Posted June 2, 2016 Posted June 2, 2016 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. Quote
Recommended Posts
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.