Skip to content

Commit

Permalink
Fix liquids in tanks not rendering their top side if an opaque block …
Browse files Browse the repository at this point in the history
…is on top. (Relevant for all non-full tanks)
  • Loading branch information
bonii-xx committed Aug 24, 2014
1 parent 1daf7fa commit 9070c73
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 11 additions & 2 deletions src/main/java/tconstruct/client/BlockSkinRenderHelper.java
Expand Up @@ -884,8 +884,17 @@ public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int
if(stillIcon == null) stillIcon = FluidRegistry.WATER.getStillIcon();
if(flowingIcon == null) flowingIcon = FluidRegistry.WATER.getFlowingIcon();

return Minecraft.isAmbientOcclusionEnabled() ? renderFakeBlockWithAmbientOcclusion(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world) : renderFakeBlockWithColorMultiplier(
stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
boolean raf = renderer.renderAllFaces;
renderer.renderAllFaces = true;

boolean ret;
if(Minecraft.isAmbientOcclusionEnabled())
ret = renderFakeBlockWithAmbientOcclusion(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);
else
ret = renderFakeBlockWithColorMultiplier(stillIcon, flowingIcon, x, y, z, var6, var7, var8, renderer, world);

renderer.renderAllFaces = raf;
return ret;
}

static boolean renderFakeBlockWithAmbientOcclusion (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
Expand Down
1 change: 1 addition & 0 deletions src/main/java/tconstruct/library/crafting/Smeltery.java
Expand Up @@ -224,6 +224,7 @@ public static void addDictionaryMelting (String oreName, FluidType type, int tem
addMelting(type, is, temperatureDifference, fluidAmount);
}

// todo: mantle -> itemmeta wrapper
public static class SmelteryInput
{
public final Item input;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/tconstruct/smeltery/blocks/LavaTankBlock.java
Expand Up @@ -93,11 +93,8 @@ public boolean renderAsNormalBlock ()
@Override
public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side)
{
// if (side == 0 && world.getBlockMetadata(x, y, z) == 0)
// return super.shouldSideBeRendered(world, x, y, z, side);
Block bID = world.getBlock(x, y, z);
return bID == this ? false : super.shouldSideBeRendered(world, x, y, z, side);
// return true;
}

@Override
Expand Down

0 comments on commit 9070c73

Please sign in to comment.