Skip to content

Commit

Permalink
Slight changes to glass pane top/bottom textures
Browse files Browse the repository at this point in the history
  • Loading branch information
fuj1n committed Sep 21, 2013
1 parent 2c94630 commit 86c19cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/tconstruct/blocks/GlassPaneConnected.java
Expand Up @@ -32,7 +32,7 @@ public int getRenderType() {
@Override
public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
if (par5 == 0 || par5 == 1) {
return getSideTextureIndex();
return par1IBlockAccess.getBlockId(par2, par3 - 1, par4) == this.blockID && par5 == 0 ? icons[15] : par1IBlockAccess.getBlockId(par2, par3 + 1, par4) == this.blockID && par5 == 1 ? icons[15] : getSideTextureIndex();
} else {
return super.getBlockTexture(par1IBlockAccess, par2, par3, par4, par5);
}
Expand Down Expand Up @@ -444,11 +444,11 @@ public boolean canPaneConnectTo(IBlockAccess access, int x, int y, int z, ForgeD

@Override
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
if(par5 == 0 || par5 == 1){
return par1IBlockAccess.getBlockId(par2, par3, par4) != this.blockID;
}else{
return true;
}
// return true;
// if(par5 == 0 || par5 == 1){
// return par1IBlockAccess.getBlockId(par2, par3, par4) != this.blockID;
// }else{
// return true;
// }
return true;
}
}
5 changes: 5 additions & 0 deletions src/tconstruct/client/block/PaneConnectedRender.java
Expand Up @@ -25,6 +25,9 @@ public void renderInventoryBlock(Block block, int metadata, int modelID, RenderB

@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
boolean temp = renderer.renderAllFaces;
renderer.renderAllFaces = true;

GlassPaneConnected pane = (GlassPaneConnected)block;

boolean flag = pane.canPaneConnectTo(world, x, y, z, EAST);
Expand Down Expand Up @@ -69,6 +72,8 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b


renderer.clearOverrideBlockTexture();

renderer.renderAllFaces = false;
return true;
}

Expand Down

0 comments on commit 86c19cf

Please sign in to comment.