Minecraft Skeleton

Minecraft Skeleton figure.

Minecraft Skeleton drawn using the Symbol program written in Python.

Experimenting with the symbol drawing routine can give interesting results. I’m not a great artist, so hopefully this will give some inspiration. I found it easiest to put each of the lines in the list one after the other and then fill in with # symbols. They then need joining together again to create a proper Python list.

While I remember, it also seems easier to create the programs using nano running over SSH from another computer to save having to minimise Minecraft and switch over to IDLE. Just a thought.

 

from mcpi import minecraft
mc = minecraft.Minecraft.create()
mc.postToChat("Python is now in control!")

line = "  #####  "," ####### ","#########","#  ###  #","#########","#### ####","#########"," # # # # "," #######","  #####  ","   ###   ","#########","#   #   #","# ##### #","#   #   #","# ##### #","#   #   #","# ##### #","# #   # #","  #   #  ","  #   #  ","  #   #  "," ##   ## ","###   ###"

print line

startx,starty,startz = mc.player.getPos() #get the player's position

starty=starty+24 #lift the starty so that it's not written under your feet!

for row in line: # one row at a time from list_line (the result from figlet)
    starty=starty-1 # work down from the top
    column=0
    for letter in row: # work along each row - check each character. If it's a "#" then print a block else leave it as air
        column = column+1
        if letter =="#":
            mc.setBlock(startx-column,starty,startz,1)
        else:
            mc.setBlock(startx-column,starty,startz,0)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s