Fixes #2689: Do not pass our own blockstate to the adjacent block.

This commit is contained in:
yueh 2016-12-08 21:29:46 +01:00
parent 86908b1ae6
commit a2b20f1d67

View file

@ -95,15 +95,17 @@ public class BlockQuartzGlass extends AEBaseBlock
{
BlockPos adjacentPos = pos.offset( side );
final Material mat = w.getBlockState( adjacentPos ).getBlock().getMaterial( state );
final Material mat = w.getBlockState( adjacentPos ).getMaterial();
if( mat == Material.GLASS || mat == AEGlassMaterial.INSTANCE )
{
if( w.getBlockState( adjacentPos ).getBlock().getRenderType( state ) == this.getRenderType( state ) )
if( w.getBlockState( adjacentPos ).getRenderType() == this.getRenderType( state ) )
{
return false;
}
}
return super.shouldSideBeRendered( state, w, pos, side );
return w.getBlockState( pos ).shouldSideBeRendered( w, adjacentPos, side );
}
@Override