Entity
Use the entity requirement in a KubeJS recipe
Use one of these methods to add an Entity Requirement to the recipe.
.requireEntities(amount, radius, filter, whitelist)
.requireEntityHealth(amount, radius, filter, whitelist)
.consumeEntityHeathOnStart(amount, radius, filter, whitelist)
.consumeEntityHealthOnEnd(amount, radius, filter, whitelist)
.killEntitiesOnStart(amount, radius, filter, whitelist)
.killEntitiesOnEnd(amount, radius, filter, whitelist)The
amountandradiusparams must be a positive integer.The
filterparam must be an array of string defining a valid entity id. Example :["minecraft:cow", "minecraft:pig"...]The
whitelistparam must be a boolean, if true the filter will be a whitelist, if false it will be a blacklist.
Example
ServerEvents.recipes(event => {
  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireEntities(1, 10, "minecraft:cow", true)
  
})