File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 33Compatible with GDMC-HTTP ** >=1.0.0, <2.0.0** and Minecraft ** 1.20.2** .
44
55** Additions:**
6+ - Added ZERO_2D/ZERO_3D/ZERO constants to ` vector_tools ` . (Thanks [ Flashing-Blinkenlights] ( https://github.com/Flashing-Blinkenlights ) !)
67- Added various ordered vector list constants to ` vector_tools ` . (Thanks [ Flashing-Blinkenlights] ( https://github.com/Flashing-Blinkenlights ) !)
78- Added ` utils.rotateSequence ` . (Thanks [ Flashing-Blinkenlights] ( https://github.com/Flashing-Blinkenlights ) !)
89
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def __iter__(self) -> Iterator[bool]: ...
7575# == constants ==
7676
7777
78+ ZERO_2D = ivec2 (0 , 0 )
7879X_2D = ivec2 (1 , 0 )
7980Y_2D = ivec2 (0 , 1 )
8081XY_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+
150153X_3D = ivec3 (1 , 0 , 0 )
151154Y_3D = ivec3 (0 , 1 , 0 )
152155Z_3D = ivec3 (0 , 0 , 1 )
@@ -211,6 +214,7 @@ def _symmetricSpiraloidDirections3D(
211214# ==== aliases ====
212215
213216
217+ ZERO : ivec3 = ZERO_3D
214218X : ivec3 = X_3D
215219Y : ivec3 = Y_3D
216220Z : ivec3 = Z_3D
You can’t perform that action at this time.
0 commit comments