Advertisement
MinecraftRocks999

Minecraft Pi Tutorials - Episode 4

Jan 28th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.11 KB | None | 0 0
  1. import minecraft
  2. import block
  3. import time
  4.  
  5. # Create Minecraft instance
  6. mc = minecraft.Minecraft.create()
  7.  
  8. # Delay
  9. time.sleep(2)
  10.  
  11. # A line of blocks **EXAMPLE**
  12. for x in xrange(0,10):
  13.     mc.setBlock(x, 20, 0, block.DIAMOND_BLOCK)
  14.     time.sleep(0.05)
  15.  
  16. time.sleep(2)
  17.  
  18. for x in xrange(0,10):
  19.     mc.setBlock(x, 20, 0, block.AIR)
  20.     time.sleep(0.05)
  21.  
  22. ## SEPERATOR ##
  23. time.sleep(2)
  24. ##    END    ##
  25.  
  26. # Wall **EXAMPLE**
  27. for x in xrange(0,10):
  28.     for y in xrange(20,30):
  29.         mc.setBlock(x, y, 0, block.DIAMOND_BLOCK)
  30.         time.sleep(0.05)
  31.  
  32. time.sleep(2)
  33.  
  34. for x in xrange(0,10):
  35.     for y in xrange(20,30):
  36.         mc.setBlock(x, y, 0, block.AIR)
  37.         time.sleep(0.05)
  38.  
  39. ## SEPERATOR ##
  40. time.sleep(2)
  41. ##    END    ##
  42.  
  43. # Cube **EXAMPLE**
  44. for x in range(0,10):
  45.     for y in xrange(20,30):
  46.         for z in xrange(0,10):
  47.             mc.setBlock(x, y, z, block.DIAMOND_BLOCK)
  48.             time.sleep(0.05)
  49.  
  50. time.sleep(2)
  51.  
  52. for x in range(0,10):
  53.     for y in xrange(20,30):
  54.         for z in xrange(0,10):
  55.             mc.setBlock(x, y, z, block.DIAMOND_BLOCK)
  56.             time.sleep(0.05)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement