i += offset[0];
j += offset[1];
k += offset[2];
int neighborID = blockAccess.getBlockId(i, j, k);
int neighborMeta = blockAccess.getBlockMetadata(i, j, k);
Block neighbor = Block.blocksList[neighborID];
if (this.exclude(neighbor, face, neighborMeta)) {
return false;
} else {
int orientation = getOrientationFromMetadata(block, metadata);
int neighborOrientation = getOrientationFromMetadata(neighbor, neighborMeta);
if ((orientation & -65536) != (neighborOrientation & -65536)) {
return false;
} else if (this.metadata != -1 && (orientation & 65535) != (neighborOrientation & 65535)) {
return false;
} else {
if (face >= 0 && this.innerSeams) {
int[] normal = NORMALS[face];
if (!neighbor.shouldSideBeRendered(blockAccess, i + normal[0], j + normal[1], k + normal[2], face)) {
return false;
}
}
switch (this.connectType) {
case 0:
return neighborID == blockID;
case 1:
return neighbor.getBlockTexture(blockAccess, i, j, k, face) == icon;
case 2:
return block.blockMaterial == neighbor.blockMaterial;
default: