# [1.6.4] [Solved] shouldSideBeRendered() Problem.

## Recommended Posts

I'm trying to do the following:

If two blocks from my mod collide by one (or more) faces, then those faces, which collides, shouldn't be rendered.

And i have the following problem:

Those two block are one next to other and their top and bottom faces a colliding, but the don't become "invisible":

But if move the block above, (1 meter) up, then the top face of the lower block becomes invisible:

And if the block is "alone", the side renders correctly:

Here is my code

```@Override
public boolean shouldSideBeRendered(IBlockAccess block, int x, int y, int z, int side)
{
// -Y
if(side == 0 && isBlockACamouflage(block.getBlockId(x, y - 1, z)))
{
return false;
}

// +Y
if(side == 1 && isBlockACamouflage(block.getBlockId(x, y + 1, z)))
{
return false;
}

// -Z
if(side == 2)
{
return false;
}

else
{
return true;
}
}
```

PS: isBlockACamouflage() only check is the block is one added my the mod or not

Thanks for helping.

##### Share on other sites

Hi

BlockBreakable::

* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given

* coordinates.  Args: blockAccess, x, y, z, side

public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int x, int y, int z, int side)

{

int i1 = par1IBlockAccess.getBlockId(x, y, z);

return !this.localFlag && i1 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, x, y, z, side);

}

x,y,z is the coordinates of the adjacent block, not the block being rendered.

-TGG

##### Share on other sites

Hi

BlockBreakable::

* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given

* coordinates.  Args: blockAccess, x, y, z, side

public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int x, int y, int z, int side)

{

int i1 = par1IBlockAccess.getBlockId(x, y, z);

return !this.localFlag && i1 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, x, y, z, side);

}

x,y,z is the coordinates of the adjacent block, not the block being rendered.

-TGG

Okay, thanks, it works

## 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.

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

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

• ### Posts

• is there any other ways to use shaders then because I cant find any for 1.12.2
• I load in perfectly then when I go to create a new world I crash. Here is the crash-report: https://paste.ubuntu.com/p/xWTv227DW5/
• Hey guys, I've got no clue what any of this means and am trying to set up a server for my friends and I but keeps crashing before starting up. Crash Log https://mclo.gs/a3e3TVG
• 1.21 but i have this problem since 1.20.4

• ### Who's Online (See full list)

×

• #### Activity

×
• Create New...