My Minecraft Minigames

WARNING: This program is not compatible with PC or Python 2: please use a Raspberry Pi and Python 3 to run

Hi readers, it’s CrazySqueak here, I’ve recently exhibited a few projects at Southend Jam and this is one of them.

I’ve written a Minecraft game called McPiWare. The aim of the game is to earn as many points as possible by completing minigames. The minigames occur in a set order and keep coming until you fail at one of them. There is also a bonus round that first occurs when you reach 20 points, and then it multiplies the score required for the bonus round by three each time. You can find a list of the minigames below.

Name Objective Allocated time (secs) Win criteria Bonus points awarded Notes
 Flowers Pick all the flowers  10
  •  The player has picked all the flowers
  •  (0-5) for speed
 Speed bonus is near-impossible to obtain without cheating
 Parkour Land on as many blocks as possible  15
  •  The player has landed on at least five obsidian blocks
  •  (0-any) for each extra block landed on
 Blocks turn to glowing obsidian when landed on, only landing on normal obsidian counts
 Survive  Don’t fall down 30
  •  The player has at least 1 life left at the end
  •  (0-4) for lives left
 The minigame instantly ends if you run out of lives
 Treasure  Find as much treasure as you can  30
  •  The player has found at least 1 treasure block
  •  (0-any) for extra treasure found
 Searching is done by right-clicking grass near cobblestone or farmland while holding a sword
 Miner  Mine as many diamonds as you can  15
  •  The player has mined at least one diamond ore
  •  (0-any) for extra diamonds found
 You will see text in chat when you are near diamonds, diamons are hidden under the layer of stone
 Bonus (aka Path)  Move from the gold block to the diamond block as many times as you can without falling down  15  You complete this minigame no matter what
  •  (0-any) for paths cleared
  • (0-any) bonus points
 Falling down instantly ends the minigame

I’m really pleased with how this game turned out, especially the built in leaderboard which means you can invite your friends over to compete with you. The leaderboard starts with some pre-set scores so it takes a master of the game to achieve the top ranking score.

Feel free to download and share my project but please leave credit to me for creating the original program. I hope it will be included in the next Minecraft Pi hackpack too!

Advertisements

Natural Disasters in Minecraft Pi

A meteor strike

Introduction

I have created natural disasters in minecraft using python. It adds many disasters to your minecraft that happen randomly wherever you are in your world. The program randomly starts disasters on it’s own so you should keep moving to avoid getting hit.

The Disasters

Disaster Name Effects Duration Image Extra Info
Earthquake Creates random holes around you. About 1 minute. an earthquake Effects have a range of about 15 blocks from the epicentre.
Sinkhole Creates hole in the ground below you. Instant.  A sinkhole The hole has random edges.
 Meteor Fires a meteor from the sky that crashes into the ground below you. Instant.  A meteor strike The meteor will not stop until it either reaches the highest point of the world at your position or the program crashes.
Meteor shower Fires down 10 meteors that crash into the ground around you. 10 meteors.  A meteor shower The best thing to do when this occurs is to stand still and wait, the meteors from this disaster only rarely crash into you.
Heatwave Causes the area around you to die out. 50 – 90 seconds. a heatwave Only affects wood logs, leaves, water, and grass.
Geyser Creates a column of water that starts at y -60 and ends 5 blocks above the highest point in your world. 25 seconds. a geyser The flood left behind once it ends  takes a while to dry up.
Eruption Erects a massive structure using water and lava. 1 minute and 15 seconds.  an eruption Lava still remains on the inside.

What this code requires to run

Example of how to manually start a disaster

To start a meteor at the position 0, 0 I would use:

meteor(0, 0)

Example of my code

def meteor(x, z):
 mc.postToChat('Meteor approaching!')
 y = 64
 h = mc.getHeight(x, z)
 x -= (64 - h)
 meteorSound.play()
 while y > h:
 y -= 1
 x += 1
 mc.setBlocks(x-2, y-2, z-2, x+2, y+2, z+2, block.OBSIDIAN.id)
 time.sleep(0.05)
 mc.setBlocks(x-2, y-2, z-2, x+2, y+2, z+2, block.AIR.id)
 mc.setBlocks(x-2, y-2, z-2, x+2, y+2, z+2, block.LAVA.id)
 mc.setBlocks(x-1, y-1, z-1, x+1, y+1, z+1, block.OBSIDIAN.id)

the full code is in the download link below

Code Downloads

To download my code click here.