Learn to Code via Tutorials on Repl.it!

← Back to all posts

Hey guys! @NVVC008 here! My old account got hacked, so I'm using this for now. In this tutorial, I'm gonna be teaching you how to make Minecraft in python. First, you're gonna need to download PyCharm Community Edition. Also, sorry MacOS users, this package is only available on windows. Speaking of which, you need to download ursina with pip install ursina or:
1. Click on 'File' on the top right corner of the PyCharm window.
2. Click on 'Settings'...
3. Click on 'Project: (Project name)' and select python interpreter...
4. Click Alt + Insert...
5. Enter the name: ursina...
6. Download the package, and you're done!
BTW, download the folder 'Minecraft-in-Python-main' included with the project. Do not download the code file Minecraft.py.
Let's start with our code in the file main.py.
I bet you can guess what's coming first.

Well, you were close. Instead, it's:

That's like saying, "Get me some glass bottles from amazon, without the box." Basically, the guy is gonna give you unpackaged bottles.

Next, we're gonna need our first-person controller.


Basically, we're creating a name/shortcut for the Ursina package.
Now, the textures.

So far, your code should be like this:

If you want to exit or see your fps, you can add this:

Or, you can just set them to false. But, they have to be there.
Now, we need to have our screen constantly update, right? So, add:

Here, we created the action that will keep updating our screen.

This converts it into a global variable.
Make sure the definition so far is:

Let's add the rest of it.

You know what, I don't care anymore. Just take the code and leave.