@whitenest06
Profile
Registered: 1 year, 7 months ago
Utilizing Bazel to Create Minecraft Modpacks – Evan Pratten In 2012, I began to get involved to Minecraft mod development and shortly after, put together an almost-plain client-side modpack myself that mainly contained rendering, UI, and quality-of-life tweaks. While this modpack never got published, or was even given a name, I kept maintaining it for years until I quit playing Minecraft just before the release of Minecraft 1.9 (in 2016). I was so accustomed to this modpack that it made it difficult to play vanilla Minecraft. Recently, a few friends invited me to join their private Minecraft server, and despite having not played the game in about four years I decided to join. This was mistake on their part, since they now have the pleasure of having someone who used to main 1.6.4 constantly looking at things and asking "What is this and what is it?". Hexnet I am now beginning to accept the new blocks, the complicated combat system, and bizarre rendering system. One major thing was still missing though Where was my modpack? I decided to rebuild my old modpack (and finally give it its name, CorePack). There is not much to do, as the rendering and UI mods are identical as are the same GLSL shadingrs and similar textures. However I did make an "major" change from the Forge Mod Loader and to the Fabric Loader because I prefer Fabric's API. Curseforge & Bazel Curseforge wasn't around when I was playing regularly. It is a huge improvement over PlanetMinecraft forums, since it offers a simple way to access data about published Minecraft mods, and has an API! Luckily, after switching the modpack to Fabric and every mod I was looking for was available via curse (although it seems NEI is now a thing of the past). The main objective for the updated version of CorePack was to design it in such that I could have an CI pipeline produce new releases for me every time mods are updated. This involves programming to pull information about mods, and their JAR files, using an buildsystem script. Since this project requires working with a large amount of data gathered from various external sources, I once-again decided to make use of Bazel, a buildsystem that excels at these kinds of projects. Curseforge is a fantastic API for working with mod-data. However, @WynPrice (a fellow mod dev) has developed Curse Maven which I decided to use instead. Curse Maven is a serverless API, acts in the same way as my Ultralight project. Any request for artifacts to Curse Maven will be redirected and then served by the Curseforge Maven server without the need for me to figure out the long-form artifact identifiers that are used internally by curse. Curse Maven makes it easy to load mods (in this instance, fabric-api) into Bazel. The above snippet uses a Bazel ruleset developed by Square, Inc. called bazel_maven_repository. Modpack configuration Since my pack is designed to work with MultiMC, two sets of configuration files are needed. The first set tells MultiMC what versions of LWJGL and Minecraft to use. The second set contains the game's configuration files. Many of these files contain information I would like to modify from Bazel during the modpack build phase. Starlark's core library includes an action called expand_template.
Website: https://blogfreely.net/startflood79/minecraft-library-helps-you-dodge-news-media-censorship
Forums
Topics Started: 0
Replies Created: 0
Forum Role: Participant