Jump to content

[Solved] [1.7.10] Blocks bordering custom TileEntity not rendering correctly


QKninja

Recommended Posts

I'm running into a rendering problem. I'm using a TileEntitySpecialRenderer to render my model, which is working as expected. However, when my block is placed bordering certain blocks, such as a lit furnace or end portal, the corresponding side on that block will not render correctly. It appears as if I haven't overridden IsOpaqueCube(), but I have. I've provided a screenshot and some relevant code, and can provide more if needed. Thanks.

 

Edit: If I change the light level of the block to zero, it works. having a light level leads to a different call in BlockRenderer.

Edit 2: I messed up and setLightLevel(10.0F) when it should be less than 1. replacing with setLightLevel(0.5F) fixed the problem.

 

pNsfeeO.png

 

    @Override
    public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
    {
        return true;
    }

    @Override
    public boolean isOpaqueCube()
    {
        return false;
    }

    @Override
    public int getRenderType()
    {
        return -1;
    }

    @Override
    public boolean renderAsNormalBlock()
    {
        return false;
    }

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.