package client.renderer.texture;

import java.awt.image.BufferedImage;

import client.util.FileUtils;
import common.color.Colorizer;

public abstract class ColormapLoader {
	private static final String GRASS_TEX = "textures/world/grass.png";
	private static final String FOLIAGE_TEX = "textures/world/foliage.png";
	
	public static void reload() {
		BufferedImage img;
		try {
			img = TextureUtil.readImage(FileUtils.getResource(GRASS_TEX));
			img.getRGB(0, 0, 256, 256, Colorizer.getGrassMap(), 0, 256);
		}
		catch(Exception e) {
		}
		try {
			img = TextureUtil.readImage(FileUtils.getResource(FOLIAGE_TEX));
			img.getRGB(0, 0, 256, 256, Colorizer.getFoliageMap(), 0, 256);
		}
		catch(Exception e) {
		}
	}
}
