I would like to have shulkers be able to drop a second shell IF and ONLY IF they are killed with looting 4. I cannot seem to figure out how to do that. The only thing I can think of is having a "random chance with looting" table with a base chance of 0, but it only allows me to assign a number to be calculated per level, not only 4+.
Blocks are able to have a "table_bonus" which means you can assign custom values/chances based on the level of fortune. In the working loot table below (for gravel), I have made it so there is a 100% chance of getting flint with fortune 4. Can I do something similar for looting?
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "minecraft:gravel",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
},
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "minecraft:flint",
"conditions": [
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.08,
0.15,
0.2,
0.3,
1
]
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:gravel"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}
]
}
]
}