The Bug:
Breaking blocks whose loot tables use uniform bonus counts with negative multipliers disconnects players.
Steps to Reproduce:
Create a new world with the attached data pack.
Place down a dirt block and switch to survival mode.
Obtain a wooden shovel enchanted with efficiency by using the command provided below.
/give @s minecraft:wooden_shovel[minecraft:enchantments={efficiency:1}]Break the dirt block with the wooden shovel.
Observe if you are disconnected from the world.
Observed Behavior:
You are disconnected from the world with the "Network Protocol Error" message.
Expected Behavior:
You would not be disconnected, and the dirt block would break normally.