Skip to content

Commit 857d5a7

Browse files
Merge branch 'master' into master
2 parents 305acb8 + 839ac5e commit 857d5a7

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
Compatible with GDMC-HTTP **>=1.0.0, <2.0.0** and Minecraft **1.20.2**.
44

5+
6+
# 7.3.0
7+
8+
Compatible with GDMC-HTTP **>=1.0.0, <2.0.0** and Minecraft **1.20.2**.
9+
510
**Additions:**
11+
- Added ZERO_2D/ZERO_3D/ZERO constants to `vector_tools`. (Thanks [Flashing-Blinkenlights](https://github.com/Flashing-Blinkenlights)!)
612
- Added various ordered vector list constants to `vector_tools`. (Thanks [Flashing-Blinkenlights](https://github.com/Flashing-Blinkenlights)!)
713
- Added `utils.rotateSequence`. (Thanks [Flashing-Blinkenlights](https://github.com/Flashing-Blinkenlights)!)
814

src/gdpc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
__maintainer_email__ = "[email protected]"
1414
__license__ = "MIT"
1515
__copyright__ = "Copyright 2022-2024 Arthur van der Staaij, Copyright 2021-2022 Blinkenlights, Copyright 2020-2021 Nils Gawlik"
16-
__version__ = "7.2.0"
16+
__version__ = "7.3.0"
1717

1818

1919
from .vector_tools import Rect, Box

src/gdpc/vector_tools.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def __iter__(self) -> Iterator[bool]: ...
7575
# == constants ==
7676

7777

78+
ZERO_2D = ivec2(0, 0)
7879
X_2D = ivec2(1, 0)
7980
Y_2D = ivec2(0, 1)
8081
XY_2D: ivec2 = X_2D + Y_2D
@@ -121,7 +122,7 @@ def _spiraloidDirections3D(
121122
if include_up: yield UP_3D # ...the UP vector...
122123
if top_pattern: yield from (UP_3D + c for c in top_pattern) # ...the upward diagonal vectors...
123124
if center_pattern: yield from center_pattern[:len(center_pattern)//2] # ...the first half of the horizontal vectors...
124-
if include_center: yield ivec3(0, 0, 0) # ...the origin...
125+
if include_center: yield ZERO_3D # ...the origin...
125126
if center_pattern: yield from center_pattern[len(center_pattern)//2:] # ...the second half of the horizontal vectors...
126127
if bottom_pattern: yield from (DOWN_3D + c for c in bottom_pattern) # ...the downward diagonal vectors...
127128
if include_down: yield DOWN_3D # ...and the DOWN vector.
@@ -147,6 +148,8 @@ def _symmetricSpiraloidDirections3D(
147148
# == constants ==
148149

149150

151+
ZERO_3D = ivec3(0, 0, 0)
152+
150153
X_3D = ivec3(1, 0, 0)
151154
Y_3D = ivec3(0, 1, 0)
152155
Z_3D = ivec3(0, 0, 1)
@@ -211,6 +214,7 @@ def _symmetricSpiraloidDirections3D(
211214
# ==== aliases ====
212215

213216

217+
ZERO: ivec3 = ZERO_3D
214218
X: ivec3 = X_3D
215219
Y: ivec3 = Y_3D
216220
Z: ivec3 = Z_3D

0 commit comments

Comments
 (0)