amulet-core 2.0a7__cp312-cp312-win_amd64.whl → 2.0a8__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.

Potentially problematic release.


This version of amulet-core might be problematic. Click here for more details.

Files changed (80) hide show
  1. amulet/__init__.cp312-win_amd64.pyd +0 -0
  2. amulet/__init__.py.cpp +2 -0
  3. amulet/__init__.pyi +2 -0
  4. amulet/_version.py +3 -3
  5. amulet/chunk.hpp +2 -1
  6. amulet/level/abc/_chunk_handle.py +45 -22
  7. amulet/mesh/block/__init__.pyi +301 -0
  8. amulet/mesh/block/_cube.py +198 -0
  9. amulet/mesh/block/{missing_block.py → _missing_block.py} +2 -2
  10. amulet/mesh/block/block_mesh.cpp +107 -0
  11. amulet/mesh/block/block_mesh.hpp +207 -0
  12. amulet/resource_pack/__init__.py +16 -15
  13. amulet/resource_pack/abc/resource_pack_manager.py +3 -5
  14. amulet/resource_pack/java/resource_pack_manager.py +185 -173
  15. amulet/utils/cast.py +10 -0
  16. amulet/utils/shareable_lock.py +2 -2
  17. {amulet_core-2.0a7.dist-info → amulet_core-2.0a8.dist-info}/METADATA +2 -2
  18. {amulet_core-2.0a7.dist-info → amulet_core-2.0a8.dist-info}/RECORD +21 -75
  19. {amulet_core-2.0a7.dist-info → amulet_core-2.0a8.dist-info}/WHEEL +1 -1
  20. amulet/mesh/block/__init__.py +0 -1
  21. amulet/mesh/block/block_mesh.py +0 -369
  22. amulet/mesh/block/cube.py +0 -149
  23. amulet/resource_pack/bedrock/__init__.py +0 -2
  24. amulet/resource_pack/bedrock/bedrock_vanilla_fix/pack_icon.png +0 -0
  25. amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/grass_carried.png +0 -0
  26. amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/grass_side_carried.png +0 -0
  27. amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/water.png +0 -0
  28. amulet/resource_pack/bedrock/blockshapes/__init__.py +0 -31
  29. amulet/resource_pack/bedrock/blockshapes/air.py +0 -35
  30. amulet/resource_pack/bedrock/blockshapes/base_blockshape.py +0 -29
  31. amulet/resource_pack/bedrock/blockshapes/bubble_column.py +0 -29
  32. amulet/resource_pack/bedrock/blockshapes/cake.py +0 -46
  33. amulet/resource_pack/bedrock/blockshapes/chest.py +0 -54
  34. amulet/resource_pack/bedrock/blockshapes/comparator.py +0 -51
  35. amulet/resource_pack/bedrock/blockshapes/cross_texture.py +0 -186
  36. amulet/resource_pack/bedrock/blockshapes/cross_texture0.py +0 -17
  37. amulet/resource_pack/bedrock/blockshapes/cross_texture_green.py +0 -16
  38. amulet/resource_pack/bedrock/blockshapes/cube.py +0 -38
  39. amulet/resource_pack/bedrock/blockshapes/default.py +0 -14
  40. amulet/resource_pack/bedrock/blockshapes/door.py +0 -38
  41. amulet/resource_pack/bedrock/blockshapes/door1.py +0 -14
  42. amulet/resource_pack/bedrock/blockshapes/door2.py +0 -14
  43. amulet/resource_pack/bedrock/blockshapes/door3.py +0 -14
  44. amulet/resource_pack/bedrock/blockshapes/door4.py +0 -14
  45. amulet/resource_pack/bedrock/blockshapes/door5.py +0 -14
  46. amulet/resource_pack/bedrock/blockshapes/door6.py +0 -14
  47. amulet/resource_pack/bedrock/blockshapes/double_plant.py +0 -40
  48. amulet/resource_pack/bedrock/blockshapes/enchanting_table.py +0 -22
  49. amulet/resource_pack/bedrock/blockshapes/farmland.py +0 -22
  50. amulet/resource_pack/bedrock/blockshapes/fence.py +0 -22
  51. amulet/resource_pack/bedrock/blockshapes/flat.py +0 -55
  52. amulet/resource_pack/bedrock/blockshapes/flat_wall.py +0 -55
  53. amulet/resource_pack/bedrock/blockshapes/furnace.py +0 -44
  54. amulet/resource_pack/bedrock/blockshapes/furnace_lit.py +0 -14
  55. amulet/resource_pack/bedrock/blockshapes/green_cube.py +0 -39
  56. amulet/resource_pack/bedrock/blockshapes/ladder.py +0 -36
  57. amulet/resource_pack/bedrock/blockshapes/lilypad.py +0 -14
  58. amulet/resource_pack/bedrock/blockshapes/partial_block.py +0 -57
  59. amulet/resource_pack/bedrock/blockshapes/piston.py +0 -44
  60. amulet/resource_pack/bedrock/blockshapes/piston_arm.py +0 -72
  61. amulet/resource_pack/bedrock/blockshapes/portal_frame.py +0 -22
  62. amulet/resource_pack/bedrock/blockshapes/pressure_plate.py +0 -29
  63. amulet/resource_pack/bedrock/blockshapes/pumpkin.py +0 -36
  64. amulet/resource_pack/bedrock/blockshapes/pumpkin_carved.py +0 -14
  65. amulet/resource_pack/bedrock/blockshapes/pumpkin_lit.py +0 -14
  66. amulet/resource_pack/bedrock/blockshapes/red_dust.py +0 -14
  67. amulet/resource_pack/bedrock/blockshapes/repeater.py +0 -53
  68. amulet/resource_pack/bedrock/blockshapes/slab.py +0 -33
  69. amulet/resource_pack/bedrock/blockshapes/slab_double.py +0 -15
  70. amulet/resource_pack/bedrock/blockshapes/tree.py +0 -41
  71. amulet/resource_pack/bedrock/blockshapes/turtle_egg.py +0 -15
  72. amulet/resource_pack/bedrock/blockshapes/vine.py +0 -52
  73. amulet/resource_pack/bedrock/blockshapes/wall.py +0 -22
  74. amulet/resource_pack/bedrock/blockshapes/water.py +0 -38
  75. amulet/resource_pack/bedrock/download_resources.py +0 -147
  76. amulet/resource_pack/bedrock/resource_pack.py +0 -40
  77. amulet/resource_pack/bedrock/resource_pack_manager.py +0 -361
  78. amulet/resource_pack/bedrock/sort_blockshapes.py +0 -15
  79. {amulet_core-2.0a7.dist-info → amulet_core-2.0a8.dist-info}/entry_points.txt +0 -0
  80. {amulet_core-2.0a7.dist-info → amulet_core-2.0a8.dist-info}/top_level.txt +0 -0
