Effect
Use the effect requirement in a KubeJS recipe
Use one of these methods to add an Effect Requirement to the recipe.
.giveEffectOnEnd("effect", time, radius)
.giveEffectOnEnd("effect", time, radius, level)
.giveEffectOnEnd("effect", time, radius, filter)
.giveEffectOnEnd("effect", time, radius, level, filter)
.giveEffectEachTick("effect", time, radius)
.giveEffectEachTick("effect", time, radius, level)
.giveEffectEachTick("effect", time, radius, filter)
.giveEffectEachTick("effect", time, radius, level, filter)- The - effectparam must be a string defining a valid effect id. Example :- minecraft:regeneration
- The - timeand- radiusparams must be a positive integer.
- The - levelparam must be a positive integer. Default :- 1
- The - filterparam must be an array of string defining a valid entity id. Example :- ["minecraft:cow", "minecraft:pig"...]Default :- []
Example
ServerEvents.recipes(event => {
  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .giveEffectOnEnd("minecraft:speed", 600, 10)
  
})