Skip to content

Commit

Permalink
fixed connected TFC Round Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
octarine-noise committed Oct 22, 2015
1 parent 12b278f commit a53e08a
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -31,7 +31,6 @@ public boolean isBlockAccepted(IBlockAccess blockAccess, int x, int y, int z, Bl
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
blockAccess = world;
ForgeDirection logVertDir = getLogVerticalDir(blockAccess, x, y, z);
if (TerraFirmaCraftIntegration.isTFCBlock(block)) logVertDir = TerraFirmaCraftIntegration.getLogVerticalDir(blockAccess, x, y, z);

// use default renderer if we cannot determine log orientation
if (logVertDir == ForgeDirection.UNKNOWN) {
Expand Down Expand Up @@ -99,6 +98,9 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b
}

protected ForgeDirection getLogVerticalDir(IBlockAccess blockAccess, int x, int y, int z) {
// support TFC logs
if (TerraFirmaCraftIntegration.isTFCBlock(blockAccess.getBlock(x, y, z))) return TerraFirmaCraftIntegration.getLogVerticalDir(blockAccess, x, y, z);

// standard way as done by BlockRotatedPillar
switch((blockAccess.getBlockMetadata(x, y, z) >> 2) & 3) {
case 0: return ForgeDirection.UP;
Expand Down

0 comments on commit a53e08a

Please sign in to comment.