amulet/mesh/block/cube.py DELETED
@@ -1,149 +0,0 @@
1
- from typing import Optional
2
- import numpy
3
- import itertools
4
-
5
- from amulet.mesh.block.block_mesh import BlockMesh, Transparency
6
-
7
- BoundsType = tuple[tuple[float, float], tuple[float, float], tuple[float, float]]
8
- TextureUVType = tuple[
9
- tuple[float, float, float, float],
10
- tuple[float, float, float, float],
11
- tuple[float, float, float, float],
12
- tuple[float, float, float, float],
13
- tuple[float, float, float, float],
14
- tuple[float, float, float, float],
15
- ]
16
-
17
-
18
- unit_box_coordinates = numpy.array(
19
- list(itertools.product((0, 1), (0, 1), (0, 1)))
20
- ) # X, Y, Z
21
- cube_face_lut = (
22
- { # This maps face direction to the vertices used (defined in unit_box_coordinates)
23
- "down": numpy.array([0, 4, 5, 1]),
24
- "up": numpy.array([3, 7, 6, 2]),
25
- "north": numpy.array([4, 0, 2, 6]),
26
- "east": numpy.array([5, 4, 6, 7]),
27
- "south": numpy.array([1, 5, 7, 3]),
28
- "west": numpy.array([0, 1, 3, 2]),
29
- }
30
- )
31
- tri_face = numpy.array([0, 1, 2, 0, 2, 3], numpy.uint32)
32
-
33
- # cube_vert_lut = { # This maps from vertex index to index in [minx, miny, minz, maxx, maxy, maxz]
34
- # 1: [0, 1, 5],
35
- # 3: [0, 4, 5],
36
- # 0: [0, 1, 2],
37
- # 2: [0, 4, 2],
38
- # 5: [3, 1, 5],
39
- # 7: [3, 4, 5],
40
- # 4: [3, 1, 2],
41
- # 6: [3, 4, 2],
42
- # }
43
- #
44
- # # combines the above two to map from face to index in [minx, miny, minz, maxx, maxy, maxz]. Used to index a numpy array
45
- # # The above two have been kept separate because the merged result is unintuitive and difficult to edit.
46
- # cube_lut = {
47
- # face_dir_: [
48
- # vert_coord_ for vert_ in vert_index_ for vert_coord_ in cube_vert_lut[vert_]
49
- # ]
50
- # for face_dir_, vert_index_ in cube_face_lut.items()
51
- # }
52
-
53
- uv_rotation_lut = [0, 3, 2, 3, 2, 1, 0, 1] # remap
54
-
55
-
56
- # tvert_lut = { # TODO: implement this for the cases where the UV is not defined
57
- # 'down': [],
58
- # 'up': [],
59
- # 'north': [],
60
- # 'east': [],
61
- # 'south': [],
62
- # 'west': []
63
- # }
64
-
65
-
66
- def get_cube(
67
- down: str,
68
- up: str,
69
- north: str,
70
- east: str,
71
- south: str,
72
- west: str,
73
- transparency: Transparency = Transparency.FullOpaque,
74
- tint: tuple[int, int, int] = (1, 1, 1),
75
- bounds: BoundsType = ((0, 1), (0, 1), (0, 1)),
76
- texture_uv: TextureUVType = ((0, 0, 1, 1),) * 6,
77
- do_not_cull: tuple[bool, bool, bool, bool, bool, bool] = (
78
- False,
79
- False,
80
- False,
81
- False,
82
- False,
83
- False,
84
- ),
85
- ) -> BlockMesh:
86
- box_coordinates = numpy.array(list(itertools.product(*bounds)))
87
- _texture_uv: dict[Optional[str], numpy.ndarray] = {
88
- face: numpy.array(texture_uv[i], float) for i, face in enumerate(cube_face_lut)
89
- }
90
- _verts: dict[Optional[str], numpy.ndarray] = {}
91
- _texture_coords: dict[Optional[str], numpy.ndarray] = {}
92
- _tint_verts: dict[Optional[str], numpy.ndarray] = {}
93
- _tri_faces: dict[Optional[str], numpy.ndarray] = {}
94
- for _face_dir in cube_face_lut:
95
- _verts[_face_dir] = box_coordinates[
96
- cube_face_lut[_face_dir]
97
- ].ravel() # vertex coordinates for this face
98
- _texture_coords[_face_dir] = _texture_uv[_face_dir][
99
- uv_rotation_lut
100
- ] # texture vertices
101
- _tint_verts[_face_dir] = numpy.full((4, 3), tint, dtype=float).ravel()
102
- _tri_faces[_face_dir] = tri_face
103
-
104
- texture_paths_arr, texture_index = numpy.unique(
105
- (down, up, north, east, south, west), return_inverse=True
106
- )
107
- texture_paths = tuple(texture_paths_arr)
108
- _tri_texture_index: dict[Optional[str], numpy.ndarray] = {
109
- side: numpy.full(2, texture_index[side_index], dtype=numpy.uint32)
110
- for side_index, side in enumerate(cube_face_lut)
111
- }
112
-
113
- if any(do_not_cull):
114
- do_not_cull_faces = tuple(
115
- face for face, not_cull in zip(cube_face_lut, do_not_cull) if not_cull
116
- )
117
- for obj in (_verts, _texture_coords, _tint_verts, _tri_texture_index):
118
- obj[None] = numpy.concatenate([obj[key] for key in do_not_cull_faces])
119
- for key in do_not_cull_faces:
120
- del obj[key]
121
- _tri_faces[None] = numpy.concatenate(
122
- [_tri_faces[key] + 4 * i for i, key in enumerate(do_not_cull_faces)]
123
- )
124
- for key in do_not_cull_faces:
125
- del _tri_faces[key]
126
-
127
- return BlockMesh(
128
- 3,
129
- _verts,
130
- _texture_coords,
131
- _tint_verts,
132
- _tri_faces,
133
- _tri_texture_index,
134
- texture_paths,
135
- transparency,
136
- )
137
-
138
-
139
- def get_unit_cube(
140
- down: str,
141
- up: str,
142
- north: str,
143
- east: str,
144
- south: str,
145
- west: str,
146
- transparency: Transparency = Transparency.FullOpaque,
147
- tint: tuple[int, int, int] = (1, 1, 1),
148
- ) -> BlockMesh:
149
- return get_cube(down, up, north, east, south, west, transparency, tint)
@@ -1,2 +0,0 @@
1
- from .resource_pack import BedrockResourcePack
2
- from .resource_pack_manager import BedrockResourcePackManager
@@ -1,31 +0,0 @@
1
- import importlib
2
- import pkgutil
3
-
4
- from .base_blockshape import BaseBlockShape
5
-
6
- BlockShapeClasses: dict[str, BaseBlockShape] = {}
7
- _class_names = set()
8
-
9
-
10
- def _load_blockshape(module_name: str) -> None:
11
- blockshape_module = importlib.import_module(module_name)
12
- if hasattr(blockshape_module, "BlockShape"):
13
- blockshape = getattr(blockshape_module, "BlockShape")
14
- if isinstance(blockshape, BaseBlockShape):
15
- if blockshape.blockshape in BlockShapeClasses:
16
- print(f"Name conflict with blockshape {blockshape.blockshape}")
17
- if blockshape.__class__.__name__ in _class_names:
18
- print(f"Duplicate class name {blockshape.__class__.__name__}")
19
- else:
20
- _class_names.add(blockshape.__class__.__name__)
21
- BlockShapeClasses[blockshape.blockshape] = blockshape
22
-
23
-
24
- def _load_blockshapes() -> None:
25
- package_prefix = __name__ + "."
26
-
27
- for _, name, _ in pkgutil.walk_packages(__path__, package_prefix):
28
- _load_blockshape(name)
29
-
30
-
31
- _load_blockshapes()
@@ -1,35 +0,0 @@
1
- from amulet.block import Block
2
- from amulet.mesh.block.block_mesh import BlockMesh, Transparency
3
- from amulet.resource_pack.bedrock.blockshapes.base_blockshape import (
4
- BaseBlockShape,
5
- )
6
-
7
-
8
- class Air(BaseBlockShape):
9
- @property
10
- def blockshape(self) -> str:
11
- return "air"
12
-
13
- def is_valid(self, block: Block) -> bool:
14
- """Does the given block have the correct properties to use this blockshape"""
15
- return True
16
-
17
- def texture_index(self, block: Block, aux_value: int) -> int:
18
- """The texture index to use within the list for the given Block"""
19
- return 0
20
-
21
- def get_block_model(
22
- self,
23
- block: Block,
24
- down: str,
25
- up: str,
26
- north: str,
27
- east: str,
28
- south: str,
29
- west: str,
30
- transparency: tuple[bool, bool, bool, bool, bool, bool],
31
- ) -> BlockMesh:
32
- return BlockMesh(3, {}, {}, {}, {}, {}, (), Transparency.Partial)
33
-
34
-
35
- BlockShape = Air()
@@ -1,29 +0,0 @@
1
- from amulet.block import Block
2
- from amulet.mesh.block import BlockMesh
3
-
4
-
5
- class BaseBlockShape:
6
- @property
7
- def blockshape(self) -> str:
8
- raise NotImplementedError
9
-
10
- def is_valid(self, block: Block) -> bool:
11
- """Does the given block have the correct properties to use this blockshape"""
12
- raise NotImplementedError
13
-
14
- def texture_index(self, block: Block, aux_value: int) -> int:
15
- """The texture index to use within the list for the given Block"""
16
- raise NotImplementedError
17
-
18
- def get_block_model(
19
- self,
20
- block: Block,
21
- down: str,
22
- up: str,
23
- north: str,
24
- east: str,
25
- south: str,
26
- west: str,
27
- transparency: tuple[bool, bool, bool, bool, bool, bool],
28
- ) -> BlockMesh:
29
- raise NotImplementedError
@@ -1,29 +0,0 @@
1
- from amulet.block import Block
2
- from amulet.resource_pack.bedrock.blockshapes.cross_texture import (
3
- Cross,
4
- )
5
- from amulet.mesh.block import BlockMesh
6
-
7
-
8
- class BubbleColumn(Cross):
9
- @property
10
- def blockshape(self) -> str:
11
- return "bubble_column"
12
-
13
- def get_block_model(
14
- self,
15
- block: Block,
16
- down: str,
17
- up: str,
18
- north: str,
19
- east: str,
20
- south: str,
21
- west: str,
22
- transparency: tuple[bool, bool, bool, bool, bool, bool],
23
- ) -> BlockMesh:
24
- return super().get_block_model(
25
- block, north, north, north, north, north, north, transparency
26
- )
27
-
28
-
29
- BlockShape = BubbleColumn()
@@ -1,46 +0,0 @@
1
- from amulet.block import Block
2
- from amulet.resource_pack.bedrock.blockshapes.partial_block import (
3
- PartialBlock,
4
- )
5
- from amulet_nbt import AbstractBaseIntTag, IntTag
6
-
7
-
8
- class Cake(PartialBlock):
9
- def is_valid(self, block: Block) -> bool:
10
- return isinstance(block.properties.get("bite_counter"), IntTag)
11
-
12
- @property
13
- def blockshape(self) -> str:
14
- return "cake"
15
-
16
- def bounds(
17
- self, block: Block
18
- ) -> tuple[tuple[float, float], tuple[float, float], tuple[float, float]]:
19
- bite_count = block.properties["bite_counter"]
20
- return (
21
- (
22
- 1 / 16
23
- + (
24
- bite_count.py_int
25
- if isinstance(bite_count, AbstractBaseIntTag)
26
- else 0
27
- )
28
- * 2
29
- / 16,
30
- 15 / 16,
31
- ),
32
- (0, 0.5),
33
- (1 / 16, 15 / 16),
34
- )
35
-
36
- def texture_index(self, block: Block, aux_value: int) -> int:
37
- bite_counter = block.properties["bite_counter"]
38
- assert isinstance(bite_counter, AbstractBaseIntTag)
39
- return min(1, bite_counter.py_int)
40
-
41
- @property
42
- def do_not_cull(self) -> tuple[bool, bool, bool, bool, bool, bool]:
43
- return False, True, True, True, True, True
44
-
45
-
46
- BlockShape = Cake()
@@ -1,54 +0,0 @@
1
- from typing import Any
2
-
3
- from amulet.block import Block
4
- from amulet.resource_pack.bedrock.blockshapes.partial_block import (
5
- PartialBlock,
6
- )
7
- from amulet.mesh.block import BlockMesh
8
-
9
-
10
- class Chest(PartialBlock):
11
- @property
12
- def blockshape(self) -> str:
13
- return "chest"
14
-
15
- def bounds(
16
- self, block: Block
17
- ) -> tuple[tuple[float, float], tuple[float, float], tuple[float, float]]:
18
- return (1 / 16, 15 / 16), (0, 14 / 16), (1 / 16, 15 / 16)
19
-
20
- def texture_index(self, block: Block, aux_value: int) -> int:
21
- return 0
22
-
23
- @property
24
- def do_not_cull(self) -> tuple[bool, bool, bool, bool, bool, bool]:
25
- return False, True, True, True, True, True
26
-
27
- def get_block_model(
28
- self,
29
- block: Block,
30
- down: str,
31
- up: str,
32
- north: str,
33
- east: str,
34
- south: str,
35
- west: str,
36
- transparency: tuple[bool, bool, bool, bool, bool, bool],
37
- modify_uv: bool = True,
38
- *args: Any,
39
- **kwargs: Any
40
- ) -> BlockMesh:
41
- rotation = {2: 2, 3: 0, 4: 1, 5: 3}.get(
42
- block.properties["facing_direction"].py_data, 0
43
- )
44
-
45
- return (
46
- super()
47
- .get_block_model(
48
- block, down, up, north, east, south, west, transparency, modify_uv=False
49
- )
50
- .rotate(0, rotation)
51
- )
52
-
53
-
54
- BlockShape = Chest()
@@ -1,51 +0,0 @@
1
- from typing import Any
2
-
3
- from amulet.block import Block
4
- from amulet.resource_pack.bedrock.blockshapes.partial_block import (
5
- PartialBlock,
6
- )
7
- from amulet.mesh.block import BlockMesh
8
- import amulet_nbt
9
-
10
-
11
- class Comparator(PartialBlock):
12
- def is_valid(self, block: Block) -> bool:
13
- return isinstance(block.properties.get("direction"), amulet_nbt.TAG_Int)
14
-
15
- @property
16
- def blockshape(self) -> str:
17
- return "comparator"
18
-
19
- def texture_index(self, block: Block, aux_value: int) -> int:
20
- return (aux_value >> 3) & 1
21
-
22
- def bounds(
23
- self, block: Block
24
- ) -> tuple[tuple[float, float], tuple[float, float], tuple[float, float]]:
25
- return (0, 1), (0, 2 / 16), (0, 1)
26
-
27
- @property
28
- def do_not_cull(self) -> tuple[bool, bool, bool, bool, bool, bool]:
29
- return False, True, False, False, False, False
30
-
31
- def get_block_model(
32
- self,
33
- block: Block,
34
- down: str,
35
- up: str,
36
- north: str,
37
- east: str,
38
- south: str,
39
- west: str,
40
- transparency: tuple[bool, bool, bool, bool, bool, bool],
41
- *args: Any,
42
- **kwargs: Any
43
- ) -> BlockMesh:
44
- return (
45
- super()
46
- .get_block_model(block, down, up, north, east, south, west, transparency)
47
- .rotate(0, block.properties["direction"].py_data)
48
- )
49
-
50
-
51
- BlockShape = Comparator()
@@ -1,186 +0,0 @@
1
- import numpy
2
-
3
- from amulet.block import Block
4
- from amulet.mesh.block.block_mesh import BlockMesh, Transparency
5
- from amulet.resource_pack.bedrock.blockshapes.base_blockshape import (
6
- BaseBlockShape,
7
- )
8
-
9
-
10
- class Cross(BaseBlockShape):
11
- @property
12
- def blockshape(self) -> str:
13
- return "cross_texture"
14
-
15
- def is_valid(self, block: Block) -> bool:
16
- """Does the given block have the correct properties to use this blockshape"""
17
- return True
18
-
19
- def texture_index(self, block: Block, aux_value: int) -> int:
20
- """The texture index to use within the list for the given Block"""
21
- return aux_value % 16
22
-
23
- @property
24
- def tint(self) -> tuple[float, float, float]:
25
- return 1, 1, 1
26
-
27
- def get_block_model(
28
- self,
29
- block: Block,
30
- down: str,
31
- up: str,
32
- north: str,
33
- east: str,
34
- south: str,
35
- west: str,
36
- transparency: tuple[bool, bool, bool, bool, bool, bool],
37
- ) -> BlockMesh:
38
- return BlockMesh(
39
- 3,
40
- {
41
- None: numpy.array(
42
- [
43
- 0.0625,
44
- 0.0,
45
- 0.0625,
46
- 0.9375,
47
- 0.0,
48
- 0.9375,
49
- 0.9375,
50
- 1.0,
51
- 0.9375,
52
- 0.0625,
53
- 1.0,
54
- 0.0625,
55
- 0.0625,
56
- 0.0,
57
- 0.9375,
58
- 0.9375,
59
- 0.0,
60
- 0.0625,
61
- 0.9375,
62
- 1.0,
63
- 0.0625,
64
- 0.0625,
65
- 1.0,
66
- 0.9375,
67
- 0.9375,
68
- 0.0,
69
- 0.0625,
70
- 0.0625,
71
- 0.0,
72
- 0.9375,
73
- 0.0625,
74
- 1.0,
75
- 0.9375,
76
- 0.9375,
77
- 1.0,
78
- 0.0625,
79
- 0.9375,
80
- 0.0,
81
- 0.9375,
82
- 0.0625,
83
- 0.0,
84
- 0.0625,
85
- 0.0625,
86
- 1.0,
87
- 0.0625,
88
- 0.9375,
89
- 1.0,
90
- 0.9375,
91
- ],
92
- dtype=numpy.float32,
93
- )
94
- },
95
- {
96
- None: numpy.array(
97
- [
98
- 0.0,
99
- 1.0,
100
- 1.0,
101
- 1.0,
102
- 1.0,
103
- 0.0,
104
- 0.0,
105
- 0.0,
106
- 0.0,
107
- 1.0,
108
- 1.0,
109
- 1.0,
110
- 1.0,
111
- 0.0,
112
- 0.0,
113
- 0.0,
114
- 0.0,
115
- 1.0,
116
- 1.0,
117
- 1.0,
118
- 1.0,
119
- 0.0,
120
- 0.0,
121
- 0.0,
122
- 0.0,
123
- 1.0,
124
- 1.0,
125
- 1.0,
126
- 1.0,
127
- 0.0,
128
- 0.0,
129
- 0.0,
130
- ],
131
- numpy.float32,
132
- )
133
- },
134
- {None: numpy.array(self.tint * 16, numpy.float32)},
135
- {
136
- None: numpy.array(
137
- [
138
- 0,
139
- 1,
140
- 2,
141
- 0,
142
- 2,
143
- 3,
144
- 4,
145
- 5,
146
- 6,
147
- 4,
148
- 6,
149
- 7,
150
- 8,
151
- 9,
152
- 10,
153
- 8,
154
- 10,
155
- 11,
156
- 12,
157
- 13,
158
- 14,
159
- 12,
160
- 14,
161
- 15,
162
- ],
163
- numpy.uint32,
164
- )
165
- },
166
- {
167
- None: numpy.array(
168
- [
169
- 0,
170
- 0,
171
- 0,
172
- 0,
173
- 0,
174
- 0,
175
- 0,
176
- 0,
177
- ],
178
- numpy.uint32,
179
- )
180
- },
181
- (up,),
182
- Transparency.Partial,
183
- )
184
-
185
-
186
- BlockShape = Cross()
@@ -1,17 +0,0 @@
1
- from amulet.block import Block
2
- from amulet.resource_pack.bedrock.blockshapes.cross_texture import (
3
- Cross,
4
- )
5
-
6
-
7
- class Cross0(Cross):
8
- @property
9
- def blockshape(self) -> str:
10
- return "cross_texture0"
11
-
12
- def texture_index(self, block: Block, aux_value: int) -> int:
13
- """The texture index to use within the list for the given Block"""
14
- return 0
15
-
16
-
17
- BlockShape = Cross0()
@@ -1,16 +0,0 @@
1
- from amulet.resource_pack.bedrock.blockshapes.cross_texture import (
2
- Cross,
3
- )
4
-
5
-
6
- class CrossGreen(Cross):
7
- @property
8
- def blockshape(self) -> str:
9
- return "cross_texture_green"
10
-
11
- @property
12
- def tint(self) -> tuple[float, float, float]:
13
- return 0, 1, 0
14
-
15
-
16
- BlockShape = CrossGreen()