Posted February 14, 20214 yr Hello. I simply want to render my own texture like a regular itemstack (with 3D-effect) without creating an own item or model for it. Here is how itementity renderers: On this screenshot you can see that by default it creates something like depth effect for making it looks like an 3D-thing. And here is my example. In this case I just draw plain texture via vertexes: So, As a result I want to render my floating shields like itemstack, but this is not actually an item, this is just texture, and, as I understand, I can't use in this case something like it (because this is not an item): Minecraft.getInstance().getItemRenderer().renderItem() I've tried to analyze code of itemstack rendering, but it looks too complicated and contains a lot of references from other classes, so, I can't simply understand which part of rendering I should analyze.
February 14, 20214 yr I think that the LayerRenderer is what you need. check for instance the ElytraLayer to get an example. in there just override the render method, check if the entity should have the layer rendered, and if it should, draw the objects (note that the rendering code is somewhat complicated, nothing that brute force won't fix) and then to "register" the layer, you can simply add a new instance of it to the player, under the RenderPlayerEvent (note: don't do this on the server side, only on the client side) Edited February 14, 20214 yr by kiou.23
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.