Item

Use the item requirement in a KubeJS recipe

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

.requireItem(ingredient)
.requireItem(ingredient, "slot")

.produceItem(item)
.produceItem(item, "slot")
  • The ingredient param must be an ItemStack created using one of the following syntax:

    • String syntax : "diamond" or "botania:pure_daisy" or "4x mekanism:osmium_ingot"

    • Tag string syntax : "#c:stones" or "4x #c:stones"

    • Item.of() KubeJS method : Item.of("minecraft:diamond", 42)

  • The slot param must be a string corresponding to a slot id defined in a custom machine json Item Component slot property.

  • The amount param must be a positive integer.

Example

ServerEvents.recipes(event => {

  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireItem("cobblestone")
  .produceItem("3x minecraft:gravel")
  
})

Last updated