Jump to content

Custom texture effects


Yagoki

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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();

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.