mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 03:59:37 +00:00
Added IToolHammer support
This commit is contained in:
1 parent
ec5793dc4d
commit
db5c2c3d2c
2 files changed
+57
-4
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);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user