Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.57 KB | None | 0 0
  1. from mcpi.minecraft import Minecraft
  2. import time
  3. mc = Minecraft.create()
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.        
  12. from mcpi.minecraft import Minecraft
  13. mc = Minecraft.create()
  14.  
  15.  
  16. pos = mc.player.getTilePos()
  17. counter = 0
  18. y = pos.y
  19. def getDiamonds():
  20.     pos = mc.player.getTilePos()
  21.     counter = 0
  22.     y = pos.y
  23.     for i in range(y):
  24.         counter += 1
  25.         x = pos.x
  26.         y = pos.y - counter
  27.         z = pos.z
  28.         blockType = mc.getBlock(x,y,z)
  29.         if blockType == 56: # алмазы
  30.             mc.postToChat("On " +  str(y) + "height diamonds. Fast mine it!" )
  31.         if blockType == 16: #уголь
  32.             mc.postToChat("On " +  str(y) + "height coal ore. Fast mine it!" )
  33.         if blockType == 15: #железо
  34.             mc.postToChat("On " +  str(y) + "height iron ore. Fast mine it!" )            
  35.         if blockType == 14: # золото
  36.             mc.postToChat("On " +  str(y) + "height gold_ore. Fast mine it!" )
  37.  
  38.         if blockType == 21: # лазурит
  39.             mc.postToChat("On " +  str(y) + "height lapis_ore. Fast mine it!" )
  40.  
  41.  
  42.         if blockType == 73: # редстоун
  43.             mc.postToChat("On " +  str(y) + "height redstone_ore. Fast mine it" )
  44.  
  45.  
  46.         if blockType == 129: # изумруд
  47.             mc.postToChat("On " +  str(y) + "height emerald_ore. Fast mine it!" )
  48.        
  49.         if y == 0:
  50.                            
  51.             mc.postToChat("There are no more ore. Find another place. Next scanning in 2 seconds get ready " )
  52.             time.sleep(2)    
  53.        
  54. while True:
  55.     getDiamonds()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement