Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pozycja=player.position()
- x=pozycja.get_value(Axis.X)
- y=pozycja.get_value(Axis.Y)
- z=pozycja.get_value(Axis.Z)
- def spiderSpawn():
- gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER))
- #czyszczenie ekwipunku
- player.execute("/clear")
- mobs.give(mobs.target(NEAREST_PLAYER), DIAMOND_AXE, 1)
- mobs.give(mobs.target(NEAREST_PLAYER), BOW, 1)
- mobs.give(mobs.target(NEAREST_PLAYER), ARROW, 64)
- mobs.give(mobs.target(NEAREST_PLAYER), TORCH, 3)
- #używamy pętli aby utworzyć pajęczyny
- for i in range(50):
- blocks.place(COBWEB, randpos(world(x-4,y+1,z), world(x+9,y+7,z+45)))
- for i in range(5):
- mobs.spawn(SPIDER, randpos(world(x-4,y+1,z+10), world(x+9,y+7,z+45)))
- def jaskinia():
- blocks.fill(BEDROCK, world(x-5,y-1,z-1),world(x+10,y+10,z+50),FillOperation.HOLLOW)
- blocks.place(GLOWSTONE, world(x,y,z+49))
- spiderSpawn()
- player.on_chat("pająki", jaskinia)
- #zdarzenie na zniszczenie konkretnego bloku
- def zniszczenieBloku():
- gameplay.set_game_mode(CREATIVE, mobs.target(NEAREST_PLAYER))
- player.teleport(pos(50, 1, 50))
- blocks.on_block_broken(GLOWSTONE, zniszczenieBloku)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement