Drop
Make the recipe drop or consume item on ground
Drop requirement is used to check/consume/drop items on ground near the machine.
This requirement is available in both input and output modes.
The requirement type of drop requirement is : "custommachinery:drop".
Properties
The drop requirement has 3 mandatory properties and 7 optional properties.
Mandatory properties
"type": "custommachinery:drop" //Mandatory to define a drop 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 will the requirement do. Available actions are:
checkWill only check for items that match the list defined in theinputproperty.consumeWill consume items that match the list defined in theinputproperty.produceWill drop the item specified in theoutputproperty near the machine.
check will check for the required items each tick of the recipe and stop the processing if it can't find the items.
consume and produce will do their actions on start of the processing if the mode property is "input" or on end of the processing if "output".
Example :
"action": "consume"The machine will consume items on ground.
Optional properties
Output
Name : output
outputDescription :
An item to drop if the action property is set to produce
Default :
"output": "minecraft:air"An air item, meaning nothing will be dropped.
Example :
"output": "minecraft:diamond"The requirement will drop a vanilla diamond on ground.
Note :
This property is optional for check and consume actions, but mandatory for produce action.
Amount
Name : amount
amountDescription :
The amount of items to check/consume or produce.
Default : 1
The requirement will check, consume or produce 1 item.
Example :
The recipe will check/consume 9 items matching the list defined in the input property (if whitelist), the crafting process will be stopped if the required amount of items are not found.
If action property is produce this property defines the amount of items produced.
NBT
Name : nbt
nbtDescription :
A string that represent a nbt tag that will be required on the checked/consumed items, or added to the produced items.
If the drop requirement is in check or consume action it will search for items around the machine that have AT LEAST those nbt tag, if the item have more tag it's fine as long as it have all the tags specified in this property.
The nbt tag must be defined the same way you use it in the /give command.
You can see the nbt tag of an item using /data get entity @s SelectedItem and then copy the part after tag: inside {}.
Default :
Nothing (no nbt tags)
Example :
The item requirement will search for items with nbt tag "test1" with value true and tag "Amount" with value 10.
Radius
Name : radius
radiusDescription :
An integer defining the maximal range from the center of the machine that the items will be searched. This does not affect produced items.
Default : 1
1 block radius, in a sphere shape around the center of the machine.
Example :
The radius is set to 3 blocks around the machine.
Delay
Name : delay
delayDescription :
A double value, between 0.0 and 1.0 that represents at which time of the recipe the requirement action must be executed. A delay of 0.5 represent half of the recipe, 0.25 a quarter etc...
Default : 0
The requirement action will be executed on start if mode is input or on end if mode is output.
Example :
The requirement action will be executed when the recipe progress time is at (approximatively) a third of the recipe total duration.
Note :
If delay is specified the requirement will be only executed at the specified delay, independently of the mode property.
This property have no effect if the action is set to check as this action is executed each tick of the recipe.
Example
A Drop Requirement that will make the recipe drop 3 diamonds on the ground at the end of the crafting process with a 33% chance.
A drop requirement that will make the recipe check for 5 items in the #forge:stone tag in a 5 blocks radius during all the crafting process.
Last updated