mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-17 19:15:13 +00:00
A lot of GOOD API DOCUMENTATION
This commit is contained in:
1 parent
a6c55ca331
commit
319e774518
131 files changed
+3363
-175
No files matched your search
@@ -3,6 +3,9 @@ package noppes.npcs.api.event;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
/**
|
||||
* Events fired before and after recipe crafting, for both crafting table and anvil recipes.
|
||||
*/
|
||||
public interface IRecipeEvent extends IPlayerEvent {
|
||||
|
||||
/**
|
||||
@@ -13,14 +16,22 @@ public interface IRecipeEvent extends IPlayerEvent {
|
||||
*/
|
||||
Object getRecipe();
|
||||
|
||||
/** @return the input item stacks used in the recipe. */
|
||||
IItemStack[] getItems();
|
||||
|
||||
/** @return true if this is an anvil recipe, false for crafting table. */
|
||||
boolean isAnvil();
|
||||
|
||||
/**
|
||||
* Fired before a recipe is crafted. Cancelable.
|
||||
* @hookName recipeCraftPre
|
||||
*/
|
||||
@Cancelable
|
||||
interface Pre extends IRecipeEvent {
|
||||
/** @param message the denial message shown when canceled. */
|
||||
void setMessage(String message);
|
||||
|
||||
/** @return the denial message. */
|
||||
String getMessage();
|
||||
|
||||
/**
|
||||
@@ -52,9 +63,15 @@ public interface IRecipeEvent extends IPlayerEvent {
|
||||
void setMaterialUsage(int materialUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired after a recipe is crafted.
|
||||
* @hookName recipeCraftPost
|
||||
*/
|
||||
interface Post extends IRecipeEvent {
|
||||
/** @return the crafted item. */
|
||||
IItemStack getCraft();
|
||||
|
||||
/** @param stack the item to set as the crafting result. */
|
||||
void setResult(IItemStack stack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user