My First Minecraft Mod!

By Tanzil Zubair Bin Zaman

Published on Nov 12, 2016


Nov 12, 2016

The Tech Stack

JSON, Java

The Beginning

Ahh, my first coding project. Minecraft is something that I’ve loved all my life, the joy, the freedom, the boundless possibilities spreading out before you every time you open a world…. It’s the same feeling I get when I code, actually, being faced with a new world err a new, blank file, and knowing that I could make anything I wanted, and watching, as the blocks I placed, the lines of code I wrote, slowly but surely built up, until I stepped back, and saw something that had become more than just the sum of its parts, something that was straight out of my imagination, something that housed a bit of my soul.

When I started working on this add-on, I was new to just about everything in code. Knowing that I didn’t know much, and not knowing where I could go to know more, I set about trying to learn the only way I could come up with, downloading the add-ons other people had made, and trying to understand what this bit here, that line there, and that number over there actually did.

Duct-tape and Glue

There were very few add-ons available back in those days, if I remember correctly add-ons themselves had been announced and then subsequently brought into Minecraft PE only weeks before (Mojang hadn’t yet ditched the PE part, as the mobile version was, at the time, a watered down version of its counterparts on desktop and console).

Making add-ons back then was therefore very hands-on, done by downloading the unmodified files off of the official Minecraft website and unzipping them and editing what was must’ve been I now realize a very high-level abstraction of the source code of the mobs or items themselves.

Adding new things was also not allowed, you could only repurpose blocks of code, in their words ‘remixing’ behaviors and characteristics across mobs (the creatures in Minecraft, both friendly and hostile) and items.

So that was what I did. Being the big explosion loving, trigger-happy child that I am was, I set about making an add-on that would add huge explosions and awesome weapons to the game. I named it, quite aptly, Nuclear Weapons. It consisted of basically every projectile I could find in the entire game having most of their code replaced with that of the TNT block, with the value for the strength of the explosion, originally around 30ish for the TNT , being err modified slightly.

Okay who am I kidding, when I was done not one of them had that value set under triple digits, and I only stopped because it was pushing the limits of my iPad Mini.

Finishing up

So, 4 and a half months later, after a lot of set backs, some outbursts, and if I remember correctly, giving up thrice, I had the items ready, complete with new skins made from a Minecraft texture editor, ready to be published to a site I had found, <em>MCPE DL</em> , one of the few sites that accepted and had a separate page for add-ons in Minecraft PE (remember, add-ons were just months old at this point, and the community behind traditional Minecraft mods, either on PC or any other version of Minecraft was also significantly larger, and also had much less restrictions on what could actually be made).

With a quivering heart and shaking hands, I filled out the form they had for submitting an add-on, thoughts racing in my head : ”What if they don’t accept it ?”, ”What if they have one look and delete the form ?”, ”What if I’m sending the wrong file (after having checked it thrice)?”, and the most dreadful question of all ”What if all this time I devoted to this ends up being for nothing ?”

So, with a deep but noticeably shaky breath, I filled out the last parts of the form, and pressed submit aaannndddd…….nothing.

The Wait

Somehow I hadn’t, after working on the project for the last 4 months, and having visited the site and the form what must’ve been hundreds of times, realized that there would be a waiting period between submitting the form and actually knowing whether it got accepted or not. Oh the agony.

Three days of religiously refreshing and revisiting the site whenever I could later, on the morning of the third day, moments before I went to school, I checked it again, and there I saw it, on the site in all of its explosive glory, at the tippy-top of the list too! (The site ordered items by most recently added, I later found, not that that could have lowered my excitement in the slightest).

Oh my happiness and relief went through the roof, and I was downright ecstatic throughout that day and the coming week. I had accomplished something then I had never really thought possible, I had made something, coded something that other people could download and run on their own devices!

The End / The Beginning

That was my first real foray into coding that had an audience beyond just me, the first time I got a proverbial peek-behind-the-curtain of real, complex software that was alive, and my first for so many aspects of coding that it would be impossible to list them all.

People have no real need of making add-ons the way I did anymore, one quick Google search shows there’s no shortage of add-on makers now. Rows and columns of dropdown menus and you have mostly what you’re looking for.

I’ve always been a fan of people coming up with easier, more streamlined versions of doing something, in fact I’ve done so many times myself by now, and benefitted from others doing the same more times than I can count, but something about editing those raw JSON files, hunting down the bit of code I wanted to change in a sea of brackets and numbers and functions , most of which I didn’t understand, hoping against hope that I didn’t break something, and have to start again (<em>Git</em> who?), something about it, I will most definitely miss.

I would have always been utterly grateful for having been introduced to a game like Minecraft by my older brother, on his Kindle, all those years ago, but looking back, it became so much more for me than I could ever have thought possible, and I am so very grateful for him letting me mess around on his Kindle that fateful day, the better part of a decade ago, which coincidentally resulted in me pressing a funny looking green and brown icon, and unknowingly embarking on a journey that would take me through the depths of the internet all the way to its tops, a journey I happily continue to this day.