Compass Rose

Introduction

This tutorial shows you how to create words and letters (text) from blocks. The text is placed in the Minecraft world at a position you choose using ||blocks:print||. The object you will make is called a compass rose. This is a 2D marker showing the North, South, East, and West directions. In the last step, you will add another dimension to the compass rose to show the Up and Down directions.

Chat command

Put in an ||player:on chat command|| and rename it to compassrose.

player.onChat("compassrose", function () {
})

Insert a ||blocks:print|| into your chat command. Change “HELLO” to “E”. Change the block from Grass to Glowstone.

player.onChat("compassrose", function () {
    blocks.print(
    "E",
    GLOWSTONE,
    pos(0, 0, 0),
    WEST
    )
})

Try it!

Go to Minecraft, press t to open the chat and enter compassrose.

The ||blocks:print|| will place a big “E” in the Minecraft world at your current position.

Set the print distance

Change the position to ~20 ~0 ~0 so that ||blocks:print|| places the “E” letter 20 blocks East of your current position.

The 1st number, x of a position represents the East/West location. A positive value goes East, negative goes west.

The ~ symbol means that the position is relative to the player position rather than to the world. Thus, ~20 ~0 ~0 means 20 blocks East of the player position.

player.onChat("compassrose", function () {
    blocks.print(
        "E",
        GLOWSTONE,
        pos(20, 0, 0),
        WEST
    )
})

Try it again!

Go to Minecraft and enter compassrose in the chat.

The “E” letter is now printed 20 blocks away.

Put in another ||blocks:print|| to show “W” 20 blocks West. Try it in Minecraft.

West goes negative so the position is ~-20 ~0 ~0. Don’t move until all letters are printed!.

player.onChat("compassrose", function () {
    blocks.print(
        "E",
        GLOWSTONE,
        pos(20, 0, 0),
        WEST
    )
    blocks.print(
        "W",
        GLOWSTONE,
        pos(-20, 0, 0),
        WEST
    )
})

Insert more ||blocks:print|| to show “N” 20 blocks North, “S” 20 blocks South. Try it in Minecraft.

The 3rd number, z, of the is the South/North coordinate. A positive value goes South, a negative value goes North.

    blocks.print(
        "N",
        GLOWSTONE,
        pos(0, 0, -20),
        WEST
    )
    blocks.print(
        "S",
        GLOWSTONE,
        pos(0, 0, 20),
        WEST
    )

Inser more ||blocks:print|| to show “U” 20 blocks Up, “D” 20 blocks Down. Try it in Minecraft.

The 2nd number, y, of the position is the Up/Down elevation. A positive value goes Up, a negative value goes Down.

    blocks.print(
        "U",
        GLOWSTONE,
        pos(0, 20, 0),
        WEST
    )
    blocks.print(
        "D",
        GLOWSTONE,
        pos(0, -20, 0),
        WEST
    )