-
Notifications
You must be signed in to change notification settings - Fork 18
Effect Requirement
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"
.
The effect requirement have 4 mandatory properties and 3 optional properties.
Type
"type": "custommachinery:effect"
Effect
An effect ID, it can be any registered effect modded or vanilla.
The effect ID must be defined by nemaspace:id
like minecraft:levitation
for example.
"effect": "minecraft:strength"
The requirement will apply a vanilla Strength effect.
Time
A positive integer that define the duration in ticks of the effect.
"time": 100
The effect duration will be 100 ticks -> 5 seconds.
Radius
A positive integer that define the radius around the machine where the effect will be applied.
The radius is in block size and is a circle.
"radius": 10
The effect will be applied in all entities whithin 10 blocks of the machine.
Level
A positive integer that define level of the effect, vanilla hardcode the effect level limit at 255.
"level": 1
The effect will be applied at level 1.
"level": 4
The effect will be applied at level 4.
Filter
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.
Empty, any entity can have the effect applied.
"filter": ["minecraft:zombie", "minecraft:villager"]
The effect will only be given to vanilla zombies and villagers.
The []
are not required if only one entity ID is specified.
Finish
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 :
"finish": false
The effect is applied each tick of the crafting process.
"finish": true
The effect is applied only once, at the end of the crafting process.
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:
{
"type": "custommachinery:effect",
"effect": "minecraft:absorption",
"time": 200,
"radius": 50,
"level": 2,
"filter": "minecraft:player",
"finish": true
}
3. Machine GUI
- Dump Element
- Energy Element
- Fluid Element
- Fuel Element
- Player Inventory Element
- Progress Bar Element
- Reset Element
- Slot Element
- Status Element
- Text Element
- Texture Element
5. Catalysts
- Biome Requirement
- Block Requirement
- Command Requirement
- Dimension Requirement
- Drop Requirement
- Durability Requirement
- Effect Requirement
- Energy Requirement
- Energy Per Tick Requirement
- Entity Requirement
- Fluid Requirement
- Fluid Per Tick Requirement
- Fuel Requirement
- Item Requirement
- Light Requirement
- Loot Table Requirement
- Position Requirement
- Structure Requirement
- Redstone Requirement
- Time Requirement
- Weather Requirement