Add IToolHammer to Yeta wrench so it can wrench TE machines.

This commit is contained in:
tterrag1098 committed 2014-10-04 18:49:45 -04:00
1 parent 59d7506e5f
commit 182fead64d
4 files changed
+83 -7

No files matched your search

@@ -0,0 +1,44 @@
package cofh.api.item;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
/**
* Implement this interface on subclasses of Item to have that item work as a tool for CoFH mods.
*/
public interface IToolHammer {
/**
* Called to ensure that the wrench can be used.
*
* @param item
* The itemstack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools)
* @param user
* The entity using the tool
* @param x
* X location of the block/tile
* @param y
* Y location of the block/tile
* @param z
* Z location of the block/tile
* @return True if this tool can be used
*/
boolean isUsable(ItemStack item, EntityLivingBase user, int x, int y, int z);
/**
* Callback for when the tool has been used reactively.
*
* @param item
* The ItemStack for the tool. Not required to match equipped item (e.g., multi-tools that contain other tools)
* @param user
* The entity using the tool
* @param x
* X location of the block/tile
* @param y
* Y location of the block/tile
* @param z
* Z location of the block/tile
*/
void toolUsed(ItemStack item, EntityLivingBase user, int x, int y, int z);
}