package common.dimension;

import java.util.Map;

import common.collect.Maps;

public enum CloudType {
	NORMAL("normal", "clouds"), 
	DENSE("dense", "clouds_dense");
	
	private static final Map<String, CloudType> LOOKUP = Maps.newHashMap();

	private final String name;
	private final String texture;
	
	private CloudType(String name, String texture) {
		this.name = name;
		this.texture = texture;
	}

	public String toString() {
		return this.name;
	}
	
	public String getTexture() {
		return this.texture;
	}

	public static CloudType getByName(String name) {
		CloudType type = LOOKUP.get(name.toLowerCase());
		return type == null ? NORMAL : type;
	}
	
	static {
		for(CloudType type : values()) {
			LOOKUP.put(type.name, type);
		}
	}
}