A Minecraft Mod (Solo Project)

JRandomizer is a Minecraft mod for version 1.15.1 available via Forge Mod Loader. It randomizes every item drop in the game, whether from animals, blocks, or broken chests. Think you know everything about survival Minecraft? Think again. The mod is available on CurseForge, and full source code can be found on Github (though I would suggest starting here).

My Role – Solo Developer

As the solo developer on this project, I saw it through front to back. What started as an unoriginal idea in my head found its way as a published mod less than a week later. Then, what started as a hardly-playable, bug-riddled alpha build turned into a “bug-free” multiplayer-compatible release.

There were many challenges I faced through development. Honestly, the logic required to make the mod function was trivial. Time and time again, however, I was getting stuck trying to integrate that functionality with the Minecraft/Forge interface.

For example, one of my most trying bugs was how items would get randomized when the world was closed and re-opened. When the world would load, it would add the item drops into the world’s entity list, and that is when they would be inappropriately randomized. The most obvious solution was to disable item randomization while the world was loading; however, there was no clear way to tell when the world finished loading. So instead, I tried making it so that items would not randomize if there was no player entity in the world, but the order that entities were added to the world was inconsistent. Finally, I discovered that if and only if the items already existed (and thus should not be randomized), their last position would be non-zero.

It was a great learning experience solving bugs like this. I discovered that the most obvious solution is not necessarily the most compatible with the current code base, or sometimes not possible at all. Through fixing more and more bugs like these, I started getting a good feeling for what it means to work on a preexisting, well-grounded code base.

Because of my work on this project, I also grew a great new appreciation for event-based engine structure. I am not unfamiliar with how similar engines work, and I understand them in theory, but never before have I felt such ease when trying to inject my own code in this feature-complete game. When fixing a bug regarding player death, I simply intercepted the “LivingDropsEvent” and only had to add a few lines of code. With this carefully-chosen event, I was able to graciously fix the bug in consideration.

What I intended to be a silly side project turned out to be a truly educational experience. By working with a well-tested, industry-level code base, I learned how to conquer challenges by coming up with multiple approaches and seeing which one fit best with the preexisting code. I also better understood the benefits of event-based programming (especially for game development), as my mod code fit seamlessly within the current behaviors of Minecraft. I will definitely take this knowledge with me as I head into the games industry full-time, taking current code bases and gracefully extending them.