This commit is contained in:
asiekierka 2014-11-23 12:47:44 +01:00
parent c755af8ac1
commit 19ba9f3515
2 changed files with 8 additions and 1 deletions

View file

@ -14,6 +14,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.IItemRenderer;
@ -53,9 +54,10 @@ public class FacadeItemRenderer implements IItemRenderer {
}
Block block = activeState != null ? activeState.block : null;
int decodedMeta = activeState != null ? activeState.metadata : 0;
ItemStack decodedStack = new ItemStack(block, 1, decodedMeta);
try {
int color = item.getItem().getColorFromItemStack(new ItemStack(block, 1, decodedMeta), 0);
int color = decodedStack.getItem().getColorFromItemStack(decodedStack, 0);
RenderUtils.setGLColorFromInt(color);
} catch (Throwable error) {
}

View file

@ -17,6 +17,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.common.util.ForgeDirection;
import buildcraft.transport.BlockGenericPipe;
/*
@ -40,6 +41,10 @@ public final class FakeBlock extends Block implements ITextureStates {
@Override
public int colorMultiplier(IBlockAccess blockAccess, int x, int y, int z) {
// TODO: Move this somewhere else?
if (BlockGenericPipe.facadeRenderColor >= 0) {
return BlockGenericPipe.facadeRenderColor;
}
return colorMultiplier;
}