Rainbow beacon
Send your your colors up! Here’s a beacon with the colors of the rainbow.
Try the code:
let location: Position = null
let rainbow: number[] = []
player.onChat("beacon", function () {
location = positions.add(
player.position(),
pos(1, 0, 0)
)
for (let i = 0; i < 10; i++) {
for (let value of rainbow) {
blocks.place(value, location)
location = positions.add(
location,
pos(0, 1, 0)
)
}
}
})
rainbow = [
RED_CONCRETE, ORANGE_CONCRETE,
YELLOW_CONCRETE, LIME_CONCRETE,
GREEN_CONCRETE, LIGHT_BLUE_CONCRETE,
BLUE_CONCRETE, MAGENTA_CONCRETE,
PURPLE_CONCRETE, PINK_CONCRETE
]