The Bug:
The server becomes unresponsive and eventually crashes when enchantments make explosions with very large radii.
TNT and minecarts with TNT cap their explosion power at 128, but the radius of explosions from enchantments has no limit, therefore introducing an inconsistency.
Steps to Reproduce:
Create a new world with the attached data pack.
Give yourself a diamond sword with the enchantment from the data pack by using the command provided below.
/give @s minecraft:diamond_sword[minecraft:enchantments={"test:huge_explosion":1}]Place down a pig using a spawn egg.
Attack the pig.
Try to perform actions like throwing items on the ground and observe how the server is unresponsive.
Observed Behavior:
The server becomes unresponsive and eventually crashes.
Expected Behavior:
The server would not become unresponsive or crash.