Effect
Make the recipe give an effect to a nearby entity
Effect requirement is used to make the custom machine give effects to entities.
This requirement doesn't have a mode and will never stop the processing of a recipe.
The effect can be given every tick or only at the end of the crafting process (see the finish property below).
The requirement type of effect requirement is : "custommachinery:effect".
Properties
The effect requirement have 4 mandatory properties and 3 optional properties.
Mandatory properties
"type": "custommachinery:effect" //Mandatory to define an effect requirement.Optional properties
Filter
Name : filter
filterDescription :
An array of entity ID that can have the effect applied.
Any registered entity ID can be used here and must be specified in the format namespace:id like minecraft:zombie for example.
Default : empty
emptyAny entity can have the effect applied.
Example :
The effect will only be given to vanilla zombies and villagers.
The [] are not required if only one entity ID is specified.
Finish
Name : finish
finishDescription :
A boolean, if true the effect will only be applied at the end of the crafting process, if false the effect will be applied each tick while the machine is running.
Default : false
The effect is applied each tick of the crafting process.
Example :
The effect is applied only once, at the end of the crafting process.
Example
An effect requirement that add a 10 seconds, level 2 absorption effect to all players (and only players) in an area of 50 blocks at the end of the recipe:
Last updated