
[QUESTION][1.20.1] Is it possible for datapack pot_interaction to consume the held item
jonatjano opened this issue ยท 2 comments
Question
I'm doing a datapack with the goal to use pot interaction to convert mystical agriculture farmlands from one tier to another using the correct essence,
I couldn't find in the example a case where the held item was consummed, with the current state my datapack allow for essence duplication which is something I'd like to avoid
versions
Minecraft: 1.20.1
NeoForge: 47.1.106
Botany Pots: 13.0.36
for reference, here is the recipe to transform inferium farmland to prudentium
{
"type": "botanypots:pot_interaction",
"held_ingredient": {
"item": "mysticalagriculture:prudentium_essence"
},
"soil_ingredient": {
"item": "mysticalagriculture:inferium_farmland"
},
"soil_output": {
"item": "mysticalagriculture:prudentium_farmland",
"count": 1
},
"sound": {
"sound": "minecraft:block.sand.break",
"category": "blocks"
}
}
Hello, you can have it consume the item by setting damage_held
to false. It's enabled by default, and this mode will only consume durability from the item. If the item has no durability it will do nothing. This is definitely not intuitive, however it works this way to prevent an issue where modded tools with no durability, like powered drills, would be completely consumed instead of damaged.
Here is an example.
{
"type": "botanypots:pot_interaction",
"damage_held": false,
"held_ingredient": {
"item": "minecraft:stick"
},
"soil_ingredient": {
"item": "minecraft:dirt"
},
"soil_output": {
"item": "minecraft:gold_ore",
"count": 1
},
"sound": {
"sound": "minecraft:block.sand.break",
"category": "blocks"
}
}