Jump to content

Recommended Posts

Posted (edited)

I'm having issues getting my animated model to work properly. When the block is placed, the model animates properly however there is an underlying, non-animating black version of it that is rendering within it. I get no console errors. 

 

The black version has all of the fan-blades rendered instead of alternating from one set to another.

giphy.gif

 

Block Init:

  Reveal hidden contents

Fan Class:

  Reveal hidden contents

Fan Blockstate:

  Reveal hidden contents

 

Edited by Branone
Posted

Update:

After thinking about it, the problem could be to do with the fact that I am only using one blockstate which switches between an animated and non-animated model. Am I allowed to do this, or is that the problem?

Posted (edited)

By default, transparent pixels in textures are rendered black if the opacity is 0%. Otherwise all other pixels are set to 100% opacity. Assuming using 1.11.2, this code will resolve your problem.

public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}

Edit: Goes in your block class

Edited by mr_crayfish
  • Like 1
Posted (edited)
  On 2/6/2017 at 7:37 AM, mr_crayfish said:

By default, transparent pixels in textures are rendered black if the opacity is 0%. Otherwise all other pixels are set to 100% opacity. Assuming using 1.11.2, this code will resolve your problem.

public BlockRenderLayer getBlockLayer()
{
    return BlockRenderLayer.CUTOUT;
}

Edit: Goes in your block class

Expand  

Thank you so much! I've been looking for an answer for quite some time now, and of all the people I get help from - MrCrayFish himself, the very person I have been watching tutorials of and have received so much inspiration from (assuming you aren't an imposter). 

Edited by Branone

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.