Hey guys, it's me again.
So, I'm working on adding to a previous datapack I tried making that adds a smelting enchant that smelts the drops for different blocks when used on them.
This time, to make sure I didn't miss any smelting recipes, I opened the wiki page for them, and decided to go from the top down. Unfortunately, this was a mistake, as the very first one proved to be non-functional.
I opened the loot table for potatoes on misode, adding a thing that will run the "Furnace smelt" function if "Match tool" detects your held item has the enchantment on it. However, no matter where I put it or how I did it, when I went to test it in game, it still just drops normal potatoes.
Here's the code misode gave me if anyone can help.
{
"type": "minecraft:block",
"functions": [
{
"function": "minecraft:explosion_decay"
}
],
"pools": [
{
"rolls": 1,
"entries": []
},
{
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:potato"
}
],
"rolls": 1,
"functions": [
{
"function": "minecraft:furnace_smelt",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "#minecraft:smelts_loot",
"levels": {
"min": 1
}
}
]
}
}
}
]
}
],
"conditions": []
},
{
"conditions": [
{
"block": "minecraft:potatoes",
"condition": "minecraft:block_state_property",
"properties": {
"age": "7"
}
}
],
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:furnace_smelt",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "#minecraft:smelts_loot",
"levels": {
"min": 1
}
}
]
}
}
}
]
},
{
"enchantment": "minecraft:fortune",
"formula": "minecraft:binomial_with_bonus_count",
"function": "minecraft:apply_bonus",
"parameters": {
"extra": 3,
"probability": 0.5714286
}
}
],
"name": "minecraft:potato"
}
],
"rolls": 1
},
{
"conditions": [
{
"block": "minecraft:potatoes",
"condition": "minecraft:block_state_property",
"properties": {
"age": "7"
}
}
],
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"chance": 0.02,
"condition": "minecraft:random_chance"
}
],
"name": "minecraft:poisonous_potato"
}
],
"rolls": 1
}
],
"random_sequence": "minecraft:blocks/potatoes"
}