codechicken.lib.colour.ColourARGB Java Examples
The following examples show how to use
codechicken.lib.colour.ColourARGB.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FacadeRenderer.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
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; }
Example #2
Source File: GuiWirelessSniffer.java From WirelessRedstone with MIT License | 6 votes |
public static void loadColours(ConfigTag addonconfig) { ConfigTag snifferconifg = addonconfig.getTag("sniffer.gui").useBraces(); ConfigTag colourconfig = snifferconifg.getTag("colour").setPosition(0).setComment("Colours are in 0xAARRGGBB format:Alpha should be FF"); ConfigTag borderconfig = snifferconifg.getTag("border").setPosition(1).setNewLine(true); colourOn = new ColourARGB(colourconfig.getTag("on").setPosition(0).setComment("").getHexValue(0xffFF0000)); colourOff = new ColourARGB(colourconfig.getTag("off").setPosition(1).getHexValue(0xff700000)); colourJammed = new ColourARGB(colourconfig.getTag("jammed").setPosition(2).getHexValue(0xff707070)); colourPOn = new ColourARGB(colourconfig.getTag("private.on").setPosition(0).getHexValue(0xff40F000)); colourPOff = new ColourARGB(colourconfig.getTag("private.off").setPosition(1).getHexValue(0xff40A000)); borderOn = new ColourARGB(borderconfig.getTag("on").setPosition(0).getHexValue(0xffEE0000)); borderOff = new ColourARGB(borderconfig.getTag("off").setPosition(1).getHexValue(0xff500000)); borderJammed = new ColourARGB(borderconfig.getTag("jammed").setPosition(2).getHexValue(0xff505050)); borderPOn = new ColourARGB(borderconfig.getTag("private.on").setPosition(0).getHexValue(0xff20E000)); borderPOff = new ColourARGB(borderconfig.getTag("private.off").setPosition(1).getHexValue(0xff209000)); }
Example #3
Source File: GuiWirelessSniffer.java From WirelessRedstone with MIT License | 5 votes |
public Colour getBorder(int freq) { if(RedstoneEther.get(true).isPlayerJammed(mc.thePlayer) || !RedstoneEther.get(true).canBroadcastOnFrequency(mc.thePlayer, freq)) { return borderJammed; } else if(RedstoneEther.get(true).getFreqColourId(freq) != -1) { return new ColourARGB(RedstoneEther.get(true).getFreqColour(freq)); } else { return borderOff.copy().interpolate(borderOn, brightness[freq-1] / 64F); } }
Example #4
Source File: TriangTexManager.java From WirelessRedstone with MIT License | 5 votes |
private static void processTexture(int freq, int iconindex) { int colour = freq <= 0 ? 0xFFFFFFFF : RedstoneEther.get(true).getFreqColour(freq); mergeTexturesWithColour(new ColourARGB(colour)); if(freq > 0) writePointer(freq); textures[iconindex].setData(imageData); }
Example #5
Source File: TriangTexManager.java From WirelessRedstone with MIT License | 5 votes |
private static void mergeTexturesWithColour(ColourARGB texcolour) { for(int i = 0; i < 256; i++) { Colour colour; if(texGrad[i].a == 0) colour = texRing[i]; else colour = texGrad[i].copy().multiply(texcolour); imageData[i] = colour.argb(); } }
Example #6
Source File: GuiButtonArrow.java From WirelessRedstone with MIT License | 5 votes |
private void drawArrow(int x, int y, int colour) { CCRenderState.changeTexture("wrcbe_core:textures/gui/arrow.png"); new ColourARGB(colour).glColour(); Tessellator t = Tessellator.instance; t.startDrawingQuads(); t.addVertexWithUV(x + 0, y + 8, zLevel, arrowdirection * 0.25, 1); t.addVertexWithUV(x + 8, y + 8, zLevel, (arrowdirection + 1) * 0.25, 1); t.addVertexWithUV(x + 8, y + 0, zLevel, (arrowdirection + 1) * 0.25, 0); t.addVertexWithUV(x + 0, y + 0, zLevel, arrowdirection * 0.25, 0); t.draw(); }
Example #7
Source File: TextureUtils.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
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; }
Example #8
Source File: RemoteTexManager.java From WirelessRedstone with MIT License | 4 votes |
private static void processTexture(int colour, boolean on, int i) { mergeTexturesWithColour(new ColourARGB(colour), on); icons[i].addTexture(new TextureDataHolder(imageData, 16).copyData()); }