-
Notifications
You must be signed in to change notification settings - Fork 0
/
testRoad.py
24 lines (22 loc) · 926 Bytes
/
testRoad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import generation.road as road
from generation.resources import *
from generation.chestGeneration import *
from generation.structures.structures import *
from generation.structureManager import *
from generation.floodFill import *
import generation.resourcesLoader as resLoader
from utils.worldModification import *
from lib.worldLoader import WorldSlice
import random
#seed testing : -2997648135289524795
interface = interfaceUtils.Interface()
area = (-128, 0, -128, 128,255,128)
interfaceUtils.runCommand("execute at @p run setbuildarea ~-150 0 ~-150 ~150 255 ~150")
buildArea = interfaceUtils.requestBuildArea()
floodFill = FloodFill(area)
ws = WorldSlice(area[0], area[2], area[3], area[5])
test1 = road.Node([-53,26])
test2 = road.Node([-47,11])
chemin = road.Astar(test1,test2,[-48,14,-54,8],[-54,29,-63,23])
for i in chemin:
interfaceUtils.setBlock(i[0],floodFill.getHeight(i[0],i[1],ws) - 1,i[1],"minecraft:bricks")