SHOW:
|
|
- or go back to the newest paste.
| 1 | #function responsible for creating the arena | |
| 2 | def arenaBuilder(): | |
| 3 | #setting the time to night | |
| 4 | gameplay.time_set(DayTime.NIGHT) | |
| 5 | #getting the current coordinates of the player with a slight offset so the arena isn't built on the player | |
| 6 | position=positions.add(player.position(), pos(10, 0, 0)) | |
| 7 | x=position.get_value(Axis.X) | |
| 8 | y=position.get_value(Axis.Y) | |
| 9 | z=position.get_value(Axis.Z) | |
| 10 | #creating the arena | |
| 11 | blocks.fill(STONE_BRICKS, world(x,y,z),world(x+40,y+4,z+40)) | |
| 12 | #putting diamond blocks in the corners which are beacon blocks need so it lets out a beam of light | |
| 13 | blocks.fill(DIAMOND_BLOCK, world(x,y+4,z),world(x+2,y+4,z+2)) | |
| 14 | blocks.fill(DIAMOND_BLOCK, world(x+38,y+4,z),world(x+40,y+4,z+2)) | |
| 15 | blocks.fill(DIAMOND_BLOCK, world(x,y+4,z+38),world(x+2,y+4,z+40)) | |
| 16 | blocks.fill(DIAMOND_BLOCK, world(x+38,y+4,z+38),world(x+40,y+4,z+40)) | |
| 17 | ||
| 18 | #adding beacon blocks | |
| 19 | blocks.place(BEACON, world(x+1,y+5,z+1)) | |
| 20 | blocks.place(BEACON, world(x+39,y+5,z+1)) | |
| 21 | blocks.place(BEACON, world(x+1,y+5,z+39)) | |
| 22 | blocks.place(BEACON, world(x+39,y+5,z+39)) | |
| 23 | ||
| 24 | #creating stairs | |
| 25 | for i in range(15,21): | |
| 26 | shapes.line(STONE_BRICK_STAIRS, world(x-4,y,z+i), world(x,y+4,z+i)) | |
| 27 | ||
| 28 | player.on_chat("arena", arenaBuilder) |