Posted February 11, 201312 yr Hello All, How can i add a custom renderer to my block/tile entity so that it: [*]animated [*]glows (like xycraft) thanks in advance P.S. also i'm still looking for advice on adding HUD elements when armor is equipped github
February 11, 201312 yr Animation is best done using a TileEntitySpecialRenderer, because those get called for every frame. (Using a normal block renderer for animation requires re-rendering the whole chunk on each change, which puts a lot of load on the client.) As for glowing, do you want your block to actually give off light and light up the surroundings, or just make it look luminescent?
February 12, 201312 yr Author As for glowing, do you want your block to actually give off light and light up the surroundings, or just make it look luminescent? just to look like it's glowing, not actually giving off light. I saw how it was done for an entity in the enderman render files (for the eyes), but how do i render blocks like this? github
February 12, 201312 yr just to look like it's glowing, not actually giving off light. I saw how it was done for an entity in the enderman render files (for the eyes), but how do i render blocks like this? The same technique should work, but you will need to flush the tessellator before changing the blending and lighting modes. Something like this: tessellator.draw(); // set up blending and lighting tessellator.startDrawingQuads(); // draw the glowing bits tessellator.draw(); // restore previous blending and lighting tessellator.startDrawingQuads();
February 12, 201312 yr No need for a TileEntitySpecialRenderer for animation in most cases. In most cases a TextureFX is enough. Lava and water work the same way. That depends on what sort of animation you want to do. From what I've seen, a TextureFX is okay if you can get the effect you want just by changing the texture, but not if you need to change the geometry. Chests are an example of this -- they use a TileEntitySpecialRenderer to animate opening and closing the lid.
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.