Minecraft Opens Up Their Code For Programmers To Use In Their Games

Minecraft Opens Up Their Code For Programmers To Use In Their Games

Mojang has made a very big announcement for Minecraft, arguably one of the most popular games in the world.

The company has revealed it’s planning to open up Minecraft’s as libraries to everyone. What that means is programmers can use any part of Minecraft that’s open source in their own projects. This is going to be especially useful for game designers with little to no experience.

You don’t see many game development companies opening up their code to the public, so this is a really big move and Mojang’s way of giving back to the community. Download the libraries Brigadier and Data Fixer Upper.

Learn more about the libraries below:

Making games isn’t easy. Sure, it’s not rocket science, or brain surgery (those things are probably waaaaay easier), but it’s still incredibly difficult to learn to code, program and sheer-blind-luck your way into making a videogame. If only you had access to more resources…

Well, the lovely folks on Stockholm’s Minecraft Java team are giving you just that, by opening some of Minecraft’s code as libraries so they can be used however you like! Want to use them to improve your Minecraft mods? Great idea! Want to use them for your own projects? Go for it, just don’t forget to credit us! Want to use them to help improve pieces of the Minecraft Java engine? Thanks, we really appreciate it!

Hang on, what even is a game ‘library’?

“Libraries are little parts of the game engine,” explains Java developer, Nathan Adams (also known as Dinnerbone). “We’re making some of the self-contained libraries that Minecraft uses open source. Anyone can pick them up and use them in their own game.”

Hey, it’s the Minecraft we all know and love. But hang on, what’s with that colourful command text? Heresy!

The plan is to open up different libraries gradually. These libraries are open source and MIT licensed, which means that “basically, anyone can go in there and they can contribute and they can help improve our game engine,” Nathan explains.

“Or, if they’re making their own game, they don’t have to rewrite these little parts. They can just use ours, which have been tried and tested because we’re a very popular game, apparently!”

This might be the dullest image we’ve ever featured on Minecraft.net, but who said game development was always pretty? You can click this link here to access that github screen and download Brigadier, our first open library!

BRIGADIER

“I’m so proud of that name!” Nathan says. “Brigadier is the name of the command engine that Minecraft uses.” Brigadier is also the first library we’ve opened up!

“So in the game you can type something like /give Dinnerbone sticks and then that goes internally into Brigadier and breaks it down into pieces. Figures out what are you trying to do with this random piece of text.”

Minecraft tells Brigadier: “These are the things that players can do. Tell me once the player’s trying to do this.” So when a user types /give Dinnerbone sticks in chat, that goes through Brigadier. Brigadier splits it up, it error checks it, it tries to be as helpful as it can. You’ve also got this lovely pop-up window when you’re typing that can suggest what the next bit might be.”

Hopefully all this makes the process a lot more user friendly!

[1/3] – Start entering a command by pressing the ‘/’ key and Brigadier will start making suggestions. Handy!

Source: