amulet-core 2.0.4a1.post250728120835__cp312-cp312-win_amd64.whl → 2.0.5a0__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amulet/core/__init__.py +1 -0
- amulet/core/__init__.pyi +1 -1
- amulet/core/_amulet_core.cp312-win_amd64.pyd +0 -0
- amulet/core/_amulet_core.pyi +1 -1
- amulet/core/_version.py +3 -3
- amulet/core/amulet_core.dll +0 -0
- amulet/core/amulet_core.lib +0 -0
- amulet/core/amulet_coreConfig.cmake +2 -0
- amulet/core/biome/__init__.pyi +1 -1
- amulet/core/block/__init__.pyi +1 -1
- amulet/core/block_entity/__init__.pyi +1 -1
- amulet/core/chunk/__init__.pyi +1 -1
- amulet/core/chunk/component/__init__.pyi +1 -1
- amulet/core/chunk/component/block_component.pyi +1 -1
- amulet/core/chunk/component/section_array_map.pyi +1 -1
- amulet/core/entity/__init__.pyi +1 -1
- amulet/core/palette/__init__.pyi +1 -1
- amulet/core/palette/biome_palette.pyi +1 -1
- amulet/core/palette/block_palette.pyi +1 -1
- amulet/core/selection/__init__.pyi +20 -3
- amulet/core/selection/box.hpp +27 -16
- amulet/core/selection/box.pyi +18 -8
- amulet/core/selection/box_group.hpp +89 -0
- amulet/core/selection/{group.pyi → box_group.pyi} +29 -33
- amulet/core/selection/cuboid.hpp +36 -0
- amulet/core/selection/cuboid.pyi +48 -0
- amulet/core/selection/ellipsoid.hpp +37 -0
- amulet/core/selection/ellipsoid.pyi +46 -0
- amulet/core/selection/shape.hpp +53 -0
- amulet/core/selection/shape.pyi +39 -0
- amulet/core/selection/shape_group.hpp +61 -0
- amulet/core/selection/shape_group.pyi +60 -0
- amulet/core/version/__init__.pyi +1 -1
- {amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/METADATA +6 -5
- amulet_core-2.0.5a0.dist-info/RECORD +54 -0
- amulet/core/selection/group.hpp +0 -80
- amulet_core-2.0.4a1.post250728120835.dist-info/RECORD +0 -46
- {amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/WHEEL +0 -0
- {amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/entry_points.txt +0 -0
- {amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/top_level.txt +0 -0
amulet/core/__init__.py
CHANGED
amulet/core/__init__.pyi
CHANGED
|
Binary file
|
amulet/core/_amulet_core.pyi
CHANGED
amulet/core/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-09-01T13:18:18+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.0.
|
|
14
|
+
"full-revisionid": "d46ea97b2c67f05ece822c4af0819fa94db55cf3",
|
|
15
|
+
"version": "2.0.5a0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
amulet/core/amulet_core.dll
CHANGED
|
Binary file
|
amulet/core/amulet_core.lib
CHANGED
|
Binary file
|
|
@@ -3,6 +3,7 @@ if (NOT TARGET amulet_core)
|
|
|
3
3
|
|
|
4
4
|
find_package(amulet_io CONFIG REQUIRED)
|
|
5
5
|
find_package(amulet_nbt CONFIG REQUIRED)
|
|
6
|
+
find_package(amulet_utils CONFIG REQUIRED)
|
|
6
7
|
|
|
7
8
|
set(amulet_core_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../..")
|
|
8
9
|
find_library(amulet_core_LIBRARY NAMES amulet_core PATHS "${CMAKE_CURRENT_LIST_DIR}")
|
|
@@ -16,6 +17,7 @@ if (NOT TARGET amulet_core)
|
|
|
16
17
|
add_library(amulet_core INTERFACE)
|
|
17
18
|
target_link_libraries(amulet_core INTERFACE amulet_io)
|
|
18
19
|
target_link_libraries(amulet_core INTERFACE amulet_nbt)
|
|
20
|
+
target_link_libraries(amulet_core INTERFACE amulet_utils)
|
|
19
21
|
target_link_libraries(amulet_core INTERFACE amulet_core_bin)
|
|
20
22
|
target_include_directories(amulet_core INTERFACE ${amulet_core_INCLUDE_DIR})
|
|
21
23
|
endif()
|
amulet/core/biome/__init__.pyi
CHANGED
amulet/core/block/__init__.pyi
CHANGED
amulet/core/chunk/__init__.pyi
CHANGED
|
@@ -7,7 +7,7 @@ import amulet.core.chunk.component.section_array_map
|
|
|
7
7
|
import amulet.core.palette.block_palette
|
|
8
8
|
import amulet.core.version
|
|
9
9
|
|
|
10
|
-
__all__ = ["BlockComponent", "BlockComponentData"]
|
|
10
|
+
__all__: list[str] = ["BlockComponent", "BlockComponentData"]
|
|
11
11
|
|
|
12
12
|
class BlockComponent:
|
|
13
13
|
ComponentID: typing.ClassVar[str] = "Amulet::BlockComponent"
|
amulet/core/entity/__init__.pyi
CHANGED
amulet/core/palette/__init__.pyi
CHANGED
|
@@ -5,4 +5,4 @@ from amulet.core.palette.block_palette import BlockPalette
|
|
|
5
5
|
|
|
6
6
|
from . import biome_palette, block_palette
|
|
7
7
|
|
|
8
|
-
__all__ = ["BiomePalette", "BlockPalette", "biome_palette", "block_palette"]
|
|
8
|
+
__all__: list[str] = ["BiomePalette", "BlockPalette", "biome_palette", "block_palette"]
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
from amulet.core.selection.box import SelectionBox
|
|
4
|
-
from amulet.core.selection.
|
|
4
|
+
from amulet.core.selection.box_group import SelectionBoxGroup
|
|
5
|
+
from amulet.core.selection.cuboid import SelectionCuboid
|
|
6
|
+
from amulet.core.selection.ellipsoid import SelectionEllipsoid
|
|
7
|
+
from amulet.core.selection.shape import SelectionShape
|
|
8
|
+
from amulet.core.selection.shape_group import SelectionShapeGroup
|
|
5
9
|
|
|
6
|
-
from . import box,
|
|
10
|
+
from . import box, box_group, cuboid, ellipsoid, shape, shape_group
|
|
7
11
|
|
|
8
|
-
__all__ = [
|
|
12
|
+
__all__: list[str] = [
|
|
13
|
+
"SelectionBox",
|
|
14
|
+
"SelectionBoxGroup",
|
|
15
|
+
"SelectionCuboid",
|
|
16
|
+
"SelectionEllipsoid",
|
|
17
|
+
"SelectionShape",
|
|
18
|
+
"SelectionShapeGroup",
|
|
19
|
+
"box",
|
|
20
|
+
"box_group",
|
|
21
|
+
"cuboid",
|
|
22
|
+
"ellipsoid",
|
|
23
|
+
"shape",
|
|
24
|
+
"shape_group",
|
|
25
|
+
]
|
amulet/core/selection/box.hpp
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
namespace Amulet {
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class Matrix4x4;
|
|
10
|
+
class SelectionBoxGroup;
|
|
10
11
|
|
|
11
|
-
//
|
|
12
|
-
class SelectionBox {
|
|
12
|
+
// An axis aligned cuboid selection box.
|
|
13
|
+
class AMULET_CORE_EXPORT SelectionBox {
|
|
13
14
|
private:
|
|
14
15
|
std::int64_t _min_x;
|
|
15
16
|
std::int64_t _min_y;
|
|
@@ -47,6 +48,17 @@ public:
|
|
|
47
48
|
_size_z = std::max(point_1[2], point_2[2]) - _min_z;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
SelectionBox(const SelectionBox& other)
|
|
52
|
+
: SelectionBox(
|
|
53
|
+
other.min_x(),
|
|
54
|
+
other.min_y(),
|
|
55
|
+
other.min_z(),
|
|
56
|
+
other.size_x(),
|
|
57
|
+
other.size_y(),
|
|
58
|
+
other.size_z())
|
|
59
|
+
{
|
|
60
|
+
}
|
|
61
|
+
|
|
50
62
|
// Accessors
|
|
51
63
|
std::int64_t min_x() const { return _min_x; }
|
|
52
64
|
std::int64_t min_y() const { return _min_y; }
|
|
@@ -62,25 +74,24 @@ public:
|
|
|
62
74
|
std::uint64_t size_y() const { return _size_y; }
|
|
63
75
|
std::uint64_t size_z() const { return _size_z; }
|
|
64
76
|
std::array<std::uint64_t, 3> shape() const { return { _size_x, _size_y, _size_z }; }
|
|
65
|
-
|
|
77
|
+
std::uint64_t volume() const { return _size_x * _size_y * _size_z; }
|
|
66
78
|
|
|
67
79
|
// Contains and intersects
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
bool contains_block(std::int64_t x, std::int64_t y, std::int64_t z) const;
|
|
81
|
+
bool contains_point(double x, double y, double z) const;
|
|
82
|
+
bool contains_box(const SelectionBox& other) const;
|
|
83
|
+
bool intersects(const SelectionBox& other) const;
|
|
84
|
+
bool intersects(const SelectionBoxGroup& other) const;
|
|
85
|
+
bool touches_or_intersects(const SelectionBox& other) const;
|
|
86
|
+
bool touches(const SelectionBox& other) const;
|
|
75
87
|
|
|
76
88
|
// Transform
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
SelectionBox translate(std::int64_t dx, std::int64_t dy, std::int64_t dz) const;
|
|
90
|
+
SelectionBoxGroup transform(const Matrix4x4&) const;
|
|
79
91
|
|
|
80
92
|
// Operators
|
|
81
|
-
|
|
93
|
+
std::strong_ordering operator<=>(const SelectionBox&) const;
|
|
94
|
+
bool operator==(const SelectionBox&) const;
|
|
82
95
|
};
|
|
83
96
|
|
|
84
97
|
} // namespace Amulet
|
|
85
|
-
|
|
86
|
-
#include "group.hpp"
|
amulet/core/selection/box.pyi
CHANGED
|
@@ -3,15 +3,16 @@ from __future__ import annotations
|
|
|
3
3
|
import types
|
|
4
4
|
import typing
|
|
5
5
|
|
|
6
|
-
import amulet.core.selection.
|
|
6
|
+
import amulet.core.selection.box_group
|
|
7
|
+
import amulet.utils.matrix
|
|
7
8
|
|
|
8
|
-
__all__ = ["SelectionBox"]
|
|
9
|
+
__all__: list[str] = ["SelectionBox"]
|
|
9
10
|
|
|
10
11
|
class SelectionBox:
|
|
11
12
|
"""
|
|
12
13
|
The SelectionBox class represents a single cuboid selection.
|
|
13
14
|
|
|
14
|
-
When combined with :class:`~amulet.api.selection.
|
|
15
|
+
When combined with :class:`~amulet.api.selection.SelectionBoxGroup` it can represent any arbitrary shape.
|
|
15
16
|
"""
|
|
16
17
|
|
|
17
18
|
@typing.overload
|
|
@@ -115,7 +116,9 @@ class SelectionBox:
|
|
|
115
116
|
"""
|
|
116
117
|
|
|
117
118
|
@typing.overload
|
|
118
|
-
def intersects(
|
|
119
|
+
def intersects(
|
|
120
|
+
self, other: amulet.core.selection.box_group.SelectionBoxGroup
|
|
121
|
+
) -> bool: ...
|
|
119
122
|
def touches(self, other: SelectionBox) -> bool:
|
|
120
123
|
"""
|
|
121
124
|
Method to check if this instance of :class:`SelectionBox` touches but does not intersect another SelectionBox.
|
|
@@ -132,15 +135,22 @@ class SelectionBox:
|
|
|
132
135
|
:return: True if the two :class:`SelectionBox` instances touch or intersect, False otherwise.
|
|
133
136
|
"""
|
|
134
137
|
|
|
138
|
+
def transform(
|
|
139
|
+
self, matrix: amulet.utils.matrix.Matrix4x4
|
|
140
|
+
) -> amulet.core.selection.box_group.SelectionBoxGroup:
|
|
141
|
+
"""
|
|
142
|
+
Transform this box by the given transformation matrix.
|
|
143
|
+
"""
|
|
144
|
+
|
|
135
145
|
def translate(
|
|
136
|
-
self,
|
|
146
|
+
self, dx: typing.SupportsInt, dy: typing.SupportsInt, dz: typing.SupportsInt
|
|
137
147
|
) -> SelectionBox:
|
|
138
148
|
"""
|
|
139
149
|
Create a new :class:`SelectionBox` based on this one with the coordinates moved by the given offset.
|
|
140
150
|
|
|
141
|
-
:param
|
|
142
|
-
:param
|
|
143
|
-
:param
|
|
151
|
+
:param dx: The x offset.
|
|
152
|
+
:param dy: The y offset.
|
|
153
|
+
:param dz: The z offset.
|
|
144
154
|
:return: The new selection with the given offset.
|
|
145
155
|
"""
|
|
146
156
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <array>
|
|
4
|
+
#include <concepts>
|
|
5
|
+
#include <ranges>
|
|
6
|
+
#include <set>
|
|
7
|
+
|
|
8
|
+
#include <amulet/core/dll.hpp>
|
|
9
|
+
|
|
10
|
+
#include "box.hpp"
|
|
11
|
+
|
|
12
|
+
namespace Amulet {
|
|
13
|
+
|
|
14
|
+
class AMULET_CORE_EXPORT SelectionBoxGroup {
|
|
15
|
+
private:
|
|
16
|
+
std::set<SelectionBox> _boxes;
|
|
17
|
+
|
|
18
|
+
public:
|
|
19
|
+
// Forwarding constructor
|
|
20
|
+
template <typename... Args>
|
|
21
|
+
SelectionBoxGroup(Args&&... args)
|
|
22
|
+
: _boxes(std::forward<Args>(args)...)
|
|
23
|
+
{
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
SelectionBoxGroup(std::initializer_list<SelectionBox> boxes)
|
|
27
|
+
: _boxes(boxes)
|
|
28
|
+
{
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Accessors
|
|
32
|
+
const std::set<SelectionBox>& get_boxes() const
|
|
33
|
+
{
|
|
34
|
+
return _boxes;
|
|
35
|
+
}
|
|
36
|
+
size_t count() const
|
|
37
|
+
{
|
|
38
|
+
return _boxes.size();
|
|
39
|
+
}
|
|
40
|
+
std::set<SelectionBox>::const_iterator begin() const
|
|
41
|
+
{
|
|
42
|
+
return _boxes.begin();
|
|
43
|
+
}
|
|
44
|
+
std::set<SelectionBox>::const_iterator end() const
|
|
45
|
+
{
|
|
46
|
+
return _boxes.end();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Bounds
|
|
50
|
+
std::int64_t min_x() const;
|
|
51
|
+
std::int64_t min_y() const;
|
|
52
|
+
std::int64_t min_z() const;
|
|
53
|
+
std::int64_t max_x() const;
|
|
54
|
+
std::int64_t max_y() const;
|
|
55
|
+
std::int64_t max_z() const;
|
|
56
|
+
std::array<std::int64_t, 3> min() const;
|
|
57
|
+
std::array<std::int64_t, 3> max() const;
|
|
58
|
+
std::pair<
|
|
59
|
+
std::array<std::int64_t, 3>,
|
|
60
|
+
std::array<std::int64_t, 3>>
|
|
61
|
+
bounds() const;
|
|
62
|
+
SelectionBox bounding_box() const;
|
|
63
|
+
|
|
64
|
+
// Contains and intersects
|
|
65
|
+
bool contains_block(std::int64_t x, std::int64_t y, std::int64_t z) const;
|
|
66
|
+
bool contains_point(double x, double y, double z) const;
|
|
67
|
+
bool intersects(const SelectionBox& other) const;
|
|
68
|
+
bool intersects(const SelectionBoxGroup& other) const;
|
|
69
|
+
|
|
70
|
+
// Transform
|
|
71
|
+
SelectionBoxGroup translate(std::int64_t dx, std::int64_t dy, std::int64_t dz) const;
|
|
72
|
+
SelectionBoxGroup transform(const Matrix4x4&) const;
|
|
73
|
+
|
|
74
|
+
// Operators
|
|
75
|
+
operator bool() const
|
|
76
|
+
{
|
|
77
|
+
return !_boxes.empty();
|
|
78
|
+
}
|
|
79
|
+
std::strong_ordering operator<=>(const SelectionBoxGroup& other) const = default;
|
|
80
|
+
bool operator==(const SelectionBoxGroup& rhs) const = default;
|
|
81
|
+
bool operator!=(const SelectionBoxGroup& rhs) const = default;
|
|
82
|
+
|
|
83
|
+
operator std::set<SelectionBox>() const
|
|
84
|
+
{
|
|
85
|
+
return _boxes;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
}
|
|
@@ -5,10 +5,11 @@ import types
|
|
|
5
5
|
import typing
|
|
6
6
|
|
|
7
7
|
import amulet.core.selection.box
|
|
8
|
+
import amulet.utils.matrix
|
|
8
9
|
|
|
9
|
-
__all__ = ["
|
|
10
|
+
__all__: list[str] = ["SelectionBoxGroup"]
|
|
10
11
|
|
|
11
|
-
class
|
|
12
|
+
class SelectionBoxGroup:
|
|
12
13
|
"""
|
|
13
14
|
A container for zero or more :class:`SelectionBox` instances.
|
|
14
15
|
|
|
@@ -18,17 +19,17 @@ class SelectionGroup:
|
|
|
18
19
|
__hash__: typing.ClassVar[None] = None # type: ignore
|
|
19
20
|
def __bool__(self) -> bool:
|
|
20
21
|
"""
|
|
21
|
-
|
|
22
|
+
Are there any selections in the group.
|
|
22
23
|
"""
|
|
23
24
|
|
|
24
25
|
@typing.overload
|
|
25
|
-
def __eq__(self, arg0:
|
|
26
|
+
def __eq__(self, arg0: SelectionBoxGroup) -> bool:
|
|
26
27
|
"""
|
|
27
|
-
Does the contents of this :class:`
|
|
28
|
+
Does the contents of this :class:`SelectionBoxGroup` match the other :class:`SelectionBoxGroup`.
|
|
28
29
|
|
|
29
30
|
Note if the boxes do not exactly match this will return False even if the volume represented is the same.
|
|
30
31
|
|
|
31
|
-
:param other: The other :class:`
|
|
32
|
+
:param other: The other :class:`SelectionBoxGroup` to compare with.
|
|
32
33
|
:return: True if the boxes contained match.
|
|
33
34
|
"""
|
|
34
35
|
|
|
@@ -37,17 +38,9 @@ class SelectionGroup:
|
|
|
37
38
|
@typing.overload
|
|
38
39
|
def __init__(self) -> None:
|
|
39
40
|
"""
|
|
40
|
-
Create an empty
|
|
41
|
-
|
|
42
|
-
>>> SelectionGroup()
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
@typing.overload
|
|
46
|
-
def __init__(self, box: amulet.core.selection.box.SelectionBox) -> None:
|
|
47
|
-
"""
|
|
48
|
-
Create a SelectionGroup containing the given box.
|
|
41
|
+
Create an empty SelectionBoxGroup.
|
|
49
42
|
|
|
50
|
-
>>>
|
|
43
|
+
>>> SelectionBoxGroup()
|
|
51
44
|
"""
|
|
52
45
|
|
|
53
46
|
@typing.overload
|
|
@@ -55,9 +48,9 @@ class SelectionGroup:
|
|
|
55
48
|
self, boxes: collections.abc.Iterable[amulet.core.selection.box.SelectionBox]
|
|
56
49
|
) -> None:
|
|
57
50
|
"""
|
|
58
|
-
Create a
|
|
51
|
+
Create a SelectionBoxGroup from the boxes in the iterable.
|
|
59
52
|
|
|
60
|
-
>>>
|
|
53
|
+
>>> SelectionBoxGroup([
|
|
61
54
|
>>> SelectionBox(0, 0, 0, 1, 1, 1),
|
|
62
55
|
>>> SelectionBox(1, 1, 1, 1, 1, 1)
|
|
63
56
|
>>> ])
|
|
@@ -119,16 +112,21 @@ class SelectionGroup:
|
|
|
119
112
|
"""
|
|
120
113
|
|
|
121
114
|
@typing.overload
|
|
122
|
-
def intersects(self, other:
|
|
115
|
+
def intersects(self, other: SelectionBoxGroup) -> bool: ...
|
|
116
|
+
def transform(self, matrix: amulet.utils.matrix.Matrix4x4) -> SelectionBoxGroup:
|
|
117
|
+
"""
|
|
118
|
+
Transform the boxes in this group by the given transformation matrix.
|
|
119
|
+
"""
|
|
120
|
+
|
|
123
121
|
def translate(
|
|
124
|
-
self,
|
|
125
|
-
) ->
|
|
122
|
+
self, dx: typing.SupportsInt, dy: typing.SupportsInt, dz: typing.SupportsInt
|
|
123
|
+
) -> SelectionBoxGroup:
|
|
126
124
|
"""
|
|
127
|
-
Create a new :class:`
|
|
125
|
+
Create a new :class:`SelectionBoxGroup` based on this one with the coordinates moved by the given offset.
|
|
128
126
|
|
|
129
|
-
:param
|
|
130
|
-
:param
|
|
131
|
-
:param
|
|
127
|
+
:param dx: The x offset.
|
|
128
|
+
:param dy: The y offset.
|
|
129
|
+
:param dz: The z offset.
|
|
132
130
|
:return: The new selection with the given offset.
|
|
133
131
|
"""
|
|
134
132
|
|
|
@@ -148,6 +146,12 @@ class SelectionGroup:
|
|
|
148
146
|
:raises RuntimeError: If there are no boxes in the selection.
|
|
149
147
|
"""
|
|
150
148
|
|
|
149
|
+
@property
|
|
150
|
+
def boxes(self) -> collections.abc.Iterator[amulet.core.selection.box.SelectionBox]:
|
|
151
|
+
"""
|
|
152
|
+
An iterator of the :class:`SelectionBox` instances stored for this group.
|
|
153
|
+
"""
|
|
154
|
+
|
|
151
155
|
@property
|
|
152
156
|
def max(self) -> tuple[int, int, int]:
|
|
153
157
|
"""
|
|
@@ -211,11 +215,3 @@ class SelectionGroup:
|
|
|
211
215
|
|
|
212
216
|
:raises RuntimeError: If there are no boxes in the selection.
|
|
213
217
|
"""
|
|
214
|
-
|
|
215
|
-
@property
|
|
216
|
-
def selection_boxes(
|
|
217
|
-
self,
|
|
218
|
-
) -> collections.abc.Iterator[amulet.core.selection.box.SelectionBox]:
|
|
219
|
-
"""
|
|
220
|
-
An iterator of the :class:`SelectionBox` instances stored for this group.
|
|
221
|
-
"""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <amulet/core/dll.hpp>
|
|
4
|
+
|
|
5
|
+
#include "shape.hpp"
|
|
6
|
+
|
|
7
|
+
namespace Amulet {
|
|
8
|
+
|
|
9
|
+
class AMULET_CORE_EXPORT SelectionCuboid : public SelectionShape {
|
|
10
|
+
public:
|
|
11
|
+
SelectionCuboid(const Matrix4x4&);
|
|
12
|
+
|
|
13
|
+
SelectionCuboid(
|
|
14
|
+
double min_x,
|
|
15
|
+
double min_y,
|
|
16
|
+
double min_z,
|
|
17
|
+
double size_x,
|
|
18
|
+
double size_y,
|
|
19
|
+
double size_z
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
SelectionCuboid(const SelectionCuboid& other);
|
|
23
|
+
|
|
24
|
+
std::unique_ptr<SelectionShape> copy() const override;
|
|
25
|
+
explicit operator std::set<SelectionBox>() const override;
|
|
26
|
+
|
|
27
|
+
// Transform
|
|
28
|
+
SelectionCuboid translate_cuboid(double dx, double dy, double dz) const;
|
|
29
|
+
SelectionCuboid transform_cuboid(const Matrix4x4&) const;
|
|
30
|
+
std::unique_ptr<SelectionShape> transform(const Matrix4x4&) const override;
|
|
31
|
+
|
|
32
|
+
bool almost_equal(const SelectionCuboid&) const;
|
|
33
|
+
bool almost_equal(const SelectionShape&) const override;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
} // namespace Amulet
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import amulet.core.selection.shape
|
|
6
|
+
import amulet.utils.matrix
|
|
7
|
+
|
|
8
|
+
__all__: list[str] = ["SelectionCuboid"]
|
|
9
|
+
|
|
10
|
+
class SelectionCuboid(amulet.core.selection.shape.SelectionShape):
|
|
11
|
+
"""
|
|
12
|
+
The SelectionCuboid class represents a single spherical selection.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
@typing.overload
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
min_x: typing.SupportsFloat,
|
|
19
|
+
min_y: typing.SupportsFloat,
|
|
20
|
+
min_z: typing.SupportsFloat,
|
|
21
|
+
size_x: typing.SupportsFloat,
|
|
22
|
+
size_y: typing.SupportsFloat,
|
|
23
|
+
size_z: typing.SupportsFloat,
|
|
24
|
+
) -> None: ...
|
|
25
|
+
@typing.overload
|
|
26
|
+
def __init__(self, matrix: amulet.utils.matrix.Matrix4x4) -> None: ...
|
|
27
|
+
def transform(self, matrix: amulet.utils.matrix.Matrix4x4) -> SelectionCuboid:
|
|
28
|
+
"""
|
|
29
|
+
Create a new :class:`SelectionCuboid` based on this one transformed by the given matrix.
|
|
30
|
+
|
|
31
|
+
:param matrix: The matrix to transform by.
|
|
32
|
+
:return: The new selection with the added transform.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def translate(
|
|
36
|
+
self,
|
|
37
|
+
dx: typing.SupportsFloat,
|
|
38
|
+
dy: typing.SupportsFloat,
|
|
39
|
+
dz: typing.SupportsFloat,
|
|
40
|
+
) -> SelectionCuboid:
|
|
41
|
+
"""
|
|
42
|
+
Create a new :class:`SelectionCuboid` based on this one with the coordinates moved by the given offset.
|
|
43
|
+
|
|
44
|
+
:param dx: The x offset.
|
|
45
|
+
:param dy: The y offset.
|
|
46
|
+
:param dz: The z offset.
|
|
47
|
+
:return: The new selection with the given offset.
|
|
48
|
+
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <cstdint>
|
|
3
|
+
|
|
4
|
+
#include <amulet/core/dll.hpp>
|
|
5
|
+
|
|
6
|
+
#include "shape.hpp"
|
|
7
|
+
|
|
8
|
+
namespace Amulet {
|
|
9
|
+
|
|
10
|
+
class SelectionBox;
|
|
11
|
+
|
|
12
|
+
// The SelectionEllipsoid class represents a single spherical selection.
|
|
13
|
+
class AMULET_CORE_EXPORT SelectionEllipsoid : public SelectionShape {
|
|
14
|
+
public:
|
|
15
|
+
SelectionEllipsoid(const Matrix4x4&);
|
|
16
|
+
|
|
17
|
+
SelectionEllipsoid(
|
|
18
|
+
double x,
|
|
19
|
+
double y,
|
|
20
|
+
double z,
|
|
21
|
+
double radius);
|
|
22
|
+
|
|
23
|
+
SelectionEllipsoid(const SelectionEllipsoid& other);
|
|
24
|
+
|
|
25
|
+
std::unique_ptr<SelectionShape> copy() const override;
|
|
26
|
+
explicit operator std::set<SelectionBox>() const override;
|
|
27
|
+
|
|
28
|
+
// Transform
|
|
29
|
+
SelectionEllipsoid translate_ellipsoid(double dx, double dy, double dz) const;
|
|
30
|
+
SelectionEllipsoid transform_ellipsoid(const Matrix4x4&) const;
|
|
31
|
+
std::unique_ptr<SelectionShape> transform(const Matrix4x4&) const override;
|
|
32
|
+
|
|
33
|
+
bool almost_equal(const SelectionEllipsoid&) const;
|
|
34
|
+
bool almost_equal(const SelectionShape&) const override;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
} // namespace Amulet
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import amulet.core.selection.shape
|
|
6
|
+
import amulet.utils.matrix
|
|
7
|
+
|
|
8
|
+
__all__: list[str] = ["SelectionEllipsoid"]
|
|
9
|
+
|
|
10
|
+
class SelectionEllipsoid(amulet.core.selection.shape.SelectionShape):
|
|
11
|
+
"""
|
|
12
|
+
The SelectionEllipsoid class represents a single ellipsoid selection.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
@typing.overload
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
x: typing.SupportsFloat,
|
|
19
|
+
y: typing.SupportsFloat,
|
|
20
|
+
z: typing.SupportsFloat,
|
|
21
|
+
radius: typing.SupportsFloat,
|
|
22
|
+
) -> None: ...
|
|
23
|
+
@typing.overload
|
|
24
|
+
def __init__(self, matrix: amulet.utils.matrix.Matrix4x4) -> None: ...
|
|
25
|
+
def transform(self, matrix: amulet.utils.matrix.Matrix4x4) -> SelectionEllipsoid:
|
|
26
|
+
"""
|
|
27
|
+
Create a new :class:`SelectionEllipsoid` based on this one transformed by the given matrix.
|
|
28
|
+
|
|
29
|
+
:param matrix: The matrix to transform by.
|
|
30
|
+
:return: The new selection with the added transform.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def translate(
|
|
34
|
+
self,
|
|
35
|
+
dx: typing.SupportsFloat,
|
|
36
|
+
dy: typing.SupportsFloat,
|
|
37
|
+
dz: typing.SupportsFloat,
|
|
38
|
+
) -> SelectionEllipsoid:
|
|
39
|
+
"""
|
|
40
|
+
Create a new :class:`SelectionEllipsoid` based on this one with the coordinates moved by the given offset.
|
|
41
|
+
|
|
42
|
+
:param dx: The x offset.
|
|
43
|
+
:param dy: The y offset.
|
|
44
|
+
:param dz: The z offset.
|
|
45
|
+
:return: The new selection with the given offset.
|
|
46
|
+
"""
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <memory>
|
|
4
|
+
#include <set>
|
|
5
|
+
|
|
6
|
+
#include <amulet/utils/matrix.hpp>
|
|
7
|
+
|
|
8
|
+
#include <amulet/core/dll.hpp>
|
|
9
|
+
|
|
10
|
+
namespace Amulet {
|
|
11
|
+
|
|
12
|
+
class SelectionBox;
|
|
13
|
+
class SelectionBoxGroup;
|
|
14
|
+
|
|
15
|
+
class AMULET_CORE_EXPORT SelectionShape {
|
|
16
|
+
private:
|
|
17
|
+
Matrix4x4 _matrix;
|
|
18
|
+
public:
|
|
19
|
+
|
|
20
|
+
SelectionShape() = default;
|
|
21
|
+
SelectionShape(const Matrix4x4& matrix)
|
|
22
|
+
: _matrix(matrix)
|
|
23
|
+
{
|
|
24
|
+
}
|
|
25
|
+
virtual ~SelectionShape() = default;
|
|
26
|
+
|
|
27
|
+
const Matrix4x4& get_matrix() const;
|
|
28
|
+
|
|
29
|
+
// Create a copy of the class.
|
|
30
|
+
virtual std::unique_ptr<SelectionShape> copy() const = 0;
|
|
31
|
+
|
|
32
|
+
explicit operator std::unique_ptr<SelectionShape>() const
|
|
33
|
+
{
|
|
34
|
+
return copy();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Convert the shape into unit voxels.
|
|
38
|
+
virtual explicit operator std::set<SelectionBox>() const = 0;
|
|
39
|
+
explicit operator SelectionBoxGroup() const;
|
|
40
|
+
SelectionBoxGroup voxelise() const;
|
|
41
|
+
|
|
42
|
+
// translate and transform
|
|
43
|
+
virtual std::unique_ptr<SelectionShape> transform(const Matrix4x4&) const = 0;
|
|
44
|
+
std::unique_ptr<SelectionShape> translate(double dx, double dy, double dz) const
|
|
45
|
+
{
|
|
46
|
+
return transform(Matrix4x4::translation_matrix(dx, dy, dz));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Equality
|
|
50
|
+
virtual bool almost_equal(const SelectionShape&) const = 0;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
} // namespace Amulet
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import amulet.core.selection.box_group
|
|
6
|
+
import amulet.utils.matrix
|
|
7
|
+
|
|
8
|
+
__all__: list[str] = ["SelectionShape"]
|
|
9
|
+
|
|
10
|
+
class SelectionShape:
|
|
11
|
+
"""
|
|
12
|
+
A base class for selection classes.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
matrix: amulet.utils.matrix.Matrix4x4
|
|
16
|
+
def almost_equal(self, other: SelectionShape) -> bool:
|
|
17
|
+
"""
|
|
18
|
+
Check if this shape is equal or almost equal to another shape.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def transform(self, matrix: amulet.utils.matrix.Matrix4x4) -> SelectionShape:
|
|
22
|
+
"""
|
|
23
|
+
Translate the shape by the given matrix
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
def translate(
|
|
27
|
+
self,
|
|
28
|
+
dx: typing.SupportsFloat,
|
|
29
|
+
dy: typing.SupportsFloat,
|
|
30
|
+
dz: typing.SupportsFloat,
|
|
31
|
+
) -> SelectionShape:
|
|
32
|
+
"""
|
|
33
|
+
Translate the shape by the given amount
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def voxelise(self) -> amulet.core.selection.box_group.SelectionBoxGroup:
|
|
37
|
+
"""
|
|
38
|
+
Convert the selection to a SelectionBoxGroup.
|
|
39
|
+
"""
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <memory>
|
|
4
|
+
#include <vector>
|
|
5
|
+
|
|
6
|
+
#include <amulet/core/dll.hpp>
|
|
7
|
+
|
|
8
|
+
#include "shape.hpp"
|
|
9
|
+
|
|
10
|
+
namespace Amulet {
|
|
11
|
+
|
|
12
|
+
class SelectionBox;
|
|
13
|
+
class SelectionBoxGroup;
|
|
14
|
+
|
|
15
|
+
class AMULET_CORE_EXPORT SelectionShapeGroup {
|
|
16
|
+
private:
|
|
17
|
+
std::vector<std::unique_ptr<const SelectionShape>> _shapes;
|
|
18
|
+
|
|
19
|
+
public:
|
|
20
|
+
// Forwarding constructor
|
|
21
|
+
template <typename... Args>
|
|
22
|
+
SelectionShapeGroup(Args&&... args)
|
|
23
|
+
: _shapes(std::forward<Args>(args)...)
|
|
24
|
+
{
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Disable copying
|
|
28
|
+
SelectionShapeGroup(const SelectionShapeGroup&) = delete;
|
|
29
|
+
SelectionShapeGroup& operator=(const SelectionShapeGroup&) = delete;
|
|
30
|
+
|
|
31
|
+
// Default move
|
|
32
|
+
SelectionShapeGroup(SelectionShapeGroup&&) = default;
|
|
33
|
+
SelectionShapeGroup& operator=(SelectionShapeGroup&&) = default;
|
|
34
|
+
|
|
35
|
+
const std::vector<std::unique_ptr<const SelectionShape>>& get_shapes() const
|
|
36
|
+
{
|
|
37
|
+
return _shapes;
|
|
38
|
+
}
|
|
39
|
+
std::vector<std::unique_ptr<const SelectionShape>>::const_iterator begin() const
|
|
40
|
+
{
|
|
41
|
+
return _shapes.begin();
|
|
42
|
+
}
|
|
43
|
+
std::vector<std::unique_ptr<const SelectionShape>>::const_iterator end() const
|
|
44
|
+
{
|
|
45
|
+
return _shapes.end();
|
|
46
|
+
}
|
|
47
|
+
operator bool() const
|
|
48
|
+
{
|
|
49
|
+
return !_shapes.empty();
|
|
50
|
+
}
|
|
51
|
+
size_t count() const
|
|
52
|
+
{
|
|
53
|
+
return _shapes.size();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
explicit operator SelectionBoxGroup() const;
|
|
57
|
+
explicit operator std::set<SelectionBox>() const;
|
|
58
|
+
SelectionBoxGroup voxelise() const;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import collections.abc
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import amulet.core.selection.shape
|
|
7
|
+
|
|
8
|
+
__all__: list[str] = ["SelectionShapeGroup"]
|
|
9
|
+
|
|
10
|
+
class SelectionShapeGroup:
|
|
11
|
+
"""
|
|
12
|
+
A group of selection shapes.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __bool__(self) -> bool:
|
|
16
|
+
"""
|
|
17
|
+
Are there any selections in the group.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
@typing.overload
|
|
21
|
+
def __init__(self) -> None:
|
|
22
|
+
"""
|
|
23
|
+
Create an empty SelectionShapeGroup.
|
|
24
|
+
|
|
25
|
+
>>> SelectionShapeGroup()
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
@typing.overload
|
|
29
|
+
def __init__(
|
|
30
|
+
self,
|
|
31
|
+
shapes: collections.abc.Iterable[amulet.core.selection.shape.SelectionShape],
|
|
32
|
+
) -> None:
|
|
33
|
+
"""
|
|
34
|
+
Create a SelectionShapeGroup from the selections in the iterable.
|
|
35
|
+
|
|
36
|
+
>>> SelectionShapeGroup([
|
|
37
|
+
>>> SelectionCuboid(0, 0, 0, 5, 5, 5),
|
|
38
|
+
>>> SelectionEllipsoid(7.5, 0, 0, 2.5)
|
|
39
|
+
>>> ])
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __iter__(
|
|
43
|
+
self,
|
|
44
|
+
) -> collections.abc.Iterator[amulet.core.selection.shape.SelectionShape]:
|
|
45
|
+
"""
|
|
46
|
+
An iterable of all the :class:`SelectionShape` classes in the group.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def __len__(self) -> int:
|
|
50
|
+
"""
|
|
51
|
+
The number of :class:`SelectionShape` classes in the group.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def shapes(
|
|
56
|
+
self,
|
|
57
|
+
) -> collections.abc.Iterator[amulet.core.selection.shape.SelectionShape]:
|
|
58
|
+
"""
|
|
59
|
+
An iterator of the :class:`SelectionShape` instances stored for this group.
|
|
60
|
+
"""
|
amulet/core/version/__init__.pyi
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amulet-core
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.5a0
|
|
4
4
|
Summary: A Python library for reading/writing Minecraft's various save formats.
|
|
5
5
|
Author: James Clare, Ben Gothard
|
|
6
6
|
Project-URL: Homepage, https://www.amuletmc.com
|
|
@@ -11,12 +11,13 @@ Classifier: Operating System :: OS Independent
|
|
|
11
11
|
Requires-Python: >=3.11
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
Requires-Dist: amulet-compiler-target==2.0
|
|
14
|
-
Requires-Dist: amulet-compiler-version==
|
|
14
|
+
Requires-Dist: amulet-compiler-version==4.1297307203.19
|
|
15
15
|
Requires-Dist: pybind11==3.0.0
|
|
16
16
|
Requires-Dist: amulet-pybind11-extensions~=1.1.0.0a0
|
|
17
17
|
Requires-Dist: amulet-io~=1.0.0.0
|
|
18
|
-
Requires-Dist: amulet-
|
|
19
|
-
Requires-Dist: amulet-
|
|
18
|
+
Requires-Dist: amulet-utils~=1.1.3.0a0
|
|
19
|
+
Requires-Dist: amulet-zlib~=1.0.8.0a1
|
|
20
|
+
Requires-Dist: amulet-nbt~=5.0.2.0a0
|
|
20
21
|
Requires-Dist: numpy~=2.0
|
|
21
22
|
Provides-Extra: docs
|
|
22
23
|
Requires-Dist: Sphinx>=1.7.4; extra == "docs"
|
|
@@ -34,7 +35,7 @@ Requires-Dist: isort; extra == "dev"
|
|
|
34
35
|
Requires-Dist: autoflake; extra == "dev"
|
|
35
36
|
Requires-Dist: mypy; extra == "dev"
|
|
36
37
|
Requires-Dist: types-pyinstaller; extra == "dev"
|
|
37
|
-
Requires-Dist: amulet-test-utils~=1.
|
|
38
|
+
Requires-Dist: amulet-test-utils~=1.3; extra == "dev"
|
|
38
39
|
Dynamic: requires-dist
|
|
39
40
|
|
|
40
41
|
# Amulet Core
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
amulet/core/__init__.py,sha256=3OSfdYsczg_YNIY2Vv_Rit2Ob61sNt3Bo9mE1Ixx8Sg,978
|
|
2
|
+
amulet/core/__init__.pyi,sha256=qhxaM6yfnVWokiy9uzRktnKtWJYc2zy_gH3_rh4SxKI,456
|
|
3
|
+
amulet/core/_amulet_core.cp312-win_amd64.pyd,sha256=WthPggCy0GEn_ZdE_VHWylzYZHSjT6XxFf8sUnm4gRc,740352
|
|
4
|
+
amulet/core/_amulet_core.pyi,sha256=ysIiVDNTMxy3kdBKGkDXr0EDyhZqMITrH_ywsm0HAwM,134
|
|
5
|
+
amulet/core/_version.py,sha256=gitjXhnLmSAv0b64-ZM_RMcVw3YOaqJO-XnILYXmx9c,520
|
|
6
|
+
amulet/core/amulet_core.dll,sha256=tnH7ycINJJB6l7jBpJTxAU3qBROprvOQ73HSwMe6Pk0,185856
|
|
7
|
+
amulet/core/amulet_core.lib,sha256=FPxmYGQKgQqBVRkbrPr8hcYVn9y-MkUwh2u27Nqska4,85958
|
|
8
|
+
amulet/core/amulet_coreConfig.cmake,sha256=iwFn1KmAr-rFh3jafs52FAnTArYjPEd2eVs0w2gidEA,987
|
|
9
|
+
amulet/core/dll.hpp,sha256=pyhd9lh570R1Qi7TPPnKoiB-fAFmQan8Vnk-oZmuK70,586
|
|
10
|
+
amulet/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
amulet/core/__pyinstaller/__init__.py,sha256=vNM3T3GSrs58ywzILHdIsQP2sglKq6Jn4qwCGC3CZVQ,56
|
|
12
|
+
amulet/core/__pyinstaller/hook-amulet.core.py,sha256=AmV845T4BRjex63_T_KCeKLUlV0DxEk6aWsUJaLqyGE,172
|
|
13
|
+
amulet/core/biome/__init__.pyi,sha256=8G-i0vejK0EI3Xs_-pTi5xKpiNAD0eNodpPQY8Ux364,2168
|
|
14
|
+
amulet/core/biome/biome.hpp,sha256=6RftLCHa4jVLr3lmRU8RIuA4K5REU-1J8SmJts7Ty0Y,1539
|
|
15
|
+
amulet/core/block/__init__.pyi,sha256=kbundB7zxYtjVFEKBXHDVU23hDAXvKMajVSHbia-h_k,9695
|
|
16
|
+
amulet/core/block/block.hpp,sha256=iRZyFKwfM7tbiXaHN6MNZeedpVr8SZkkKPPm20Tkgbo,4702
|
|
17
|
+
amulet/core/block_entity/__init__.pyi,sha256=sGCIOOcB2Dgt_xpXZqgdHsOmvf5zyX4T4O63k384wrQ,2170
|
|
18
|
+
amulet/core/block_entity/block_entity.hpp,sha256=q_8rzz4JCQ-L4q025G-ooQ2G47Hf6hyn3Wou4GZZ1Dc,2277
|
|
19
|
+
amulet/core/chunk/__init__.pyi,sha256=35RyNsGhktLv6LfJkQRJ-OONR947y1HHac6D4NjaOGo,1957
|
|
20
|
+
amulet/core/chunk/chunk.hpp,sha256=r3s5nPd60XwTyulG8xA7VdPH72OwDFwD-32faKp75ds,3915
|
|
21
|
+
amulet/core/chunk/component/__init__.pyi,sha256=U_-nIa6YXnTMnrj2BQCt-sU2mSu8klfvf9-m9722Xj0,461
|
|
22
|
+
amulet/core/chunk/component/biome_3d_component.hpp,sha256=qtBGznXfxGh44GMrm5QwjyooCLhIXySuozyRWuBo1cA,3281
|
|
23
|
+
amulet/core/chunk/component/block_component.hpp,sha256=JFk1O1IBWWX9-blvQN0Kv1xNUuWYWpMxkPB6jzIoG2w,3361
|
|
24
|
+
amulet/core/chunk/component/block_component.pyi,sha256=Yc2ACyeHLOacLqdpA9WyoWkgelLoJNhZa88d2rKSD60,895
|
|
25
|
+
amulet/core/chunk/component/block_entity_component.hpp,sha256=wCv7Im03GqPoTLmtt0bmvxrS12kJN_qjzqONuRZ2YmE,3918
|
|
26
|
+
amulet/core/chunk/component/section_array_map.hpp,sha256=V_WAG56rz3SAUWMMLgoPAhY3faH3t4Egg9_PsSERueE,3855
|
|
27
|
+
amulet/core/chunk/component/section_array_map.pyi,sha256=QDFcv1qoGMIW7fJGUMOpD_Vozfw5-Z90jFo1dsyNY8M,3391
|
|
28
|
+
amulet/core/entity/__init__.pyi,sha256=_eTAV48be_GwKcjuhRFxUBOrD6acomSpwpvKIUNS8qo,2674
|
|
29
|
+
amulet/core/entity/entity.hpp,sha256=02TsWsA2XNmULM92lx0Wby-exVur4Myncu_IY_a2KQ4,2911
|
|
30
|
+
amulet/core/palette/__init__.pyi,sha256=NHmuFpb2lAK09E9cNb_w9udk0zPpHbg06MraZbEGKZ8,295
|
|
31
|
+
amulet/core/palette/biome_palette.hpp,sha256=V4OWp4TpLu0rXnyFM-UyP5rFzWhmtqP5MWbDjQC0nX8,2033
|
|
32
|
+
amulet/core/palette/biome_palette.pyi,sha256=W7VYudFz4Ji92BXmsACLhKP34LNXqhWsyXBXqYbYB-M,1766
|
|
33
|
+
amulet/core/palette/block_palette.hpp,sha256=e_LLR444vkbMO3KR5xhx0scIcgfd1HqEKyMiwqXqheY,2307
|
|
34
|
+
amulet/core/palette/block_palette.pyi,sha256=dTNEQVRpqEA6dOJ0P1crvxhwr6-g3DuelAOninlTGV8,1909
|
|
35
|
+
amulet/core/selection/__init__.pyi,sha256=CAgbMuQfTXdLZAin7QPJnrXnc1JLW5h3GO4BeUWsY5Q,744
|
|
36
|
+
amulet/core/selection/box.hpp,sha256=eQXFQMmfS7g7qrelM7WtZ6lEhiS0Lll1J04U49-qhpk,3203
|
|
37
|
+
amulet/core/selection/box.pyi,sha256=bFhdIXhI4Q0jnE0oRH_3bvZitlOAgz7EfbNzrGovb1o,7164
|
|
38
|
+
amulet/core/selection/box_group.hpp,sha256=DHh2a08DCqJkNEdPq3BKeTAs_ORAqxJtxIAmWkFj2FQ,2261
|
|
39
|
+
amulet/core/selection/box_group.pyi,sha256=UpUPyMBUBZMkEDuD1bNtrDLmUKLhAtQYPMFaycle4Q8,6601
|
|
40
|
+
amulet/core/selection/cuboid.hpp,sha256=68Vtw4XG4lQDZ_yPwv2ywNuvnSXxzgP7zwTD-MPiT14,954
|
|
41
|
+
amulet/core/selection/cuboid.pyi,sha256=Q2CclLsJY9YvmRMI3eydndlgyTSkUtsuTvJFZ6pqV08,1525
|
|
42
|
+
amulet/core/selection/ellipsoid.hpp,sha256=dNEz7kAE2ui3NMAFDSVixLzqcThN_H2Zy8e4DTsCgK8,1051
|
|
43
|
+
amulet/core/selection/ellipsoid.pyi,sha256=c-TbU5154JOKnsC3uvJ5YMyr4yrlrPzsHA-LvnE-ZRw,1456
|
|
44
|
+
amulet/core/selection/shape.hpp,sha256=B6MD12LjQu9OYPNfh8ry-lcBF4AHZZXNNxWKtehqcC4,1298
|
|
45
|
+
amulet/core/selection/shape.pyi,sha256=H47w08TQgYIlN1S6I7ikIa8BV6sOJ82tITPC0WmVXDc,1017
|
|
46
|
+
amulet/core/selection/shape_group.hpp,sha256=qnfPm2dU5HYRWpECFf9SgqFWMC1Zk8L_9EgcSxuNHHU,1490
|
|
47
|
+
amulet/core/selection/shape_group.pyi,sha256=hawsPEUwxswk_ug5F6v7IskKNRtTfhPBnb6bSNf1wFo,1527
|
|
48
|
+
amulet/core/version/__init__.pyi,sha256=aSNxo_iQtG3eLHM0HmWedUptMaSFiOv_l8zxsyJLw-M,4275
|
|
49
|
+
amulet/core/version/version.hpp,sha256=yVc_uhBgmHQ0Evo73rXXoRwSQMHakUQxSYR3_fu2KH4,6506
|
|
50
|
+
amulet_core-2.0.5a0.dist-info/METADATA,sha256=00v8hAtrJ3rMo3cfy1E2IXWjLyJqfKo6eCC7VqTF74Y,5089
|
|
51
|
+
amulet_core-2.0.5a0.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
|
52
|
+
amulet_core-2.0.5a0.dist-info/entry_points.txt,sha256=a64mqk_dgbzVyk-pz0WKpK6kNAhIGdVT9DO2VqDIAc8,68
|
|
53
|
+
amulet_core-2.0.5a0.dist-info/top_level.txt,sha256=3ZqHzNDiIb9kV8TwSeeXxK_9haSrsu631Qe4ndDo0rc,7
|
|
54
|
+
amulet_core-2.0.5a0.dist-info/RECORD,,
|
amulet/core/selection/group.hpp
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include <array>
|
|
4
|
-
#include <concepts>
|
|
5
|
-
#include <ranges>
|
|
6
|
-
#include <set>
|
|
7
|
-
|
|
8
|
-
#include <amulet/core/dll.hpp>
|
|
9
|
-
|
|
10
|
-
#include "box.hpp"
|
|
11
|
-
|
|
12
|
-
namespace Amulet {
|
|
13
|
-
|
|
14
|
-
class SelectionBox;
|
|
15
|
-
|
|
16
|
-
class SelectionGroup {
|
|
17
|
-
private:
|
|
18
|
-
std::set<SelectionBox> _boxes;
|
|
19
|
-
|
|
20
|
-
public:
|
|
21
|
-
// Constructors
|
|
22
|
-
SelectionGroup() {};
|
|
23
|
-
SelectionGroup(const SelectionBox& box)
|
|
24
|
-
{
|
|
25
|
-
_boxes.insert(box);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
template <typename Iterable>
|
|
29
|
-
requires std::ranges::input_range<Iterable> && std::convertible_to<std::ranges::range_value_t<Iterable>, const SelectionBox&>
|
|
30
|
-
SelectionGroup(const Iterable& boxes)
|
|
31
|
-
{
|
|
32
|
-
for (const SelectionBox& box : boxes) {
|
|
33
|
-
_boxes.emplace(box);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Accessors
|
|
38
|
-
const std::set<SelectionBox>& selection_boxes() const
|
|
39
|
-
{
|
|
40
|
-
return _boxes;
|
|
41
|
-
}
|
|
42
|
-
size_t size() const
|
|
43
|
-
{
|
|
44
|
-
return _boxes.size();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Bounds
|
|
48
|
-
AMULET_CORE_EXPORT std::int64_t min_x() const;
|
|
49
|
-
AMULET_CORE_EXPORT std::int64_t min_y() const;
|
|
50
|
-
AMULET_CORE_EXPORT std::int64_t min_z() const;
|
|
51
|
-
AMULET_CORE_EXPORT std::int64_t max_x() const;
|
|
52
|
-
AMULET_CORE_EXPORT std::int64_t max_y() const;
|
|
53
|
-
AMULET_CORE_EXPORT std::int64_t max_z() const;
|
|
54
|
-
AMULET_CORE_EXPORT std::array<std::int64_t, 3> min() const;
|
|
55
|
-
AMULET_CORE_EXPORT std::array<std::int64_t, 3> max() const;
|
|
56
|
-
AMULET_CORE_EXPORT std::pair<
|
|
57
|
-
std::array<std::int64_t, 3>,
|
|
58
|
-
std::array<std::int64_t, 3>>
|
|
59
|
-
bounds() const;
|
|
60
|
-
AMULET_CORE_EXPORT SelectionBox bounding_box() const;
|
|
61
|
-
|
|
62
|
-
// Contains and intersects
|
|
63
|
-
AMULET_CORE_EXPORT bool contains_block(std::int64_t x, std::int64_t y, std::int64_t z) const;
|
|
64
|
-
AMULET_CORE_EXPORT bool contains_point(double x, double y, double z) const;
|
|
65
|
-
AMULET_CORE_EXPORT bool intersects(const SelectionBox& other) const;
|
|
66
|
-
AMULET_CORE_EXPORT bool intersects(const SelectionGroup& other) const;
|
|
67
|
-
|
|
68
|
-
// Transform
|
|
69
|
-
AMULET_CORE_EXPORT SelectionGroup translate(std::int64_t dx, std::int64_t dy, std::int64_t dz) const;
|
|
70
|
-
|
|
71
|
-
// Operators
|
|
72
|
-
operator bool() const
|
|
73
|
-
{
|
|
74
|
-
return !_boxes.empty();
|
|
75
|
-
}
|
|
76
|
-
bool operator==(const SelectionGroup& rhs) const = default;
|
|
77
|
-
bool operator!=(const SelectionGroup& rhs) const = default;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
amulet/core/__init__.py,sha256=XSgXjSNSWxln5yn1US9dA7fLkB2ZgpHNu-Zd2i8AyWU,953
|
|
2
|
-
amulet/core/__init__.pyi,sha256=jotQVbNN5yY9FNylZK06uFftYXdvra6cd8IjV8E2DuA,445
|
|
3
|
-
amulet/core/_amulet_core.cp312-win_amd64.pyd,sha256=xDopQK8h1Af1d7p0nnC8Jp008AdwyRVPbekz5lg6kCg,675328
|
|
4
|
-
amulet/core/_amulet_core.pyi,sha256=6KCygVcKCdfcpjegv7RMDgxKh9M6F-IHNhPUNGZAlyQ,123
|
|
5
|
-
amulet/core/_version.py,sha256=uRg4er4UDUNETtY-4yZPjwYgCM8HHGu2EHo5TeHmI1o,520
|
|
6
|
-
amulet/core/amulet_core.dll,sha256=fX_hHNNFwXB07Zcb-RNrCldaWqSv50Pocj8darDffL0,157184
|
|
7
|
-
amulet/core/amulet_core.lib,sha256=EvQGjRGscV1gYXRPMFyL-P3JuTUYH-Yfyx5tlUoa_04,45970
|
|
8
|
-
amulet/core/amulet_coreConfig.cmake,sha256=lIMT2iokqBGeWo1_gHlYIXNDge5htq7orPeRiqBZuFg,876
|
|
9
|
-
amulet/core/dll.hpp,sha256=pyhd9lh570R1Qi7TPPnKoiB-fAFmQan8Vnk-oZmuK70,586
|
|
10
|
-
amulet/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
amulet/core/__pyinstaller/__init__.py,sha256=vNM3T3GSrs58ywzILHdIsQP2sglKq6Jn4qwCGC3CZVQ,56
|
|
12
|
-
amulet/core/__pyinstaller/hook-amulet.core.py,sha256=AmV845T4BRjex63_T_KCeKLUlV0DxEk6aWsUJaLqyGE,172
|
|
13
|
-
amulet/core/biome/__init__.pyi,sha256=rRxGRmd4vq1BlYysmo0SdRYEVzNzyGTbn_hpRHrrdIk,2157
|
|
14
|
-
amulet/core/biome/biome.hpp,sha256=6RftLCHa4jVLr3lmRU8RIuA4K5REU-1J8SmJts7Ty0Y,1539
|
|
15
|
-
amulet/core/block/__init__.pyi,sha256=Iv3EYrZ1JPM-37_AYEHVlUK_s_qhctUJunYewmRs1Yg,9684
|
|
16
|
-
amulet/core/block/block.hpp,sha256=iRZyFKwfM7tbiXaHN6MNZeedpVr8SZkkKPPm20Tkgbo,4702
|
|
17
|
-
amulet/core/block_entity/__init__.pyi,sha256=95L-jlRnn4hTin13m_7f72M0uFkP4DQNE1T1PsA3eys,2159
|
|
18
|
-
amulet/core/block_entity/block_entity.hpp,sha256=q_8rzz4JCQ-L4q025G-ooQ2G47Hf6hyn3Wou4GZZ1Dc,2277
|
|
19
|
-
amulet/core/chunk/__init__.pyi,sha256=3CXjNyVx1FXuUeAZ0MdQgwPeFMY_63incYHG3IQxwqY,1946
|
|
20
|
-
amulet/core/chunk/chunk.hpp,sha256=r3s5nPd60XwTyulG8xA7VdPH72OwDFwD-32faKp75ds,3915
|
|
21
|
-
amulet/core/chunk/component/__init__.pyi,sha256=stjIjJy7yTVxicTbxsUh6H_57BvHRiNexqTWA0khlyQ,450
|
|
22
|
-
amulet/core/chunk/component/biome_3d_component.hpp,sha256=qtBGznXfxGh44GMrm5QwjyooCLhIXySuozyRWuBo1cA,3281
|
|
23
|
-
amulet/core/chunk/component/block_component.hpp,sha256=JFk1O1IBWWX9-blvQN0Kv1xNUuWYWpMxkPB6jzIoG2w,3361
|
|
24
|
-
amulet/core/chunk/component/block_component.pyi,sha256=NaaPkl9wFP0331XMGmoGD2dQH_sjdspuc3Bm5HigzkE,884
|
|
25
|
-
amulet/core/chunk/component/block_entity_component.hpp,sha256=wCv7Im03GqPoTLmtt0bmvxrS12kJN_qjzqONuRZ2YmE,3918
|
|
26
|
-
amulet/core/chunk/component/section_array_map.hpp,sha256=V_WAG56rz3SAUWMMLgoPAhY3faH3t4Egg9_PsSERueE,3855
|
|
27
|
-
amulet/core/chunk/component/section_array_map.pyi,sha256=FVsobxk9dAqmjj0YbhO9HOC6h9LSjVHIvk-pDIX1NgU,3380
|
|
28
|
-
amulet/core/entity/__init__.pyi,sha256=fuw6s2Yofb__qe9yN1zuzY2XZ5D32ekAcKJmbtGhy8o,2663
|
|
29
|
-
amulet/core/entity/entity.hpp,sha256=02TsWsA2XNmULM92lx0Wby-exVur4Myncu_IY_a2KQ4,2911
|
|
30
|
-
amulet/core/palette/__init__.pyi,sha256=_QLcDg5WSp-Y67CAUoa-EmA6zptftMvJtX8FfeDZJM8,284
|
|
31
|
-
amulet/core/palette/biome_palette.hpp,sha256=V4OWp4TpLu0rXnyFM-UyP5rFzWhmtqP5MWbDjQC0nX8,2033
|
|
32
|
-
amulet/core/palette/biome_palette.pyi,sha256=ouCF-PidfUr4UhGcX3umtuFc1m3tNi4zLmW9o9Xwd18,1755
|
|
33
|
-
amulet/core/palette/block_palette.hpp,sha256=e_LLR444vkbMO3KR5xhx0scIcgfd1HqEKyMiwqXqheY,2307
|
|
34
|
-
amulet/core/palette/block_palette.pyi,sha256=TV76JhWSiSGVtsJ-SVisfV2pXdwZ3j9MYH4qbsxJeLo,1898
|
|
35
|
-
amulet/core/selection/__init__.pyi,sha256=STDthuVyAmuNrLp_uCvy-Nn54k8dzKZV1d0jM_KHu4g,238
|
|
36
|
-
amulet/core/selection/box.hpp,sha256=WfQiXqRMSbaaxnVhpfdP4VzDhSIx3mnnakoGrZKv2aQ,3031
|
|
37
|
-
amulet/core/selection/box.pyi,sha256=NdfcsRQEzlS5696D_UOePOzJNbg-YVxdjsVqrR84y_c,6863
|
|
38
|
-
amulet/core/selection/group.hpp,sha256=xK07faXoiVePn9v7sJ_oZJfie3lqgzcOuGkdRe4BsUA,2292
|
|
39
|
-
amulet/core/selection/group.pyi,sha256=dGXFuDJR77S2iTF-Kbwh1C6AxijQQiUY_a7s6ODaUPQ,6619
|
|
40
|
-
amulet/core/version/__init__.pyi,sha256=GjP25QNT6-zHaulDMpFBg0RK4ggwcmR0LvKTvhW1Rio,4264
|
|
41
|
-
amulet/core/version/version.hpp,sha256=yVc_uhBgmHQ0Evo73rXXoRwSQMHakUQxSYR3_fu2KH4,6506
|
|
42
|
-
amulet_core-2.0.4a1.post250728120835.dist-info/METADATA,sha256=Dewyemxub3ltWHhIbuDYGLHJK9KPK_ne6ynveYd4XeY,5081
|
|
43
|
-
amulet_core-2.0.4a1.post250728120835.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
|
44
|
-
amulet_core-2.0.4a1.post250728120835.dist-info/entry_points.txt,sha256=a64mqk_dgbzVyk-pz0WKpK6kNAhIGdVT9DO2VqDIAc8,68
|
|
45
|
-
amulet_core-2.0.4a1.post250728120835.dist-info/top_level.txt,sha256=3ZqHzNDiIb9kV8TwSeeXxK_9haSrsu631Qe4ndDo0rc,7
|
|
46
|
-
amulet_core-2.0.4a1.post250728120835.dist-info/RECORD,,
|
|
File without changes
|
{amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{amulet_core-2.0.4a1.post250728120835.dist-info → amulet_core-2.0.5a0.dist-info}/top_level.txt
RENAMED
|
File without changes
|