Entity
Make the recipe check, heal, hurt or kill entities near the machine
Entity requirement is used to check, consume health or kill some entities in a specified radius of the machine.
To use it you need to provide the amount of entities/health you want to check/consume/kill and the radius the machine should search them.
Note that the larger the radius, the more lag it will generate, and the machine doesn't count entities in unloaded chunks.
This requirement is available in both input and output modes.
The requirement type of entity requirement is : "custommachinery:entity"
Properties
The entity requirement have 5 mandatory properties and 2 optional properties.
Mandatory properties
"type": "custommachinery:entity" //Mandatory to define an entity requirement.Mode
Name : mode
modeDescription :
Define when the requirement will be processed.
inputThe requirement will be processed at the start of the crafting process.outputThe requirement will be processed at the end of the crafting process.
Example :
"mode": "input"The requirement will be processed at the start of the crafting process.
Action
Name : action
actionDescription :
Define what should the requirement check/do. The 4 available actions for entity requirement are :
check_amountWill check the amount of entities in the specified radius and compare it to the specified amount.check_healthWill check the sum of health of all nearby entities combined and compare it to the specified amount.consume_healthSame than "check_health" but will consume the amount of life points on start if mode = input or finish if mode = output.killSame than "check_amount" but will kill the amount of entities on start if mode = input or finish if mode = output.
Example :
"action": "kill"The requirement will kill entities.
Amount
Name : amount
amountDescription :
The amount of entities/health to check/consume/kill, the recipe will start/end only if the found amount of entities/health in the specified radius is greater or equals to this amount.
Example :
"amount": 10The machine will search for 10 entities or 10 health points depending of the specified action.
Optional properties
Filter
Name : filter
filterDescription :
A blacklist of entities to ignore for when checking.
By default all entities are allowed for "check_amount" and "kill" actions, even non-living ones like item frame or armor stand.
For "check_health" and "consume_health" actions only living entities (all mobs/animals/player) are allowed.
Default : empty
emptyNo blacklist.
Example :
Allow all entities but vanilla sheeps and cows.
Example
An Entity Requirement that will make the recipe kill 10 villagers in a radius of 20 blocks at the end of the process :
The 10 villagers are needed to be in radius during all the crafting process or the machine will error.
Last updated