Here you can find the source of toByteColor(int i)
Parameter | Description |
---|---|
i | integer color |
public static byte toByteColor(int i)
//package com.java2s; /*// ww w. jav a 2s .com * AwA Minecraft's mod commons. * * (c) 2013 alalwww * https://github.com/alalwww * * This library is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. * Please check the contents of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt * * ????????????????Minecraft Mod Public License (MMPL) 1.0 ????????????????????????????????????? * ??????????????????????????????????????????? http://www.mod-buildcraft.com/MMPL-1.0.txt */ public class Main { /** * integer color to byte color. * * @param i * integer color * @return byte color */ public static byte toByteColor(int i) { return (byte) ((i >>> 0) & 0xFF); } }