Posted June 26, 201411 yr Hello, I am trying to custom render a block, but I just want to render it like an item; it will be one pixel high, and have transparent parts. Let's just take, for example, a sword (laying flat), and say I am trying to render that as my 1px high cube. Since I will be rendering this just like an item, is there any way that I can easily do this using built-in functionality? I would like to be able to just make a single image, and somehow display it as my block, but 1px thick, and not have to make a lot of textures for each item I plan to do this with. I might just be over-thinking this, but I figured this was the place to ask anyways. Thanks in advance for all your help!
June 26, 201411 yr Scale only one axis using OpenGL? That could be a possibility We all stuff up sometimes... But I seem to be at the bottom of that pot.
June 26, 201411 yr Hi The code in ItemRenderer.renderItemIn2D takes a part of a texture and renders it so it looks like the vanilla items, i.e. flat but with a small thickness.. You just need to provide it with the icon texture coordinates and it does the rest. Should work for blocks too. -TGG
June 26, 201411 yr Whay don't you just try to make an item that places your block down? It should be simpler other than messing around with OpenGL.
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.