Item filter

Use the item filter requirement in a KubeJS recipe.

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

.requireItemFilter(ingredient)
.requireItemFilter(ingredient, slot)
  • The ingredient param must be an Ingredient. KubeJS support various ingredient types : "item_id", "#tag_id", "@mod_id" or even regex.

  • 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 :

ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireItemFilter("minecraft:diamond", "filter1")
})

Last updated