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"
    }
  ]
}

you can also make brewing recipes for them here are examples

{
  "type": "corewithstuff:brewing",
  "fuel": {
    "item": "corewithstuff:celestial_cheese"
  },
  "color": "#228B22",
  "input": {
    "type": "forge:nbt",
    "item": "minecraft:potion",
    "nbt": {
      "Potion": "minecraft:water"
    }
  },
  "ingredient": {
    "tag": "corewithstuff:leaves"
  },
  "output": {
    "item": "minecraft:potion",
    "nbt": {
      "Potion": "corewithstuff:leaf_potion"
    }
  }
}
{
  "type": "corewithstuff:brewing",
  "fuel": {
    "item": "corewithstuff:celestial_cheese"
  },
  "color": "#00FFFF",
  "input": {
    "item": "minecraft:glass_bottle"
  },
  "ingredient": {
    "item": "minecraft:diamond"
  },
  "output": {
    "item": "corewithstuff:diamond_dust",
    "count": 1
  }
}
{
  "type": "corewithstuff:brewing",
  "fuel": {
    "item": "corewithstuff:celestial_cheese"
  },
  "color": "#9966CC",
  "input": {
    "type": "forge:nbt",
    "item": "minecraft:potion",
    "nbt": {
      "Potion": "minecraft:awkward"
    }
  },
  "ingredient": {
    "item": "minecraft:amethyst_shard"
  },
  "output": {
    "item": "minecraft:potion",
    "nbt": {
      "Potion": "corewithstuff:potion_id"
    }
  }
}