/*
 * ******************************************************************************
 *  Copyright 2011-2015 CovertJaguar
 *
 *  This work (the API) is licensed under the "MIT" License, see LICENSE.md for details.
 * ***************************************************************************
 */
package mods.railcraft.api.core.items;

import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;

/**
 *
 * @author CovertJaguar <http://www.railcraft.info>
 */
public interface IToolCrowbar {

    /**
     * Controls non-rotational interactions with blocks. Crowbar specific stuff.
     *
     * Rotational interaction is handled by the Block.rotateBlock() function,
     * which should be called from the Item.onUseFirst() function of your tool.
     *
     * @param player
     * @param crowbar
     * @param x
     * @param y
     * @param z
     * @return
     */
    public boolean canWhack(EntityPlayer player, ItemStack crowbar, int x, int y, int z);

    /**
     * Callback to do damage to the item.
     *
     * @param player
     * @param crowbar
     * @param x
     * @param y
     * @param z
     */
    public void onWhack(EntityPlayer player, ItemStack crowbar, int x, int y, int z);

    /**
     * Controls whether you can link a cart.
     *
     * @param player
     * @param crowbar
     * @param cart
     * @return
     */
    public boolean canLink(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Callback to do damage.
     *
     * @param player
     * @param crowbar
     * @param cart
     */
    public void onLink(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Controls whether you can boost a cart.
     *
     * @param player
     * @param crowbar
     * @param cart
     * @return
     */
    public boolean canBoost(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Callback to do damage, boosting a cart usually does more damage than
     * normal usage.
     *
     * @param player
     * @param crowbar
     * @param cart
     */
    public void onBoost(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);
}

/*
 * ******************************************************************************
 *  Copyright 2011-2015 CovertJaguar
 *
 *  This work (the API) is licensed under the "MIT" License, see LICENSE.md for details.
 * ***************************************************************************
 */
package mods.railcraft.api.core.items;

import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;

/**
 * @author CovertJaguar <http://www.railcraft.info>
 */
public interface IToolCrowbar {

    /**
     * Controls non-rotational interactions with blocks. Crowbar specific stuff.
     * <p/>
     * Rotational interaction is handled by the Block.rotateBlock() function,
     * which should be called from the Item.onUseFirst() function of your tool.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param pos     the block
     * @return true if can whack a block
     */
    boolean canWhack(EntityPlayer player, ItemStack crowbar, BlockPos pos);

    /**
     * Callback to do damage to the item.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param pos     the block
     */
    void onWhack(EntityPlayer player, ItemStack crowbar, BlockPos pos);

    /**
     * Controls whether you can link a cart.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param cart    the cart
     * @return true if can link a cart
     */
    boolean canLink(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Callback to do damage.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param cart    the cart
     */
    void onLink(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Controls whether you can boost a cart.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param cart    the cart
     * @return true if can boost a cart
     */
    boolean canBoost(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);

    /**
     * Callback to do damage, boosting a cart usually does more damage than
     * normal usage.
     *
     * @param player  the player
     * @param crowbar the crowbar
     * @param cart    the cart
     */
    void onBoost(EntityPlayer player, ItemStack crowbar, EntityMinecart cart);
}

Update IToolCrowbar