package client.renderer.entity;

import client.renderer.model.ModelBase;
import common.entity.animal.EntityRabbit;
import common.util.Color;


public class RenderRabbit extends RenderLiving<EntityRabbit> {
	private static final String[] TYPES = new String[] {
			"textures/creature/rabbit_brown.png",
			"textures/creature/rabbit_white.png",
			"textures/creature/rabbit_black.png",
			"textures/creature/rabbit_white_splotched.png",
			"textures/creature/rabbit_gold.png",
			"textures/creature/rabbit_salt.png",
			"textures/creature/rabbit_gray.png",
			"textures/creature/rabbit_dark_gray.png",
			"textures/creature/rabbit_dark.png",
			"textures/creature/rabbit_black_splotched.png"
	};
	private static final String HALF = "textures/creature/rabbit_half.png";
	private static final String EVIL = "textures/creature/rabbit_evil.png";

	public RenderRabbit(RenderManager manager, ModelBase model) {
		super(manager, model);
	}

	protected String getEntityTexture(EntityRabbit entity) {
		String name = Color.stripCodes(entity.getCustomNameTag());
		if("Lola".equalsIgnoreCase(name) || "Lolo".equalsIgnoreCase(name))
			return HALF;
		int type = entity.getRabbitType();
		if(type == 99)
			return EVIL;
		return type >= 0 && type < TYPES.length ? TYPES[type] : HALF;
	}
}
