package common.item;

import common.block.Block;
import common.init.Blocks;
import common.model.Model;
import common.model.ModelProvider;

public class ItemPiston extends ItemBlock
{
    public ItemPiston(Block block)
    {
        super(block);
    }

    /**
     * Converts the given ItemStack damage value into a metadata value to be placed in the world when this Item is
     * placed as a Block (mostly used with ItemBlocks).
     */
    public int getMetadata(int damage)
    {
        return 7;
    }
    
    public boolean isMagnetic() {
    	return true;
    }
    
    public Model getModel(ModelProvider provider, String name, int meta) {
    	return provider.getModel(provider.getModel("piston_side").add().nswe().d("piston_bottom").u("piston_top" + (this.block == 
    			Blocks.sticky_piston ? "_sticky" : "")), this.getTransform());
    }
}
