def jaskinia(): blocks.fill(SNOW, world(-11, -61, -31), world(11, -55, 6), FillOperation.HOLLOW) blocks.fill(PACKED_ICE, world(-10, -61, -30), world(10, -55, 5), FillOperation.HOLLOW) blocks.fill(AIR, world(-11, -55, -31), world(11, -55, 6), FillOperation.REPLACE) blocks.fill(SEA_LANTERN, world(-9, -56, -10), world(9, -56, 4), FillOperation.REPLACE) blocks.fill(GLASS, world(-9, -60, -10), world(9, -57, -10), FillOperation.REPLACE) blocks.fill(SNOW, world(-10, -60, -11), world(10, -56, -11), FillOperation.REPLACE) blocks.fill(WHITE_TERRACOTTA, world(-9, -61, -9),world(9, -61, -7), FillOperation.REPLACE) blocks.fill(OBSIDIAN, world(-9, -62, -15), world(9, -61, -13), FillOperation.REPLACE) blocks.fill(BRICKS, world(-9, -61, -20), world(9, -61, -22), FillOperation.REPLACE) blocks.fill(LAVA, world(-9, -62, -19), world(9, -61, -16), FillOperation.REPLACE) def start(): jaskinia() ekwipunek() moby() player.teleport(world(0, -60, 3)) gameplay.time_set(DayTime.DAY) gameplay.set_game_mode(SURVIVAL, mobs.target(NEAREST_PLAYER)) gameplay.set_difficulty(HARD) agent.teleport_to_player() gameplay.title(mobs.target(NEAREST_PLAYER), "Gra rozpoczęta!", "") player.on_chat("start", start) def ekwipunek(): player.execute("/clear") mobs.give(mobs.target(NEAREST_PLAYER), IRON_SWORD, 1) mobs.give(mobs.target(NEAREST_PLAYER), IRON_HELMET, 1) mobs.give(mobs.target(NEAREST_PLAYER), IRON_CHESTPLATE, 1) mobs.give(mobs.target(NEAREST_PLAYER), IRON_LEGGINGS, 1) mobs.give(mobs.target(NEAREST_PLAYER), IRON_BOOTS, 1) mobs.give(mobs.target(NEAREST_PLAYER), COOKED_PORKCHOP, 32) def moby(): for i in range(5): mobs.spawn(POLAR_BEAR, world(0, -60, -5)) for i in range(3): mobs.spawn(SKELETON, world(0, -60, -5)) def zniszczonoSzklo(): agent.teleport(world(0, -60, -15), NORTH) blocks.on_block_broken(GLASS, zniszczonoSzklo) while True: if blocks.test_for_block(WHITE_TERRACOTTA, pos(0, -1, 0)): mobs.give(mobs.target(NEAREST_PLAYER), DIAMOND_PICKAXE, 1) blocks.fill(PACKED_ICE, world(-9, -61, -9), world(9, -61, -7), FillOperation.REPLACE) gameplay.title(mobs.target(NEAREST_PLAYER), "Zniszcz szklaną ścianę", "") elif blocks.test_for_block(OBSIDIAN, pos(0, -1, 0)): gameplay.title(mobs.target(NEAREST_PLAYER), "Wybuduj most", "Użyj do tego agenta") blocks.fill(PACKED_ICE, world(-9, -62, -15), world(9, -61, -13), FillOperation.HOLLOW) elif blocks.test_for_block(BRICKS, pos(0, -1, 0)): gameplay.title(mobs.target(NEAREST_PLAYER), "Pokonaj wiedźmę!", "") gameplay.time_set(DayTime.NIGHT) mobs.spawn(WITCH, world(0, -60, -25)) for i in range(10): mobs.spawn(SKELETON, world(0, -60, -25)) blocks.fill(PACKED_ICE, world(-9, -61, -20), world(9, -61, -22), FillOperation.REPLACE) def most(): agent.teleport(world(0, -60, -15), NORTH) agent.set_slot(1) agent.set_item(STONE, 64, 1) for i in range(4): agent.move(FORWARD, 1) agent.place(DOWN) player.on_chat("buduj", most)