Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes offset for heightmap on Start_Here as well. #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions Start_Here.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,23 @@ def buildPerimeter():

for x in range(STARTX, ENDX + 1):
# the northern wall
y = heights[(x, STARTZ)]
y = heights[(x - STARTX, 0)]
GEO.placeCuboid(x, y - 2, STARTZ, x, y, STARTZ, "granite")
GEO.placeCuboid(x, y + 1, STARTZ, x, y + 4, STARTZ, "granite_wall")
# the southern wall
y = heights[(x, ENDZ)]
y = heights[(x - STARTX, ENDZ - STARTZ)]
GEO.placeCuboid(x, y - 2, ENDZ, x, y, ENDZ, "red_sandstone")
GEO.placeCuboid(x, y + 1, ENDZ, x, y + 4, ENDZ, "red_sandstone_wall")

print("Building north-south walls...")
# building the north-south walls
for z in range(STARTZ, ENDZ + 1):
# the western wall
y = heights[(STARTX, z)]
y = heights[(0, z - STARTZ)]
GEO.placeCuboid(STARTX, y - 2, z, STARTX, y, z, "sandstone")
GEO.placeCuboid(STARTX, y + 1, z, STARTX, y + 4, z, "sandstone_wall")
# the eastern wall
y = heights[(ENDX, z)]
y = heights[(ENDX - STARTX, z - STARTZ)]
GEO.placeCuboid(ENDX, y - 2, z, ENDX, y, z, "prismarine")
GEO.placeCuboid(ENDX, y + 1, z, ENDX, y + 4, z, "prismarine_wall")

Expand All @@ -128,12 +128,12 @@ def buildRoads():

print("Calculating road height...")
# caclulating the average height along where we want to build our road
y = heights[(xaxis, zaxis)]
y = heights[(xaxis - STARTX, zaxis - STARTZ)]
for x in range(STARTX, ENDX + 1):
newy = heights[(x, zaxis)]
newy = heights[(x - STARTX, zaxis - STARTZ)]
y = (y + newy) // 2
for z in range(STARTZ, ENDZ + 1):
newy = heights[(xaxis, z)]
newy = heights[(xaxis - STARTX, z - STARTZ)]
y = (y + newy) // 2

# GLOBAL
Expand Down Expand Up @@ -269,7 +269,8 @@ def buildTower(x, z):
# possible so you can find mistakes more easily

try:
height = WORLDSLICE.heightmaps["MOTION_BLOCKING"][(STARTX, STARTY)]
# height = WORLDSLICE.heightmaps["MOTION_BLOCKING"][(STARTX, STARTY)]
height = WORLDSLICE.heightmaps["MOTION_BLOCKING"][(0, 0)]
INTF.runCommand(f"tp @a {STARTX} {height} {STARTZ}")
print(f"/tp @a {STARTX} {height} {STARTZ}")
buildPerimeter()
Expand Down