Class ActionAddRecipe<T extends net.minecraft.world.item.crafting.Recipe<?>>
java.lang.Object
com.blamejared.crafttweaker.api.action.internal.CraftTweakerAction
com.blamejared.crafttweaker.api.action.recipe.ActionRecipeBase<T>
com.blamejared.crafttweaker.api.action.recipe.ActionAddRecipe<T>
- All Implemented Interfaces:
IAction,IRuntimeAction
public class ActionAddRecipe<T extends net.minecraft.world.item.crafting.Recipe<?>>
extends ActionRecipeBase<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActionAddRecipe(IRecipeManager<T> recipeManager, net.minecraft.world.item.crafting.RecipeHolder<T> holder) ActionAddRecipe(IRecipeManager<T> recipeManager, net.minecraft.world.item.crafting.RecipeHolder<T> holder, String subType) -
Method Summary
Methods inherited from class com.blamejared.crafttweaker.api.action.recipe.ActionRecipeBase
getManager, getRecipeMutator, getRecipeType, getRecipeTypeNameMethods inherited from class com.blamejared.crafttweaker.api.action.internal.CraftTweakerAction
systemNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.action.base.IAction
assertLoader, getDeclaredScriptPosition, logger, shouldApplyOn, systemName, validate
-
Field Details
-
holder
protected final net.minecraft.world.item.crafting.RecipeHolder<T extends net.minecraft.world.item.crafting.Recipe<?>> holder
-
-
Constructor Details
-
ActionAddRecipe
public ActionAddRecipe(IRecipeManager<T> recipeManager, net.minecraft.world.item.crafting.RecipeHolder<T> holder, String subType) -
ActionAddRecipe
public ActionAddRecipe(IRecipeManager<T> recipeManager, net.minecraft.world.item.crafting.RecipeHolder<T> holder)
-
-
Method Details
-
apply
public void apply()Description copied from interface:IActionApplies the action, executing all code necessary. -
describe
Description copied from interface:IActionGets a human-readable description of the action.This message is used for logging and to surface information to the user when something goes wrong. It is thus customary to describe the action as accurately as possible without being too verbose.
It is not allowed to return a
nullor otherwise empty description for the action: doing so will raise an error at runtime.- Returns:
- A description of the current action.
-
outputDescriber
public ActionAddRecipe<T> outputDescriber(Function<net.minecraft.world.item.crafting.RecipeHolder<T>, String> describeOutputsFunction)
-