Skip to main content

Recipes.WorkbenchShapedRecipe

Object representing workbench shaped recipe.

Hierarchy

Index

Methods

addToVanillaWorkbench

  • addToVanillaWorkbench(): void
  • Returns void

addVariants

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

  • Returns ArrayList<Long>

getEntryCollection

getPrefix

  • getPrefix(): string
  • Returns string

    Recipe prefix.

getRecipeMask

  • getRecipeMask(): string
  • Returns string

    Recipe unique mask identifier.

getRecipeUid

  • getRecipeUid(): number
  • Returns number

getResult

  • Returns ItemInstance

    Resulting item instance.

getSortedEntries

  • Returns Array<RecipeEntry>

    All recipe's entries in a java array.

isMatchingField

  • Parameters

    Returns boolean

    true if the field contains this recipe, false` otherwise.

isMatchingPrefix

  • isMatchingPrefix(prefix: string): boolean
  • 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, false otherwise.

isMatchingResult

  • isMatchingResult(id: number, count: number, data: number): boolean
  • Parameters

    • id: number
    • count: number
    • data: number

    Returns boolean

    true if specified item is recipe's result, false otherwise.

isPossibleForInventory

  • Parameters

    Returns boolean

isValid

  • isValid(): boolean
  • Returns boolean

    true, if the recipe is valid, false otherwise.

isVanilla

  • isVanilla(): boolean
  • Returns boolean

provideRecipe

provideRecipeForPlayer

putIntoTheField

  • Tries to fill workbench field with current recipe.


    Parameters

    Returns void

setCallback

  • Sets craft function for the recipe.


    Parameters

    Returns void

setEntries

setPattern

  • setPattern(pattern: string[]): void
  • setPattern(pattern: RecipeEntry[][]): void
  • Parameters

    • pattern: string[]

    Returns void

setPrefix

  • setPrefix(prefix: string): void
  • 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.