Blocks such as fences, glass panes etc. connect to blocks with custom models

Upvotes: 4
Issue description

In the attached image, the fence is connected to the carpet block, despite the fact that it's not a full block. The issue is caused by custom blocks not overriding the getBlockFaceShape method from, which returns SOLID by default. This piece of code fixes the issue by returning the UNDEFINED shape instead.

public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
	return BlockFaceShape.UNDEFINED;

I think it would be nice to be able to chose the face shape for each face of the block, but it could be difficult to implement for blocks with rotation.

Issue comments

Developer Submitted by Klemen on Sat, 08/03/2019 - 16:01

Thank you for your bug report and code example. We will fix this.