Let’s make sure everything is working correctly by creating our very first Python program that will interact with minecraft whenever you create new programs to interact with minecraft these are the steps you will be following let’s begin by going to that learn Python with minecraft folder and start spiggott using start server or if You created a new world you can go to the new world and start with the start file I’ll just go back and start spirit with start server remember to wait patiently until speaker starts and once it’s ready just check that the done message displays there everything will Be okay if it shows the next step will be to start minecraft so run the launcher remember to select the correct version of minecraft in our case is one point fourteen point four and then hit play in wait for minecraft to start go to multiplayer and connect to the server Once you have joined the world press escape on your keyboard to free your cursor and just let’s just organize this windows a little bit so that you can easily see what is going on next so let’s minimize a few windows and now let’s open idle search idle on the Start Menu click it and wait for it to open and just organize it a little bit the next thing we need to do is to try some code so let’s enter some code type from M CPI dot minecraft space import space minecraft pay attention to the spelling And the case as Python is spelling in case-sensitive press ENTER to go to the next line and type MC equals to minecraft dot open and close parentheses enter to go to the next line and then type MC dot player dot set tile pause open parenthesis 0 comma 1 20 Comma 0 close parenthesis and before you run this line pay attention to where you are right now to where your player is right now and press ENTER and see how the character or the player jumped to on top of that mountain so when you do this the player’s position will change and it Will look like it went up flying this is the code used to teleport the character to a new position you will be learning more about teleportation pretty soon but for now everything seems to be working ok now if for instance you see error messages like this module not found error no module name MCP i then this means that you didn’t install the API correctly so go back to the video telling you how to install the API and try again and see if this fixes the problem if you see another error like this one no connection could be made because the target machine actually Refused it then you will have to ask yourself a few questions for instance is minecraft open is spiggott running did I select the multiplayer world or did I select the correct version of the game is Java up to date so go over the steps to set everything up and once you repeat Those steps you might actually fix the problem so pay attention to those installations instructions to avoid this kind of situation alright so if everything is working fine and you didn’t get any of these errors and all these three lines ran correctly then you’re all good to go Video Information
This video, titled ‘Learn Python with Minecraft – Part 1: Setting Up The Environment – Step 8: Testing the Set-Up’, was uploaded by Soul Hackers Labs on 2020-02-15 09:17:51. It has garnered 1556 views and 9 likes. The duration of the video is 00:04:43 or 283 seconds.
Go to the playlist for Part 1 to access all the videos: https://www.youtube.com/playlist?list=PLhevfbQANJR1P0gdhVaZ06i85ViVsGpgh