package projectzombie.items;

import projectzombie.entity.EntityFlare;
import projectzombie.entity.player.EntityPlayer;
import projectzombie.init.Models;
import projectzombie.model.ModelItem;
import projectzombie.util.math.ItemStack;
import projectzombie.world.chunk.Chunk;
import projectzombie.world.layer.Layer;

public class ItemFlare extends Item
{

	@Override
	public ModelItem getModel(short meta) {
		return Models.ITEM_FLARE;
	}
	
	@Override
	public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
		layer.spawnEntity(new EntityFlare(player.getPos(), player.getVelocity(), player.angle));
		stack.count -= 1;
		return true;
	}

	@Override
	public String getName(short meta) {
		return "Flare";
	}
	
}
