mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-16 08:24:47 +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
@@ -6,20 +6,67 @@ import noppes.npcs.api.handler.data.IRecipe;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Handles custom crafting recipes and anvil recipes.
|
||||
*/
|
||||
public interface IRecipeHandler {
|
||||
|
||||
/** @return all global (vanilla workbench) recipes. */
|
||||
List<IRecipe> getGlobalList();
|
||||
|
||||
/** @return all carpentry table recipes. */
|
||||
List<IRecipe> getCarpentryList();
|
||||
|
||||
/** @return all custom anvil recipes. */
|
||||
List<IAnvilRecipe> getAnvilList();
|
||||
|
||||
void addRecipe(String var1, boolean var2, ItemStack var3, Object... var4);
|
||||
/**
|
||||
* Adds a shaped crafting recipe.
|
||||
*
|
||||
* @param name the recipe name.
|
||||
* @param global true for global (vanilla workbench); false for carpentry.
|
||||
* @param result the resulting item stack.
|
||||
* @param recipe the recipe pattern and ingredient mappings.
|
||||
*/
|
||||
void addRecipe(String name, boolean global, ItemStack result, Object... recipe);
|
||||
|
||||
void addRecipe(String var1, boolean var2, ItemStack var3, int var4, int var5, ItemStack... var6);
|
||||
/**
|
||||
* Adds a shaped crafting recipe with explicit dimensions.
|
||||
*
|
||||
* @param name the recipe name.
|
||||
* @param global true for global; false for carpentry.
|
||||
* @param result the resulting item stack.
|
||||
* @param width the recipe grid width.
|
||||
* @param height the recipe grid height.
|
||||
* @param items the ingredient item stacks.
|
||||
*/
|
||||
void addRecipe(String name, boolean global, ItemStack result, int width, int height, ItemStack... items);
|
||||
|
||||
IRecipe delete(int var1);
|
||||
/**
|
||||
* Deletes a crafting recipe by ID.
|
||||
*
|
||||
* @param id the recipe ID.
|
||||
* @return the deleted recipe, or null if not found.
|
||||
*/
|
||||
IRecipe delete(int id);
|
||||
|
||||
IAnvilRecipe deleteAnvil(int var1);
|
||||
/**
|
||||
* Deletes an anvil recipe by ID.
|
||||
*
|
||||
* @param id the recipe ID.
|
||||
* @return the deleted anvil recipe, or null if not found.
|
||||
*/
|
||||
IAnvilRecipe deleteAnvil(int id);
|
||||
|
||||
/**
|
||||
* Adds a custom anvil recipe.
|
||||
*
|
||||
* @param name the recipe name.
|
||||
* @param global true for global; false for carpentry.
|
||||
* @param itemToRepair the item to be repaired.
|
||||
* @param repairMaterial the material used for repair.
|
||||
* @param xpCost the experience cost.
|
||||
* @param repairPercentage the percentage of durability restored per material.
|
||||
*/
|
||||
void addAnvilRecipe(String name, boolean global, ItemStack itemToRepair, ItemStack repairMaterial, int xpCost, float repairPercentage);
|
||||
}
|
||||
Reference in new issue
Block a user