Leap of faith
Let’s build a Leap of Faith mini-game.
Step 1
Fill a 3x3x3
pool of water in the ground (negative y)
# @highlight
blocks.fill(WATER,
# @highlight
pos(-1, -3, -1),
# @highlight
pos(1, -1, 1))
Step 2
Run the program and check to see that a pool of water is created.
Step 3
Build a 3x3
stone platform that goes up 128 blocks high.
blocks.fill(WATER,
pos(-1, -3, -1),
pos(1, -1, 1))
# @highlight
blocks.fill(STONE,
# @highlight
pos(-1, 128, -1),
# @highlight
pos(1, 128, 1))
Step 4
Run the program again. Make sure a pool and a platform are created.
Step 5
Teleport the player above the platform.
blocks.fill(WATER,
pos(-1, -3, -1),
pos(1, -1, 1))
blocks.fill(STONE,
pos(-1, 128, -1),
pos(1, 128, 1))
# @highlight
player.teleport(pos(0, 130, 0))
Step 6
Turn on survival mode for the nearest player.
blocks.fill(WATER,
pos(-1, -3, -1),
pos(1, -1, 1))
blocks.fill(STONE,
pos(-1, 128, -1),
pos(1, 128, 1))
player.teleport(pos(0, 130, 0))
# @highlight
gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER))
Step 7
Run the program now and play your game!