Started by
CBJaxxx
on
Topic category: Advanced modding
Hello, I don't know java code but I am am smart enough to use an example or copy and paste a line of code in Mcreator.
I am making Player Shops and I wanted to know what the code looks set a itemstack equal to a inventory slot of the Player Shop Block, and render the itemstack on the Player Shop Block.
would I need to copy some lines of code to the one of the classes of the Player Shop Blocks?
I would be so very grateful to anyone with any clue on how I would do this.
This is a small code block (about 10 lines) in the block render class, but it needs to be adapted to the specific case, which requires Java knowledge.
Here's an example of rendering an item in an entity's hand (for the block, the code is the same, but you need to get the ItemStack from the block slot and don't need to use translateToHand method):
https://github.com/ObscuriaLithium/Aquamirae/blob/1.19.2-Forge-v5.6/src/main/java/com/obscuria/aquamirae/client/renderers/CaptainCorneliaRenderer.java#L53-L63