Merge pull request #2325 from ganymedes01/6.3.x

Fix facades of coloured blocks not using the blocks colour
This commit is contained in:
Adrian Siekierka 2014-12-21 13:44:21 +01:00
commit 1a691ed5c4
2 changed files with 3 additions and 12 deletions

View file

@ -146,13 +146,6 @@ public class FacadeItemRenderer implements IItemRenderer {
Block block = activeState != null ? activeState.block : null;
int decodedMeta = activeState != null ? activeState.metadata : 0;
boolean hollow = activeState != null ? activeState.hollow : false;
ItemStack decodedStack = new ItemStack(block, 1, decodedMeta);
try {
int color = decodedStack.getItem().getColorFromItemStack(decodedStack, 0);
RenderUtils.setGLColorFromInt(color);
} catch (Throwable error) {
}
Tessellator tessellator = Tessellator.instance;
@ -170,6 +163,7 @@ public class FacadeItemRenderer implements IItemRenderer {
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
}
RenderUtils.setGLColorFromInt(block.getRenderColor(decodedMeta));
if (hollow) {
GL11.glTranslatef(translateX, translateY, translateZ);
drawHollowCube(tessellator, render, block, decodedMeta);

View file

@ -130,11 +130,6 @@ public final class FacadeRenderHelper {
}
}
try {
BlockGenericPipe.facadeRenderColor = Item.getItemFromBlock(pluggable.getRenderingBlock()).getColorFromItemStack(new ItemStack(renderBlock, 1, renderMeta), 0);
} catch (Throwable error) {
}
if (renderBlock.getRenderType() == 31) {
if ((renderMeta & 12) == 4) {
renderblocks.uvRotateEast = 1;
@ -147,6 +142,7 @@ public final class FacadeRenderHelper {
}
}
BlockGenericPipe.facadeRenderColor = renderBlock.getRenderColor(renderMeta);
// Hollow facade
if (pluggable.isHollow()) {
renderblocks.field_152631_f = true;
@ -187,6 +183,7 @@ public final class FacadeRenderHelper {
setRenderBounds(renderblocks, rotated, direction);
renderblocks.renderStandardBlock(blockStateMachine.getBlock(), x, y, z);
}
BlockGenericPipe.facadeRenderColor = -1;
if (renderBlock.getRenderType() == 31) {
renderblocks.uvRotateSouth = 0;