Translation

When you hit the *Run* button, you'll see your message flash up on the Minecraft window. Congratulations, you've written your first Minecraft code! That was easy wasn't it.
0/1720
Context English Norwegian Bokmål State
Getting the block type at a given coordinate
Hente ut blokktypen på et gitt koordinat
Let's look at each of these in turn.
La oss se på hver av disse etter tur.
Let's see just how easy it is to control Minecraft Pi from Sonic Pi. First, make sure you have both Minecraft Pi and Sonic Pi open at the same time and also make sure you've entered a Minecraft world and can walk around.
In a fresh Sonic Pi buffer simply enter the following code:
mc_message "Hello from Sonic Pi"
When you hit the *Run* button, you'll see your message flash up on the Minecraft window. Congratulations, you've written your first Minecraft code! That was easy wasn't it.
Now, let's try a little magic. Let's teleport ourselves somewhere! Try the following:
mc_teleport 50, 50, 50
When you hit *Run* - boom! You're instantantly transported to a new place. Most likely it was somewhere in the sky and you fell down either to dry land or into water. Now, what are those numbers: `50, 50, 50`? They're the coordinates of the location you're trying to teleport to. Let's take a brief moment to explore what coordinates are and how they work because they're really, really important for programming Minecraft.
Coordinates
Koordinater
Imagine a pirate's map with a big `X` marking the location of some treasure. The exact location of the `X` can be described with two numbers - how far along the map from left to right and how far along the map from bottom to top. For example `10cm` across and `8cm` up. These two numbers `10` and `8` are coordinates. You could easily imagine describing the locations of other stashes of treasure with other pairs of numbers. Perhaps there's a big chest of gold at `2` across and `9` up...

Loading…

Loading…

Glossary

English Norwegian Bokmål
live code koding på direkten

Source information

Labels
No labels currently set!
Source string location
C.01-Basic-API.md:29
Source string age
3 years ago
Translation file
etc/doc/lang/sonic-pi-tutorial-nb.po, string 2039