package projectzombie.items;

import projectzombie.entity.EntityGrapplingHook;
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 ItemGrapplingHook extends Item
{

	@Override
	public ModelItem getModel(short meta) {
		return Models.ITEM_GRAPPLING_HOOK;
	}
	
	@Override
	public String getName(short meta) {
		return "Grappling Hook";
	}
	
	@Override
	public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
		layer.spawnEntity(new EntityGrapplingHook(player.getPos(), stack.meta, player));
		stack.count -= 1;
		return true;
	}
	
}
