-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnether_linker.py
More file actions
24 lines (20 loc) · 944 Bytes
/
nether_linker.py
File metadata and controls
24 lines (20 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3
"""
@file nether_linker.py
@brief Calculates coordinates to link Nether portals.
@author Evan Elias Young
@date 2017-09-19
@date 2022-02-04
@copyright Copyright 2022 Evan Elias Young. All rights reserved.
"""
if __name__ == "__main__":
overWorld1: list[str] = input("Overworld Coordinates (x,z)\n").split(",")
underWorld1: list[str] = input("Nether Coordinates (x,z)\n").split(",")
overWorld2: list[str] = input("Desired Overworld Coordinates (x,z)\n").split(",")
diff: list[int] = list(map(lambda a, b: int(b) - int(a), overWorld1, overWorld2))
netherDiff: list[int] = list(map(lambda e: e // 8, diff))
underWorld2: list[int] = list(
map(lambda a, b: int(a) + int(b), underWorld1, netherDiff)
)
print(f"\n\nMake the overworld portal at {overWorld2[0]}, y?, {overWorld2[1]}")
print(f"Make the nether portal at {underWorld2[0]}, y?, {underWorld2[1]}")