Advertisement
giganciprogramowania

l4 pajęcze siedlisko

Aug 23rd, 2021
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. pozycja=player.position()
  2. x=pozycja.get_value(Axis.X)
  3. y=pozycja.get_value(Axis.Y)
  4. z=pozycja.get_value(Axis.Z)
  5.  
  6.  
  7. def spiderSpawn():
  8.  
  9. gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER))
  10. #czyszczenie ekwipunku
  11. player.execute("/clear")
  12. mobs.give(mobs.target(NEAREST_PLAYER), DIAMOND_AXE, 1)
  13. mobs.give(mobs.target(NEAREST_PLAYER), BOW, 1)
  14. mobs.give(mobs.target(NEAREST_PLAYER), ARROW, 64)
  15. mobs.give(mobs.target(NEAREST_PLAYER), TORCH, 3)
  16.  
  17. #używamy pętli aby utworzyć pajęczyny
  18. for i in range(50):
  19.  
  20. blocks.place(COBWEB, randpos(world(x-4,y+1,z), world(x+9,y+7,z+45)))
  21.  
  22. for i in range(5):
  23.  
  24. mobs.spawn(SPIDER, randpos(world(x-4,y+1,z+10), world(x+9,y+7,z+45)))
  25.  
  26. def jaskinia():
  27.  
  28. blocks.fill(BEDROCK, world(x-5,y-1,z-1),world(x+10,y+10,z+50),FillOperation.HOLLOW)
  29. blocks.place(GLOWSTONE, world(x,y,z+49))
  30. spiderSpawn()
  31.  
  32. player.on_chat("pająki", jaskinia)
  33.  
  34. #zdarzenie na zniszczenie konkretnego bloku
  35. def zniszczenieBloku():
  36. gameplay.set_game_mode(CREATIVE, mobs.target(NEAREST_PLAYER))
  37. player.teleport(pos(50, 1, 50))
  38. blocks.on_block_broken(GLOWSTONE, zniszczenieBloku)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement