You don't need to build the mod. The easiest way to play Minecraft in FreeBSD is using
games/prismlauncher. From there you create your Minecraft instance for the version of Minecraft you want to play. Then either through Prism Launcher or from a website - I am finding that mod on Curseforge - download the mod and install it. For more information on using Prism Launcher, see their website,
https://prismlauncher.org/
If you are wanting to host a server that uses that mod, there may be some more complex setup, depending on if the mod needs Forge/Neoforge or some other mod loader beyond the base game. I had to do some of that to get Minecolonies mod working on my server, so I may be able to provide some input if needed.