amulet-core 1.9.22__py3-none-any.whl → 1.9.24__py3-none-any.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.
- amulet/_version.py +3 -3
- amulet/level/formats/anvil_world/format.py +8 -7
- amulet/level/interfaces/chunk/anvil/anvil_1934.py +30 -0
- amulet/level/interfaces/chunk/anvil/anvil_2844.py +1 -1
- amulet/level/interfaces/chunk/anvil/anvil_na.py +1 -1
- {amulet_core-1.9.22.dist-info → amulet_core-1.9.24.dist-info}/METADATA +1 -1
- {amulet_core-1.9.22.dist-info → amulet_core-1.9.24.dist-info}/RECORD +10 -10
- {amulet_core-1.9.22.dist-info → amulet_core-1.9.24.dist-info}/WHEEL +0 -0
- {amulet_core-1.9.22.dist-info → amulet_core-1.9.24.dist-info}/entry_points.txt +0 -0
- {amulet_core-1.9.22.dist-info → amulet_core-1.9.24.dist-info}/top_level.txt +0 -0
amulet/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-
|
|
11
|
+
"date": "2024-06-12T15:06:45+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.9.
|
|
14
|
+
"full-revisionid": "53bfff77d0216ecee7dcad08f1d30f058bb082af",
|
|
15
|
+
"version": "1.9.24"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -495,14 +495,14 @@ class AnvilFormat(WorldFormatWrapper[VersionNumberInt]):
|
|
|
495
495
|
except StopIteration as e:
|
|
496
496
|
height_changed = e.value
|
|
497
497
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
light = self._calculate_light(level, changed_chunks)
|
|
499
|
+
try:
|
|
500
|
+
while True:
|
|
501
|
+
yield next(light) / 2
|
|
502
|
+
except StopIteration as e:
|
|
503
|
+
light_changed = e.value
|
|
504
504
|
|
|
505
|
-
return height_changed
|
|
505
|
+
return height_changed or light_changed
|
|
506
506
|
|
|
507
507
|
@staticmethod
|
|
508
508
|
def _calculate_height(
|
|
@@ -553,6 +553,7 @@ class AnvilFormat(WorldFormatWrapper[VersionNumberInt]):
|
|
|
553
553
|
changed_ = False
|
|
554
554
|
changed_ |= chunk.misc.pop("block_light", None) is not None
|
|
555
555
|
changed_ |= chunk.misc.pop("sky_light", None) is not None
|
|
556
|
+
changed_ |= bool(chunk.misc.pop("isLightOn", None))
|
|
556
557
|
if changed_:
|
|
557
558
|
changed = True
|
|
558
559
|
chunk.changed = True
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from amulet.api.chunk import Chunk
|
|
7
|
+
|
|
8
|
+
from amulet_nbt import CompoundTag, ByteTag
|
|
9
|
+
|
|
10
|
+
from .base_anvil_interface import ChunkDataType, ChunkPathType
|
|
11
|
+
|
|
3
12
|
from .anvil_1912 import Anvil1912Interface as ParentInterface
|
|
4
13
|
|
|
5
14
|
|
|
@@ -8,13 +17,34 @@ class Anvil1934Interface(ParentInterface):
|
|
|
8
17
|
Made lighting optional
|
|
9
18
|
"""
|
|
10
19
|
|
|
20
|
+
isLightOn: ChunkPathType = (
|
|
21
|
+
"region",
|
|
22
|
+
[("Level", CompoundTag), ("isLightOn", ByteTag)],
|
|
23
|
+
ByteTag,
|
|
24
|
+
)
|
|
25
|
+
|
|
11
26
|
def __init__(self):
|
|
12
27
|
super().__init__()
|
|
13
28
|
self._set_feature("light_optional", "true")
|
|
29
|
+
self._register_encoder(self._encode_is_light_on)
|
|
30
|
+
self._register_decoder(self._decode_is_light_on)
|
|
14
31
|
|
|
15
32
|
@staticmethod
|
|
16
33
|
def minor_is_valid(key: int):
|
|
17
34
|
return 1934 <= key < 2203
|
|
18
35
|
|
|
36
|
+
def _decode_is_light_on(
|
|
37
|
+
self, chunk: Chunk, data: ChunkDataType, floor_cy: int, height_cy: int
|
|
38
|
+
):
|
|
39
|
+
chunk.misc["isLightOn"] = self.get_layer_obj(
|
|
40
|
+
data, self.isLightOn, pop_last=True
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
def _encode_is_light_on(
|
|
44
|
+
self, chunk: Chunk, data: ChunkDataType, floor_cy: int, height_cy: int
|
|
45
|
+
):
|
|
46
|
+
is_light_on = bool(chunk.misc.pop("isLightOn", None))
|
|
47
|
+
self.set_layer_obj(data, self.isLightOn, ByteTag(is_light_on))
|
|
48
|
+
|
|
19
49
|
|
|
20
50
|
export = Anvil1934Interface
|
|
@@ -57,7 +57,7 @@ class Anvil2844Interface(ParentInterface):
|
|
|
57
57
|
OldLevel: ChunkPathType = ("region", [("Level", CompoundTag)], CompoundTag)
|
|
58
58
|
Level: ChunkPathType = ("region", [], CompoundTag)
|
|
59
59
|
Sections: ChunkPathType = ("region", [("sections", ListTag)], ListTag)
|
|
60
|
-
|
|
60
|
+
isLightOn: ChunkPathType = ("region", [("isLightOn", ByteTag)], ByteTag)
|
|
61
61
|
Entities: ChunkPathType = ("region", [("entities", ListTag)], ListTag)
|
|
62
62
|
BlockEntities: ChunkPathType = ("region", [("block_entities", ListTag)], ListTag)
|
|
63
63
|
BlockTicks: ChunkPathType = ("region", [("block_ticks", ListTag)], ListTag)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
amulet/__init__.py,sha256=sWKAqhofjzTINMJB22nXeBTITznt4H9rM3ZaaAn2SB4,866
|
|
2
|
-
amulet/_version.py,sha256=
|
|
2
|
+
amulet/_version.py,sha256=4Y-mFAG8O_9VOdSUtO19h671x9G2O4qwb87cgItpoME,498
|
|
3
3
|
amulet/__pyinstaller/__init__.py,sha256=JJOm9J0BoU_vwoYyoHgd8vwSdiO5SGlHHWH6EQK6sc4,41
|
|
4
4
|
amulet/__pyinstaller/hook-amulet.py,sha256=5s6LZxxd47zNsrsJi-PORR7Q6QC079D7pcTkSn1uzCs,158
|
|
5
5
|
amulet/api/__init__.py,sha256=HJ88KU13JNYES9sptkz0la0OsoRvBGUavuOanaZ_RyM,46
|
|
@@ -80,7 +80,7 @@ amulet/level/formats/anvil_forge_world.py,sha256=oktfFzj7YYzCdpHJeRKPp-XAR6EzGIp
|
|
|
80
80
|
amulet/level/formats/anvil_world/__init__.py,sha256=QlLF_96Ub9ceibhR8J1CVfkSaAqXl8dUQWWxFjDJkW0,54
|
|
81
81
|
amulet/level/formats/anvil_world/_sector_manager.py,sha256=QK-M9C4j_QfcpBxd_GwmUeQbwpnTgc6TC6egqtB4ZP8,11080
|
|
82
82
|
amulet/level/formats/anvil_world/dimension.py,sha256=Ft38XWSjJ7mRjHqF-XjEIR7uJFTB_oBaWQIPNaMrsgQ,6069
|
|
83
|
-
amulet/level/formats/anvil_world/format.py,sha256=
|
|
83
|
+
amulet/level/formats/anvil_world/format.py,sha256=_Ex4g597CYBgbMwsMvk9byTNyJRIrUsv0fT-S5y5xXs,27572
|
|
84
84
|
amulet/level/formats/anvil_world/region.py,sha256=KzwvmQHbxYMQdps43Iwy6ruOufQst4GmyF2P3GLzuHc,15995
|
|
85
85
|
amulet/level/formats/anvil_world/data_pack/__init__.py,sha256=L-He67mqDNWp0boI1VDyIz92BfBZqSKLnBcR0bYxQUA,79
|
|
86
86
|
amulet/level/formats/anvil_world/data_pack/data_pack.py,sha256=N7WwzdQuqmIsjInIqhk-I0UGV67wCFc_ysQMYh0UXYU,6161
|
|
@@ -168,14 +168,14 @@ amulet/level/interfaces/chunk/anvil/anvil_1519.py,sha256=IBBGYF2to_zuKwE6Iij4IvJ
|
|
|
168
168
|
amulet/level/interfaces/chunk/anvil/anvil_1901.py,sha256=JHR35Nfe9d7BV7KRzJuEcAeabBPP7Vg88VK5w4vhC1s,434
|
|
169
169
|
amulet/level/interfaces/chunk/anvil/anvil_1908.py,sha256=KVeajPPgn__K1QFm1xlXHaqEkHMSNVJQE3QA5MTHZwA,412
|
|
170
170
|
amulet/level/interfaces/chunk/anvil/anvil_1912.py,sha256=T4fiKT4Qzc57zhY9eMQpG5P2WoT4EmTf8rGY9aWjdpc,461
|
|
171
|
-
amulet/level/interfaces/chunk/anvil/anvil_1934.py,sha256=
|
|
171
|
+
amulet/level/interfaces/chunk/anvil/anvil_1934.py,sha256=2uBQcRjhWJZj1LEOFYvdQVTNT0gvXMLJ30KqRPEKpjQ,1332
|
|
172
172
|
amulet/level/interfaces/chunk/anvil/anvil_2203.py,sha256=t2lOVgKI_j-3GTZcyTACAqQS3z8R1OKD8ytWZrpiUDE,2114
|
|
173
173
|
amulet/level/interfaces/chunk/anvil/anvil_2529.py,sha256=UTtQkxcM3jUdSWpy02gehEhqenzNW_JitQLFW2PQBLg,478
|
|
174
174
|
amulet/level/interfaces/chunk/anvil/anvil_2681.py,sha256=w9lz9014E3yNFdsLUFvF4UP1IE_OzdwFp8lZ0Zl5tCg,2319
|
|
175
175
|
amulet/level/interfaces/chunk/anvil/anvil_2709.py,sha256=qRvOb67bjyh-HcSEUiqlf1YKMqPfZjeW98Aid92YQy8,417
|
|
176
|
-
amulet/level/interfaces/chunk/anvil/anvil_2844.py,sha256=
|
|
176
|
+
amulet/level/interfaces/chunk/anvil/anvil_2844.py,sha256=wyl97xOVr2tARqEgNGe0yH9fZNVyeNocH_5ScOX-gD0,10292
|
|
177
177
|
amulet/level/interfaces/chunk/anvil/anvil_3463.py,sha256=DXduuopYNspAjxmHuQkPzeJo7_ZGPQkV6IxEWktJLEM,423
|
|
178
|
-
amulet/level/interfaces/chunk/anvil/anvil_na.py,sha256=
|
|
178
|
+
amulet/level/interfaces/chunk/anvil/anvil_na.py,sha256=UcSd3LWjGdDmTvTfKF02UsAtnjLdQc1l_ZN3GpP3LHg,22007
|
|
179
179
|
amulet/level/interfaces/chunk/anvil/base_anvil_interface.py,sha256=fG3nEkRxY9O-yvlBPFJW1abTb8Vw6Lhh7rjMJf7c1SA,11979
|
|
180
180
|
amulet/level/translators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
amulet/level/translators/chunk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -201,8 +201,8 @@ amulet/utils/generator.py,sha256=2pKToghl8irYozX5hBJYtjTQVzhljznPCi42hQKRGDQ,364
|
|
|
201
201
|
amulet/utils/matrix.py,sha256=KSqluO0H6oHUfe0pU4Esv67pOmHFurK2BDOrZAeNxg8,7665
|
|
202
202
|
amulet/utils/numpy_helpers.py,sha256=fM0rjZxbUqoTMTrFooZEVVhHfsqv0j_7KPGsjVq4ReM,1232
|
|
203
203
|
amulet/utils/world_utils.py,sha256=xb6JPrrbwDF0_y4ZYjTJ1ieydL3COzzLosTgcxDDyRc,12559
|
|
204
|
-
amulet_core-1.9.
|
|
205
|
-
amulet_core-1.9.
|
|
206
|
-
amulet_core-1.9.
|
|
207
|
-
amulet_core-1.9.
|
|
208
|
-
amulet_core-1.9.
|
|
204
|
+
amulet_core-1.9.24.dist-info/METADATA,sha256=yZTawJxHhDtzI_E7oOF-aQdVLvTPQrJkBHX8lYsIF4o,4287
|
|
205
|
+
amulet_core-1.9.24.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
206
|
+
amulet_core-1.9.24.dist-info/entry_points.txt,sha256=53zFNThTPzI8f9ertsyU2DoUpxdWU8rjOA_Cu4YH5Vk,63
|
|
207
|
+
amulet_core-1.9.24.dist-info/top_level.txt,sha256=3ZqHzNDiIb9kV8TwSeeXxK_9haSrsu631Qe4ndDo0rc,7
|
|
208
|
+
amulet_core-1.9.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|