This system allows for the creation of custom potion effects with unique behaviors and attribute modifiers. Potion files must be placed in:

data/namespace/cws_startup/potions/potionname.json

{
  "id": "berserk",
  "color": "#FF2200",
  "isBeneficial": true,
  "duration": 3600,
  "amplifier": 0,
  "hasLongVersion": true,
  "longDuration": 9600,
  "hasStrongVersion": true,
  "strongDuration": 1800,
  "strongAmplifier": 1,
  "onApplyCommands": [
    "execute at @s run playsound entity.ender_dragon.growl player @s"
  ],
  "onTickCommands": [
    "execute at @s run particle minecraft:flame ~ ~1 ~ 0.2 0.5 0.2 0.01 1"
  ],
  "onRemoveCommands": [
    "execute at @s run playsound block.fire.extinguish player @s"
  ],
  "attributes": [
    {
      "attribute": "minecraft:generic.attack_damage",
      "amount": 4.0,
      "operation": "addition"
    }
  ]
}