mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 21:54:44 +00:00
Create IRecipeEvent.java
This commit is contained in:
1 parent
b60245f21a
commit
bd03e27c47
1 file changed
+60
@@ -0,0 +1,60 @@
|
||||
package noppes.npcs.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
public interface IRecipeEvent extends IPlayerEvent {
|
||||
|
||||
/**
|
||||
* Returns the recipe object associated with this event.
|
||||
* This can be a custom recipe or an anvil recipe.
|
||||
*
|
||||
* @return the recipe object - IRecipe or IAnvilRecipe
|
||||
*/
|
||||
Object getRecipe();
|
||||
|
||||
IItemStack[] getItems();
|
||||
|
||||
boolean isAnvil();
|
||||
|
||||
@Cancelable
|
||||
interface Pre extends IRecipeEvent {
|
||||
void setMessage(String message);
|
||||
|
||||
String getMessage();
|
||||
|
||||
/**
|
||||
* Only for IAnvilRecipe
|
||||
*
|
||||
* @return the XP Cost of Anvil Recipe
|
||||
*/
|
||||
int getXpCost();
|
||||
|
||||
/**
|
||||
* Sets the XP Cost of Anvil Recipe
|
||||
*
|
||||
* @param xpCost the XP Cost to set
|
||||
*/
|
||||
void setXpCost(int xpCost);
|
||||
|
||||
/**
|
||||
* Only for IAnvilRecipe
|
||||
*
|
||||
* @return the material usage of Anvil Recipe
|
||||
*/
|
||||
int getMaterialUsage();
|
||||
|
||||
/**
|
||||
* Sets the material usage of Anvil Recipe
|
||||
*
|
||||
* @param materialUsage the material usage to set
|
||||
*/
|
||||
void setMaterialUsage(int materialUsage);
|
||||
}
|
||||
|
||||
interface Post extends IRecipeEvent {
|
||||
IItemStack getCraft();
|
||||
|
||||
void setResult(IItemStack stack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user