Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def buildPirateShip():
- shipWidth = 7
- shipLength = 15
- shipHeight = 5
- shipPosition = world(0, -48, (islandLength // 2) + 5)
- for x in range(-shipWidth // 2, shipWidth // 2 + 1):
- for z in range(-shipLength // 2, shipLength // 2 + 1):
- for y in range(shipHeight):
- if y == 0:
- blocks.place(PLANKS_OAK, positions.add(shipPosition, pos(x, y, z)))
- elif y == shipHeight - 1 and -shipWidth // 4 <= x <= shipWidth // 4 and -shipLength // 4 <= z <= shipLength // 4:
- blocks.place(PLANKS_OAK, positions.add(shipPosition, pos(x, y, z)))
- elif y > 0 and y < shipHeight - 1 and ((x == -shipWidth // 2 or x == shipWidth // 2) or (z == -shipLength // 2 or z == shipLength // 2)):
- blocks.place(PLANKS_OAK, positions.add(shipPosition, pos(x, y, z)))
- # Adding a mast
- for y in range(shipHeight, shipHeight * 3):
- blocks.place(PLANKS_OAK, positions.add(shipPosition, pos(0, y, 0)))
- # Adding sails
- for y in range(shipHeight + 1, shipHeight * 3 - 1):
- for z in range(-shipLength // 4, shipLength // 4 + 1):
- if -y + shipHeight <= z <= y - shipHeight:
- blocks.place(WOOL, positions.add(shipPosition, pos(0, y, z)))
- def ship():
- buildPirateShip()
- player.on_chat("ship", ship)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement