Recipes.WorkbenchRecipe
Hierarchy
- Object
- WorkbenchRecipe
Index
Methods
- addToVanillaWorkbench
- getCallback
- getEntry
- getEntryCodes
- getEntryCollection
- getPrefix
- getRecipeMask
- getRecipeUid
- getResult
- getSortedEntries
- isMatchingField
- isMatchingPrefix
- isMatchingResult
- isPossibleForInventory
- isValid
- isVanilla
- provideRecipe
- provideRecipeForPlayer
- putIntoTheField
- setCallback
- setEntries
- setPrefix
- setVanilla
Methods
addToVanillaWorkbench
Returns void
getCallback
Returns CraftingFunction
Current crafting function or null if no one was specified.
getEntry
Parameters
c: string
recipe entry character
Returns RecipeEntry
Recipe entry by entry character.
getEntryCodes
getEntryCollection
Returns Collection<RecipeEntry>
getPrefix
Returns string
Recipe prefix.
getRecipeMask
Returns string
Recipe unique mask identifier.
getRecipeUid
Returns number
getResult
Returns ItemInstance
Resulting item instance.
getSortedEntries
Returns Array<RecipeEntry>
All recipe's entries in a java array.
isMatchingField
Parameters
field: WorkbenchField
workbench field to compare with
Returns boolean
trueif the field contains this recipe, false` otherwise.
isMatchingPrefix
Compares current recipe's prefix with given one.
Parameters
prefix: string
prefix value to compare with
Returns boolean
true, if current recipe's prefix is the same as given one,falseotherwise.
isMatchingResult
Parameters
id: number
count: number
data: number
Returns boolean
trueif specified item is recipe's result,falseotherwise.
isPossibleForInventory
isValid
Returns boolean
true, if the recipe is valid,falseotherwise.
isVanilla
Returns boolean
provideRecipe
Parameters
field: WorkbenchField
Returns ItemInstance
provideRecipeForPlayer
Parameters
field: WorkbenchField
player: number
Returns ItemInstance
putIntoTheField
Tries to fill workbench field with current recipe.
Parameters
field: WorkbenchField
workbench field to fill
Returns void
setCallback
Sets craft function for the recipe.
Parameters
callback: CraftingFunction
function to be called on item craft
Returns void
setEntries
Parameters
entries: HashMap<Character, RecipeEntry>
Returns void
setPrefix
Sets prefix value for the recipe.
Parameters
prefix: string
new prefix value
Returns void
setVanilla
Parameters
isVanilla: boolean
Returns WorkbenchRecipe
Reference to itself to be used in sequential calls.
Object representing workbench recipe.