Class 1 notes: Java Coding Class
Updated: Aug 7, 2021
Hi class! So recently in my previous lesson, I got a lot of questions in the middle of the class. So from now on, after every class, I will post notes on the topic we discussed, and we will also have multiple question breaks in the middle of class. Another problem that I need to address is that some students can't see the chat. So in classes, we will be using Zoom chat only. If you have problems finding the chat button in Zoom, contact me and I can help you. Also, and I can't stress this enough, If your child does not have Minecraft java edition, they cannot participate in class. In Minecraft, different versions of the game on different platforms have slightly different features, such as commands, which is what we are working on in the Java Minecraft coding class. If you are not on windows or mac and do not have Minecraft Java edition, you can purchase it for 30$ USD at minecraft.net. I believe that is all the problems that need to be addressed, so I will move on to the class notes.
Class 1: the /setblock command
Before we get into this, you have to first understand what a command is, and how to use it. You can type commands into chat, in Minecraft, as long as you have operating commands, which can be given to you by whoever owns the server. In this class, you will automatically have operating commands. We will not be using chat to write commands or to write anything for that matter. What we will be using to execute our commands is a Command Block. You will have one when you start the class, and when you type your command into the command block, it will do whatever you say. For now, we are not going to worry about anything besides the long strip where you type your command in, and we won't worry about the other parameters on the screen inside the command block. To activate your command block, you have to activate it with some sort of redstone, so placing a redstone block next to it will work just fine.
The setblock command can be used to place a block at any point in the game, using XYZ coordinates. We will use XYZ coordinates in a lot of classes in the future, so it is absolutely required to move on. It may look complicated at first, but after practice, it is very easy to use. So each letter in XYZ represents an Axis.
The letter X is your east/west coordinate. A positive value increases the block East, while a negative value increases the block west.
Your Y value is up and down, so increasing it makes the block go higher, or lower if you make it a negative number.
The Z coordinate is your South/North location. A positive value increases the direction north, while a negative location increases your value South.
So, if I wanted to put an XYZ coordinate into a command, it would look like this: 100 20 -100, or something like that. This would mean that the first integer, 100, which is the X coordinate, is going to be 100 blocks east because a positive value in the X coordinate is east. The second integer, 20, which is representing the Y coordinate, means the block is going to be 20 blocks upward, from the point at which you are sending the command. The last integer, -100, which is representing the Z integer, is a negative number, meaning it will be going south because it is a negative number.
tip: if you want to find out which direction you are facing, you can enter the F3 menu. For windows users, pressing F3 on your keyboard should do it, as long as you haven't changed your keybind. For mac users, hold fn and then tap F3.
When you do this, the F3 menu will look pretty intimidating. For now, all you need to look at is your location, which is located in the 12th line, on the left side. This will show you which direction you are facing, which you can use to determine which block you are at.
So, moving on, the coordinate 100 20 -100 is called an Absolute Coordinate, and it is the exact point in the entire Minecraft world, out of all the infinite blocks.