Item filter

Use the item filter requirement in a CT recipe.

Use one of these methods to add an Item filter requirement to the recipe.

.requireItemFilter(IIngredient ingredient)
.requireItemFilter(IIngredient ingredient, String slot)
  • The ingredient param must be a CT IIngredient.

  • The slot param must be a valid slot id.

Example

The following recipe will run only if the filter slot "filter1" is set to a vanilla diamond :

<recipetype:custommachinery:custom_machine>.create("custommachinery:power_crusher", 20)
.requireItemFilter(<item:minecraft:diamond>, "filter1")
.build();