package client.renderer.entity;

import client.renderer.model.ModelBase;
import common.color.TextColor;
import common.entity.animal.EntityRabbit;


public class RenderRabbit extends RenderLiving<EntityRabbit> {
	private static final String[] TYPES = new String[] {
			"textures/entity/rabbit_brown.png",
			"textures/entity/rabbit_white.png",
			"textures/entity/rabbit_black.png",
			"textures/entity/rabbit_white_splotched.png",
			"textures/entity/rabbit_gold.png",
			"textures/entity/rabbit_salt.png",
			"textures/entity/rabbit_gray.png",
			"textures/entity/rabbit_dark_gray.png",
			"textures/entity/rabbit_dark.png",
			"textures/entity/rabbit_black_splotched.png"
	};
	private static final String TOAST = "textures/entity/rabbit_toast.png";
	private static final String CAERBANNOG = "textures/entity/rabbit_caerbannog.png";

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

	protected String getEntityTexture(EntityRabbit entity) {
		String name = TextColor.stripCodes(entity.getCustomNameTag());
		if(name != null && name.equals("Toast"))
			return TOAST;
		int type = entity.getRabbitType();
		if(type == 99)
			return CAERBANNOG;
		return type >= 0 && type < TYPES.length ? TYPES[type] : TOAST;
	}
}
