Added BC API to repo

This commit is contained in:
Brian Ricketts 2013-03-02 00:25:07 -06:00
parent 0c93388b73
commit fcd46b3804
2 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View file

@ -16,6 +16,7 @@ CHANGELOG
!/src/minecraft/universalelectricity/
!/src/minecraft/dan200
!/src/minecraft/ic2
!/src/minecraft/buildcraft
!/resources/
!/models/
!info.txt

View file

@ -0,0 +1,32 @@
package buildcraft.api.tools;
import net.minecraft.entity.player.EntityPlayer;
/***
* Implement this interface on subclasses of Item to have that item work as a wrench for buildcraft
*/
public interface IToolWrench {
/***
* Called to ensure that the wrench can be used. To get the ItemStack that is used, check player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates for the block being wrenched
*
* @return true if wrenching is allowed, false if not
*/
public boolean canWrench(EntityPlayer player, int x, int y, int z);
/***
* Callback after the wrench has been used. This can be used to decrease durability or for other purposes. To get the ItemStack that was used, check
* player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates of the block being wrenched
*/
public void wrenchUsed(EntityPlayer player, int x, int y, int z);
}