CRecipeImpl

open class CRecipeImpl @JvmOverloads constructor(val name: String, val items: Map<CoordinateComponent, CMatter>, val type: CRecipe.Type, val predicates: List<CRecipePredicate>? = null, val results: List<ResultSupplier>? = null) : CRecipe

A default CRecipe implementation class.

Parameters

name

A name of this recipe.

items

Elements of this recipe.

type

A type of this recipe. (Shaped or Shapeless)

predicates

Additional conditions evaluated during recipe matching. (default = null)

results

A ResultSupplier list. (default = null)

Constructors

Link copied to clipboard
constructor(name: String, items: Map<CoordinateComponent, CMatter>, type: CRecipe.Type, predicates: List<CRecipePredicate>? = null, results: List<ResultSupplier>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val items: Map<CoordinateComponent, CMatter>
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val predicates: List<CRecipePredicate>?
Link copied to clipboard
open override val results: List<ResultSupplier>?
Link copied to clipboard
open override val type: CRecipe.Type

Functions

Link copied to clipboard

Returns CRecipePredicate inspection result on async.

Link copied to clipboard

Returns results of suppliers made asynchronously.

Link copied to clipboard

Returns the first CRecipePredicate that rejects context, or null when all of them pass.

Link copied to clipboard
open fun getRecipePredicateResults(context: CRecipePredicate.Context, whenEmptyDefault: Boolean = true): Boolean

Returns CRecipePredicate inspection result

Link copied to clipboard

Returns results of suppliers made

Link copied to clipboard
open fun getTimes(map: Map<CoordinateComponent, ItemStack>, relation: MappedRelation, shift: Boolean, withoutMass: Boolean = true): Int

Returns the minimum craft count calculated from input item amounts and recipe requirements.

Link copied to clipboard
open fun isValidRecipe()

Validates this CRecipe.

Link copied to clipboard

Groups of recipe slots used by CRecipe.Type.SHAPELESS matching.

Link copied to clipboard

Maximum requires input items amount. Inclusive

Link copied to clipboard

Minimal requires input items amount