Chapter 4

ComputerCraft!

 

Exercise 01: Password Protected Door Lock

What you’ll learn:

  • How to evaluate for NOT true conditions
  • how to break loops
  • How to use the ComputerCraft code editor

Basic Minecraft lets you use Redstone to create cool and complex circuits. With the addition of a computer, we can make things more interesting. Using an Advanced Computer, we’ll create a door lock that asks for a password.


Pastebin Code

Exercise 02: Rednet Fireworks

ComputerCraft has its own version of networking, called rednet, which can be used as Minecraft wifi.

What you’ll learn:

  • how to send wireless signals to computers in ComputerCraft
  • How to remotely activate Redstone

We can take advantage of this to remotely trigger other computers and Redstone events within the wireless range. In this example, we’ll set off some fireworks in a dispenser using Redstone.


Pastebin Code

Exercise 05: Creating a Touchscreen

What you’ll learn:

  • how to detect specific ComputerCraft events
  • how to connect a monitor to your computer
  • how to change the display options on an Advanced Monitor

In this last exercise, we’ll look at how to use an Advanced Computer and an Advanced Monitor to create a giant touchscreen.


Pastebin Code