Steps to reproduce the issue
Write a loot_table json where bonus_rolls is 0. Here is a vanilla example which defines how many water buckets will generate in trial chambers' dispensers:
{
"type": "minecraft:chest",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"add": false,
"count": 1.0,
"function": "minecraft:set_count"
}
],
"name": "minecraft:water_bucket"
}
],
"rolls": 1.0
}
],
"random_sequence": "minecraft:dispensers/trial_chambers/water"
}Expected result
The loot table should roll additional times with luck attributes and fishing_luck_bonus on fishing tool.
Actual result
If bonus_rolls is 0 in the loot table, times of rolling is not affected by luck attributes or fishing_luck_bonus on fishing tool. This is also one of reasons why luck effect can only affect fishing since the calculation of quality can function even though quality defined in json is 0.0 ,while only fishing loot tables define quality.
Potential solution
Change the calculation from (l+e)*b to (l+e)*max(1,b), where l is the level of luck attributes, e is the enchantment level of fishing_luck_bonus, and b is bonus_rolls defined in json. Therefore, additional times of rolling will still function even if bonus_rolls is 0.
A bonus_rolls value of 0 means that there will be zero bonus rolls. This is working exactly as intended. Otherwise there would be no way to not have bonus rolls.