Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
887 B
2
Indexable
Never
def etap3(z):
    #dodajemy kolejny segment toru
    blocks.fill(BEDROCK, world(x-10,y-1,z-2), world(x+10,y+10,z+30), FillOperation.HOLLOW)
    blocks.fill(BEDROCK, world(x-10,y-1,z-3), world(x+10, y-1, z+3)) # zamienia blok pod graczem
    blocks.fill(BEDROCK, world(x-10,y-1,z-3), world(x+10, y+10, z-5)) # buduje sciane za graczem
    blocks.fill(DIAMOND_BLOCK, world(x-10, y-1, z+5), world(x+10, y-1, z+20))# 1. DOBUDOWAC TOR Z DIAMENTOW 
    blocks.fill(COBBLESTONE, world(x-10,y-1, z+23), world(x+10, y-1, z+27)) # Coblestone
    # 2. W PETLI ZAWSZE 
    while True: 
        # 2.1 sprawdzic czy gracz stoi na diamentach 
        if blocks.test_for_block(DIAMOND_BLOCK, pos(0, -1, 0)):
            # 2.2 Jesli stoi na diamentach(prawda) to spawn tnt -> 
            for i in range(20):
                mobs.spawn(TNT,randpos(world(x-8,y+3,z+3), world(x+8,y+3,z+20)))
        break