AC Digital Junior DTC
  • digital
  • illustrator
  • photoshop
    • photoshop pro
  • MINECRAFT Modding
    • MINECRAFT Eco-house
  • After Effects
  • spreadsheets
  • python3
  • html/css
  • 9DTC4/9DTG4
  • Yr10 Card-TRonics
    • Project
    • Soldering >
      • Breadboard
      • Circuit Diagram Maker
      • Bandsaw
      • Vacuum Former
    • Resistor/ LED and other circuits >
      • Parallel Circuit
      • Series Circuit
      • The Transistor Circuit
      • Capacitor/ Timing Circuit
      • Flip-flop Circuit
      • The Darlington Pair
    • Learning Story 10CTR

MINECRAFT MODDING - CODING

Picture

Pair Programming

Picture
This is a technique used when writing computer programs where two programmers work together at a workstation. One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in. The two programmers switch roles frequently. It has many benefits: where the programmers skills are shared, less errors are made, programmers enjoy the experience more, and better solutions are found.
TASK
Get into a pair.
Find out what experience your partner has with Minecraft and programming.




Terminology

The following terms are important to understand:
Algorithm, Block-based programming, CamelCase convention, Commenting code, Commenting out, Compound logical operator, Control structure, Function, Loop, Pseudocode, Variables.


TASK
  1. Open a Google doc in your DTC folder. Name it  Programming Terminology.
  2. Go to technology.tki.org.nz/Glossary#glossary_31688 and find the terms and their meanings. Add them to the doc.
​

Important Hotkeys
​

1. The ESC key (top left of the keyboard) enable the user to pause and leave the Minecraft game
2. The t key activates the console at the bottom of the Minecraft game window which is where commands can be entered
3. The e key activates the inventory
4. The space key when double clicked allows the player to fly
5. The right-click on an agent allows the player to see the agents inventory
​


MINECRAFT Essential Commands

There are a number of / (slash) commands, settings, special features of the Education Edition and general know how that is required to use Minecraft effectively. This link is a good start to learning or updating what you might already know. These commands can be used in the Minecraft Console which is accessed by pressing t.
https://education.minecraft.net/support/knowledge-base/commands/


​TASK

  1. Download the Command Worksheet file (Save in your Minecraft folder), use the commands link above to find out what the commands do and how to use them.
  2. Fill in the worksheet.  You should test the commands as you go to see if you can get them to work.
COMMAND WORKSHEET (Access by clicking) 


CODING - using MakeCode

  1. In Minecraft use the '/code' command to open the Code Connection
  2. Click the MakeCode button
Picture
Picture


​MAKECODE

MakeCode is a blocky language and it can be used to make Mods for Minecraft. Mods allow the player to run code inside Minecraft to spawn, build, plant etc. The mod can be saved and used over and over by typing a keyword into the console. MakeCode was developed by Microsoft and can be used in other programming environment such as robotics or electronics. In the Minecraft MakeCode PXT (Programming eXperience Toolkit) there is a tutorial which we will use to create our mods. When organising your screen it may be useful to place the MakeCode window and Minecraft window side-by-side as shown.
Picture


​Mod folder

  1. Create a Mods folder in your Minecraft folder on your School Networked storage location. Use this folder to save your mods.
  2. Each mod should have a descriptive name (one that describes what the mod does). For example the chickens mod might be called chickens10. This would mean that this mod creates 10 chickens.


​Mod Tutorials

To learn about the MakeCode language there are many tutorials. These create fun and exciting events in your Minecraft world. Click for tutorials.
Some of these tutorials are called:
Agent move                    Super digger
Agent build                     Fast forward
Chicken rain                   Billboard
Mega jump                     Compass rose
Flower trail                     Spleef etc...
Have a go and complete the number of tutorials the LL asks you to.
Picture

Events

An event in computer science is an action or occurrence that is detected by a computer. For example, when someone clicks the button on their mouse, it generates a “mouse click event” for the computer. In real life, there are also events that might be associated with an action, like cause and effect. Here are some examples:
Event                                                           Action
It starts raining                                             People open umbrellas  
The bell rings                                               Students go to class
The power button is pressed                       The computer turns on
The mouse button is clicked                        An application opens

Unplugged Activity: Events and Handlers

Activity: Last Stand at the Alamo!
Six thinking hats reflection activity
​

Coordinates in Minecraft are 3D like (x,y,z)

Coordinates Overview
In Minecraft, it’s important to know where you are in the world, where your agent is, and where all kinds of things from diamond mines, to woodland mansions, to underground spawners are. In Survival mode, it’s even more important to be able to get back to a safe place when the sun starts to go down, or to remember the location of points of interest so you can find them again if your inventory is full and you need to come back.
To find your World Position and your Agents World Position: press F1
An overview of coordinates absolute and relative
Unplugged Activity: Classroom Coordinates
Activity: Minecraft Moving Company



​

Picture


Variables (types of variables are: number, string & boolean)

Overview
Unplugged Activity: Slap, Clap, Snap

Activity: Arrow Counter
​Activity: Fall is in the Air


Learning Pseudocode


What is pseudocode? 
That is a good question and now that you are familiar with modding it's a good time to learn about pseudocode. If we ask the 

wikihow,com website this is what they say.
"Pseudocode is an informal tool that you can use to plan out your algorithms. As you begin to write more complex code, it can be hard to keep an entire program in your head before coding it. Think of pseudocode as a step-by-step verbal outline of your code that you can later transcribe into a programming language. It is a combination of human language and programming language: it mimics the syntax of actual computer code, but it is more concerned with readability than with technical specificity." https://www.wikihow.com/Write-Pseudocode
Open the Pseudocode Worksheet


​Make a Crop Farm

.Watch the MakeCode video.
Try out the techniques shown in the video.

​TASK
Write pseudocode for this crop farm:
  • ​Write pseudocode using the Make a crop worksheet
  • One type of crop - 16 blocks total area
  • The blocks should be planted in a square area
Extension 
  • Place water around the crop as it is planted
  • ​Plant two different crops in the same 16 blocks
​Code your pseudocode. Remember to save the MakeCode files. Give the file a descriptive name.


MakeCode Documentation (help!)


​Programming Structures Worksheet

​MakeCode has a website that can be used to help you understand how the MakeCode Programming Language works. Try https://minecraft.makecode.com/docs
This worksheet helps you to understand what you have been doing in some of the programming exercises you have been doing.
​Open the worksheet here

Climbing Worksheet

This worksheet uses sensing of the environment to help the Agent to climb a wall.
Open the worksheet here
​Extension
Add some string output to the Minecraft screen to explain what the agent is doing. Use a 'say' command.

Sensing Worksheet

This worksheet is about detecting different types of blocks.
Open the worksheet here


Test Cases Worksheet

This worksheet is about testing your program to make sure it does what it's expected to do.
​Download the worksheet here


​HAND IN THE BEST EXAMPLES OF YOUR WORK

Review the work done in this topic, and find the three best examples of work. They should be finished and have comments. They should have instructions for the user especially if materials are required for the Agents inventory.

Check the three programs work well and have comments, descriptively named variables, and instructions for the user.​

Open your AC Gmail.
Compose a new email.
In the TO: box type g.smirk@alfristoncollege.school.nz
In the SUBJECT LINE put: your name, Minecraft modding examples of work
Click the PAPER CLIP SYMBOL and attach your three file
Click SEND.

         juniordigital.school  ©2020                                                                                          www.digital.school.nz