package common.block.artificial;

import common.color.DyeColor;
import common.model.BlockLayer;
import common.model.Model;
import common.model.ModelProvider;
import common.world.State;

public class BlockStainedGlass extends BlockGlass {
	public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[DyeColor.values().length];
	
	private final DyeColor color;
    
    public static BlockStainedGlass getByColor(DyeColor color) {
    	return GLASS[color.getMetadata()];
    }

	public BlockStainedGlass(DyeColor color) {
		this.color = color;
		GLASS[color.ordinal()] = this;
	}
	
	public DyeColor getColor() {
		return this.color;
	}

	public BlockLayer getBlockLayer() {
		return BlockLayer.TRANSLUCENT;
	}

	public Model getModel(ModelProvider provider, String name, State state) {
		return provider.getModel(this.color.getName() + "_glass").add().all();
	}
}
