package info.u_team.u_team_core.util;

import com.google.common.collect.*;

import net.minecraft.block.*;
import net.minecraft.item.DyeColor;

public class ColorUtil {
	
	private static final BiMap<Block, DyeColor> WOOL_DYE_COLORS = HashBiMap.create();
	
	public static final int WHITE_RGBA = 0xFFFFFFFF;
	public static final int WHITE_RGB = 0xFFFFFF;
	
	static {
		WOOL_DYE_COLORS.put(Blocks.WHITE_WOOL, DyeColor.WHITE);
		WOOL_DYE_COLORS.put(Blocks.ORANGE_WOOL, DyeColor.ORANGE);
		WOOL_DYE_COLORS.put(Blocks.MAGENTA_WOOL, DyeColor.MAGENTA);
		WOOL_DYE_COLORS.put(Blocks.LIGHT_BLUE_WOOL, DyeColor.LIGHT_BLUE);
		WOOL_DYE_COLORS.put(Blocks.YELLOW_WOOL, DyeColor.YELLOW);
		WOOL_DYE_COLORS.put(Blocks.LIME_WOOL, DyeColor.LIME);
		WOOL_DYE_COLORS.put(Blocks.PINK_WOOL, DyeColor.PINK);
		WOOL_DYE_COLORS.put(Blocks.GRAY_WOOL, DyeColor.GRAY);
		WOOL_DYE_COLORS.put(Blocks.LIGHT_GRAY_WOOL, DyeColor.LIGHT_GRAY);
		WOOL_DYE_COLORS.put(Blocks.CYAN_WOOL, DyeColor.CYAN);
		WOOL_DYE_COLORS.put(Blocks.PURPLE_WOOL, DyeColor.PURPLE);
		WOOL_DYE_COLORS.put(Blocks.BLUE_WOOL, DyeColor.BLUE);
		WOOL_DYE_COLORS.put(Blocks.BROWN_WOOL, DyeColor.BROWN);
		WOOL_DYE_COLORS.put(Blocks.GREEN_WOOL, DyeColor.GREEN);
		WOOL_DYE_COLORS.put(Blocks.RED_WOOL, DyeColor.RED);
		WOOL_DYE_COLORS.put(Blocks.BLACK_WOOL, DyeColor.BLACK);
	}
	
	public static Block getWoolFromColor(DyeColor color) {
		return WOOL_DYE_COLORS.inverse().get(color);
	}
	
	public static DyeColor getColorFromWool(Block block) {
		return WOOL_DYE_COLORS.get(block);
	}
	
}

@@ -125,24 +125,17 @@
 ft.item.
-DyeColor
+*
 ;%0A%0Apubli
@@ -1399,32 +1399,148 @@
 et(color);%0A%09%7D%0A%09%0A
+%09public static DyeColor getColorFromWool(Item item) %7B%0A%09%09return getColorFromWool(Block.getBlockFromItem(item));%0A%09%7D%0A%09%0A
 %09public static D
@@ -1619,12 +1619,10 @@
 ck);%0A%09%7D%0A
-%09%0A
 %7D%0A

Add utility method to get color from item