package projectzombie.items;

import gl_engine.vec.Vec2d;
import gl_engine.vec.Vec2i;
import gl_engine.vec.Vec3d;
import projectzombie.entity.EntityGrapplingHook;
import projectzombie.entity.player.EntityPlayer;
import projectzombie.init.Models;
import projectzombie.items.modifier.ItemModifier;
import projectzombie.items.modifier.ItemModifierMeta;
import projectzombie.model.ModelItem;
import projectzombie.util.ItemStack;
import projectzombie.world.chunk.Chunk;
import projectzombie.world.layer.Layer;

public class ItemGrapplingHook extends Item
{

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