mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 11:05:07 +00:00
Improve javadocs for handler and catalyst APIs
This commit is contained in:
1 parent
3a0892f9db
commit
cfe35b0bef
3 files changed
+15
-8
No files matched your search
@@ -346,7 +346,7 @@ public class API {
|
||||
* category.
|
||||
*
|
||||
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
|
||||
* @param handler the recipe category handled by the ingredient
|
||||
* @param handler the handler that shows the ingredient's recipes
|
||||
* @param priority higher priority comes first, default to 0
|
||||
*/
|
||||
public static void addRecipeCatalyst(ItemStack stack, IRecipeHandler handler, int priority) {
|
||||
@@ -366,9 +366,10 @@ public class API {
|
||||
* Recipes) Allows players to see what ingredient they need to craft in order to make recipes from a recipe
|
||||
* category.
|
||||
*
|
||||
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
|
||||
* @param handlerID recipe category identifier (see also {@link RecipeCatalysts#getRecipeID(IRecipeHandler)})
|
||||
* @param priority higher priority comes first, default to 0
|
||||
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
|
||||
* @param catalystHandlerID catalyst handler identifier (see
|
||||
* {@link RecipeCatalysts#getCatalystHandlerId(IRecipeHandler)})
|
||||
* @param priority higher priority comes first, default to 0
|
||||
*/
|
||||
public static void addRecipeCatalyst(ItemStack stack, String catalystHandlerID, int priority) {
|
||||
RecipeCatalysts.addRecipeCatalyst(catalystHandlerID, new CatalystInfo(stack, priority));
|
||||
|
||||
@@ -11,7 +11,7 @@ import codechicken.nei.recipe.IRecipeHandler;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* Event is posted every time the handler infos got registered or reloaded. During it, you can safely register your
|
||||
* Event is posted every time the handler infos get registered or reloaded. During it, you can safely register your
|
||||
* custom handler info.
|
||||
*
|
||||
* <br>
|
||||
@@ -21,9 +21,15 @@ import cpw.mods.fml.common.eventhandler.Event;
|
||||
*/
|
||||
public class NEIRegisterHandlerInfosEvent extends Event {
|
||||
|
||||
public void registerHandlerInfo(String handlerName, String modName, String modId,
|
||||
/**
|
||||
* @param handlerID handler identifier as returned by {@link IRecipeHandler#getHandlerId}
|
||||
* @param modName display name of the mod to which the recipe handler belongs
|
||||
* @param modId modId of the mod for which the recipe handler is responsible
|
||||
* @param builder
|
||||
*/
|
||||
public void registerHandlerInfo(String handlerID, String modName, String modId,
|
||||
Consumer<HandlerInfo.Builder> builder) {
|
||||
HandlerInfo.Builder b = new HandlerInfo.Builder(handlerName, modName, modId);
|
||||
HandlerInfo.Builder b = new HandlerInfo.Builder(handlerID, modName, modId);
|
||||
builder.accept(b);
|
||||
HandlerInfo info = b.build();
|
||||
if (GuiRecipeTab.handlerMap.put(info.getHandlerName(), info) != null) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface IRecipeHandler {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return The name of this inventory. To be displayed at the top of the viewing container.
|
||||
* @return The display name of this handler. To be displayed at the top of the viewing container.
|
||||
*/
|
||||
String getRecipeName();
|
||||
|
||||
|
||||
Reference in new issue
Block a user