use of codechicken.lib.colour.Colour in project Galacticraft by micdoodle8.
the class TextureUtils method loadTextureColours.
public static Colour[] loadTextureColours(ResourceLocation resource) {
int[] idata = loadTextureData(resource);
Colour[] data = new Colour[idata.length];
for (int i = 0; i < data.length; i++) {
data[i] = new ColourARGB(idata[i]);
}
return data;
}
use of codechicken.lib.colour.Colour in project GregTech by GregTechCE.
the class FacadeRenderer method applyItemTint.
public static List<CCQuad> applyItemTint(List<CCQuad> quads, ItemStack stack) {
List<CCQuad> retQuads = new LinkedList<>();
for (CCQuad quad : quads) {
int colour = -1;
if (quad.hasTint()) {
colour = Minecraft.getMinecraft().getItemColors().colorMultiplier(stack, quad.tintIndex);
if (EntityRenderer.anaglyphEnable) {
colour = TextureUtil.anaglyphColor(colour);
}
colour = colour | 0xFF000000;
}
CCQuad copyQuad = quad.copy();
Colour c = new ColourARGB(colour);
for (Colour qC : copyQuad.colours) {
qC.multiply(c);
}
retQuads.add(copyQuad);
}
return retQuads;
}
Aggregations