package common.block.natural;

import java.util.Map;

import common.model.Model;
import common.model.ModelProvider;
import common.model.TextureAnimation;
import common.util.BlockPos;
import common.world.IWorldAccess;
import common.world.State;

public class BlockTintedFire extends BlockFire {
	private final int tint;

	public BlockTintedFire(int tint) {
		this.tint = tint;
	}

	public int getRenderColor(State state) {
		return this.tint;
	}

	public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) {
		return this.tint;
	}

    public Model getModel(ModelProvider provider, String name, State state) {
    	return getFireModel(state.getValue(ALT) ? "flame_layer_1" : "flame_layer_0", state.getValue(FLIP), state.getValue(UPPER), 
    			state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST));
    }
    
    public void getAnimatedTextures(Map<String, Object> map) {
    	map.put("flame_layer_0", TextureAnimation.FLAME1);
    	map.put("flame_layer_1", TextureAnimation.FLAME2);
    }
}
