Skip to content

Commit 8dad2b1

Browse files
πŸ”€ Merge pull request #25 from phoenixr-codes/nbtx-migration
nbtx migration
2 parents 48c9908 + 0f0cd0a commit 8dad2b1

29 files changed

Lines changed: 223 additions & 202 deletions

β€Ž.gitignoreβ€Ž

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# artifacts
2+
*.mcpack
3+
*.mcaddon
4+
15
# editors & IDEs
26
.vscode
37

@@ -160,4 +164,4 @@ cython_debug/
160164
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161165
# and can be added to the global gitignore or merged into this file. For a more nuclear
162166
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163-
#.idea/
167+
#.idea/

β€Ž.readthedocs.yamlβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2
44
build:
55
os: ubuntu-20.04
66
tools:
7-
python: "3.11"
7+
python: "3.13"
88

99
python:
1010
install:

β€Žexamples/README.mdβ€Ž

Lines changed: 0 additions & 12 deletions
This file was deleted.

β€Žexamples/area.pyβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
from mcstructure import Block, Structure
2+
from pathlib import Path
3+
4+
here = Path(__file__).parent
25

36
struct = Structure(
47
(6, 6, 6), # Size of the Structure ε£°ζ˜Žη»“ζž„ε€§ε°οΌŒζ³¨ζ„θΏ™ζ˜―ε€§ε°οΌŒε…Άεζ ‡δ»Ž0εΌ€ε§‹
@@ -13,5 +16,5 @@
1316
print(struct._get_str_array(with_namespace=False, with_states=True))
1417

1518
# write into file 写ε…₯ζ–‡δ»Ά
16-
with open("structures/my_create.mcstructure", "wb") as f:
19+
with here.joinpath("out/area.mcstructure").open("wb") as f:
1720
struct.dump(f)

β€Žexamples/copystruct.pyβ€Ž

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from mcstructure import Structure
2+
from pathlib import Path
23

3-
with open("examples/structures/large_nether.mcstructure", "rb") as f:
4+
here = Path(__file__).parent
5+
6+
with here.joinpath("../samples/large_nether.mcstructure").open("rb") as f:
47
struct = Structure.load(f)
58

6-
with open("examples/pack/src/structures/large_nether.mcstructure", "wb") as f:
9+
with here.joinpath("out/large_nether.mcstructure").open("wb") as f:
710
struct.dump(f)

β€Žexamples/diagonal.pyβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from mcstructure import Block, Structure
2+
from pathlib import Path
23

4+
here = Path(__file__).parent
35

46
BLOCK = Block("minecraft:grass")
57

6-
struct = Structure((10, 10, 10), BLOCK)
8+
struct = Structure((10, 10, 10), Block("minecraft:air"))
79
(
810
struct.set_block((0, 0, 0), BLOCK)
911
.set_block((1, 1, 1), BLOCK)
@@ -13,5 +15,5 @@
1315
.set_block((5, 5, 5), BLOCK)
1416
)
1517

16-
with open("examples/my_diagonal.mcstructure", "wb") as f:
18+
with here.joinpath("out/diagonal.mcstructure").open("wb") as f:
1719
struct.dump(f)
2 KB
Binary file not shown.
8.12 KB
Binary file not shown.
File renamed without changes.
382 Bytes
Binary file not shown.

0 commit comments

Comments
Β (0)