Skip to content

Commit

Permalink
Fix all ISBR always returning true even when not rendering anything #…
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Jan 4, 2015
1 parent 752930a commit 724aa45
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 13 deletions.
Expand Up @@ -53,8 +53,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
renderer.setRenderBounds(0F, 0.75F, 0.0f, 0.25F, 1.0F, 1F);
}
renderer.renderStandardBlock(block, x, y, z);
return true;
}
return true;
return false;
}

@Override
Expand Down
Expand Up @@ -156,8 +156,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
renderer.setRenderBounds(bounds[0], 0.51, bounds[1], bounds[2], 0.5 + liquidAmount, bounds[3]);
renderLiquidPart(world, x, y, z, block, renderer, tankSub.fluid, false);
}
return true;
}
return true;
return false;
}

private double[] getRenderboundsForLiquid (ForgeDirection dir)
Expand Down
Expand Up @@ -420,8 +420,9 @@ else if (metadata == 2)
renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}
return true;
}
return true;
return false;
}

@Override
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/smeltery/model/SmelteryRender.java
Expand Up @@ -41,7 +41,7 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block

public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
{
renderer.renderStandardBlock(block, x, y, z);
boolean ret = renderer.renderStandardBlock(block, x, y, z);
SmelteryLogic logic = (SmelteryLogic) world.getTileEntity(x, y, z);
if (logic.validStructure)
{
Expand Down Expand Up @@ -102,10 +102,11 @@ public boolean renderSmeltery (IBlockAccess world, int x, int y, int z, Block bl
yBase++;
liquidBase = 0;
}
ret = true;
}
}
}
return true;
return ret;
}

void renderLayer (SmelteryLogic logic, int start, CoordTuple from, CoordTuple to, int posY, RenderBlocks renderer, IBlockAccess world)
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/smeltery/model/TankAirRender.java
Expand Up @@ -53,8 +53,9 @@ else if (logic.hasFluids())
base += fluidstack.amount;
}
}
return true;
}
return true;
return false;
}

private double getBaseAmount (int base)
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/smeltery/model/TankRender.java
Expand Up @@ -62,8 +62,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
renderer.renderStandardBlock(block, x, y, z);
}
return true;
}
return true;
return false;
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/tools/model/TableRender.java
Expand Up @@ -61,8 +61,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
return true;
}
return true;
return false;
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/world/model/OreberryRender.java
Expand Up @@ -32,8 +32,9 @@ else if (md < 8)
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}
return true;
}
return true;
return false;
}

@Override
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/world/model/PunjiRender.java
Expand Up @@ -62,8 +62,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
* renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
* renderer.renderStandardBlock(block, x, y, z); }
*/
return true;
}
return true;
return false;
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/world/model/SlimeChannelRender.java
Expand Up @@ -25,10 +25,10 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
{
if (modelID == model)
{

renderRotatedBlock(block, x, y, z, world, renderer);
return true;
}
return true;
return false;
}

static final float LIGHT_Y_NEG = 0.5F;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/world/model/SlimePadRender.java
Expand Up @@ -37,8 +37,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
float[] size = size(metadata % 8);
renderer.setRenderBounds(size[0], 0.5f, size[1], size[2], 0.6875f, size[3]);
BlockSkinRenderHelper.renderLiquidBlock(((SlimePad) block).getNubIcon(metadata), ((SlimePad) block).getNubIcon(metadata), x, y, z, renderer, world);
return true;
}
return true;
return false;
}

float[] size (int meta)
Expand Down

0 comments on commit 724aa45

Please sign in to comment.