amulet-core 1.9.27__py3-none-any.whl → 1.9.29__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/__init__.py CHANGED
@@ -2,11 +2,9 @@ import os
2
2
  import logging
3
3
  import platformdirs
4
4
 
5
- from ._version import get_versions
6
-
7
- __version__ = get_versions()["version"]
8
- del get_versions
5
+ from . import _version
9
6
 
7
+ __version__ = _version.get_versions()["version"]
10
8
 
11
9
  entity_support = False
12
10
 
amulet/_version.py CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # This file was generated by 'versioneer.py' (0.19) from
2
+ # This file was generated by 'versioneer.py' (0.29) from
3
3
  # revision-control system data, or from the parent directory name of an
4
4
  # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
5
  # of this file.
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-12-05T11:49:24+0000",
11
+ "date": "2025-03-26T09:50:07+0000",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "b8e61a55afd5a1964de2eed7f26be3266dec9480",
15
- "version": "1.9.27"
14
+ "full-revisionid": "ab2f4899f7b20c90a9909536648e1b9687ef6e6c",
15
+ "version": "1.9.29"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -577,7 +577,7 @@ class LevelDBFormat(WorldFormatWrapper[VersionNumberTuple]):
577
577
  """
578
578
  yield from (
579
579
  pid[7:].decode("utf-8")
580
- for pid, _ in self._db.iterate(b"player_", b"player_\xFF")
580
+ for pid, _ in self._db.iterate(b"player_", b"player_\xff")
581
581
  )
582
582
  if self.has_player(LOCAL_PLAYER):
583
583
  yield LOCAL_PLAYER
@@ -133,7 +133,7 @@ class BaseLevelDBInterface(Interface):
133
133
  ): # ["2farray", "2f1palette", "2fnpalette"]
134
134
  subchunks = {}
135
135
  for key in chunk_data.copy().keys():
136
- if len(key) == 2 and key[0:1] == b"\x2F":
136
+ if len(key) == 2 and key[0:1] == b"\x2f":
137
137
  cy = struct.unpack("b", key[1:2])[0]
138
138
  subchunks[self._chunk_key_to_sub_chunk(cy, bounds[0] >> 4)] = (
139
139
  chunk_data.pop(key)
@@ -188,8 +188,8 @@ class BaseLevelDBInterface(Interface):
188
188
  )
189
189
  chunk.misc["height"] = height
190
190
  chunk.biomes = biome
191
- elif b"\x2D" in chunk_data:
192
- d2d = chunk_data[b"\x2D"]
191
+ elif b"\x2d" in chunk_data:
192
+ d2d = chunk_data[b"\x2d"]
193
193
  height, biome = (
194
194
  numpy.frombuffer(d2d[:512], "<i2").reshape((16, 16)),
195
195
  d2d[512:],
@@ -274,7 +274,7 @@ class BaseLevelDBInterface(Interface):
274
274
  )
275
275
  min_y = bounds[0] // 16
276
276
  for cy, sub_chunk in terrain.items():
277
- chunk_data[b"\x2F" + self._get_sub_chunk_storage_byte(cy, min_y)] = (
277
+ chunk_data[b"\x2f" + self._get_sub_chunk_storage_byte(cy, min_y)] = (
278
278
  sub_chunk
279
279
  )
280
280
 
@@ -289,15 +289,15 @@ class BaseLevelDBInterface(Interface):
289
289
  d2d: List[bytes] = [self._encode_height(chunk)]
290
290
  chunk.biomes.convert_to_2d()
291
291
  d2d.append(chunk.biomes.astype("uint8").T.tobytes())
292
- chunk_data[b"\x2D"] = b"".join(d2d)
292
+ chunk_data[b"\x2d"] = b"".join(d2d)
293
293
  if b"+" in chunk_data:
294
294
  chunk_data[b"+"] = None
295
295
  elif self._features["data_2d"] == "height512|biome4096":
296
296
  chunk_data[b"+"] = self._encode_height_3d_biomes(
297
297
  chunk, bounds[0] >> 4, bounds[1] >> 4
298
298
  )
299
- if b"\x2D" in chunk_data:
300
- chunk_data[b"\x2D"] = None
299
+ if b"\x2d" in chunk_data:
300
+ chunk_data[b"\x2d"] = None
301
301
 
302
302
  # pack block entities and entities
303
303
  if self._features["block_entities"] == "31list":
@@ -656,7 +656,7 @@ class BaseLevelDBInterface(Interface):
656
656
  d2d.append(struct.pack("<I", len(palette)))
657
657
  d2d.append(palette.astype("<i4").tobytes())
658
658
  else:
659
- d2d.append(b"\xFF")
659
+ d2d.append(b"\xff")
660
660
 
661
661
  return b"".join(d2d)
662
662
 
@@ -13,7 +13,7 @@ class Anvil3463Interface(ParentInterface):
13
13
 
14
14
  @staticmethod
15
15
  def minor_is_valid(key: int):
16
- return 3454 <= key <= 4200
16
+ return 3454 <= key <= 4400
17
17
 
18
18
 
19
19
  export = Anvil3463Interface
@@ -13,6 +13,6 @@ def clone(
13
13
  dst_location = (
14
14
  target.get("x", 0) + offset_x,
15
15
  target.get("y", 0) + offset_y,
16
- target.get("z", 0) + offset_y,
16
+ target.get("z", 0) + offset_z,
17
17
  )
18
18
  world.paste(world, dimension, selection, dimension, dst_location)
@@ -333,7 +333,7 @@ def get_smallest_dtype(arr: ndarray, uint: bool = True) -> int:
333
333
 
334
334
 
335
335
  def entity_position_to_chunk_coordinates(
336
- entity_coordinates: Tuple[float, float, float]
336
+ entity_coordinates: Tuple[float, float, float],
337
337
  ):
338
338
  return (
339
339
  int(math.floor(entity_coordinates[0])) >> 4,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: amulet-core
3
- Version: 1.9.27
3
+ Version: 1.9.29
4
4
  Summary: A Python library for reading/writing Minecraft's various save formats.
5
5
  Home-page: https://www.amuletmc.com
6
6
  Author: James Clare, Ben Gothard et al.
@@ -1,5 +1,5 @@
1
- amulet/__init__.py,sha256=sWKAqhofjzTINMJB22nXeBTITznt4H9rM3ZaaAn2SB4,866
2
- amulet/_version.py,sha256=XUnJRawLQEy8CAOO0jtqVHfWwsfRUD62LJxZeffTXc0,498
1
+ amulet/__init__.py,sha256=uFFf4oJfx86yNeMgRx35ZvXljTaEwHOddnLV__VPO5M,845
2
+ amulet/_version.py,sha256=AGjuIz2Mo4hxJllqKrxF-aRjaURnXD4HFa23-xAhAnA,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
@@ -93,10 +93,10 @@ amulet/level/formats/construction/util.py,sha256=dBBITNfxUocxxzVnUpRUetr0KuLtMVG
93
93
  amulet/level/formats/leveldb_world/__init__.py,sha256=dXo6jIok-_suB3KSrhb5NZS7CicGQj-HCLiGpD76QDY,58
94
94
  amulet/level/formats/leveldb_world/chunk.py,sha256=iNMwNs09Kyj9fUo3dFZxdtLyW_uh11aXgDUqe_MKoQo,1202
95
95
  amulet/level/formats/leveldb_world/dimension.py,sha256=LdrhL6xO9Kk3xMsYMzo3dWcVgTldzymlItC-YlQ6HHU,14728
96
- amulet/level/formats/leveldb_world/format.py,sha256=PsnpNE778q83wKw_6bbH06V9Q1avIpyh3U8pj0iTMlw,23401
96
+ amulet/level/formats/leveldb_world/format.py,sha256=TyYYBT7_hw-KrEwiJSNPnov8CxeGSd_JDLRqXXNMsAo,23401
97
97
  amulet/level/formats/leveldb_world/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
98
  amulet/level/formats/leveldb_world/interface/chunk/__init__.py,sha256=S606IgGmRqdQfv223yciHil3qqna8r5DiW8gsrNHyf0,1180
99
- amulet/level/formats/leveldb_world/interface/chunk/base_leveldb_interface.py,sha256=jvbFITofMtWpU_g_NV_nkEcr0aZ28vibjAkFCHDSQAQ,32474
99
+ amulet/level/formats/leveldb_world/interface/chunk/base_leveldb_interface.py,sha256=uxML7TyFVv-m0WDjVzeejytx8spULmnZXQHj-WDGNhs,32474
100
100
  amulet/level/formats/leveldb_world/interface/chunk/generate_interface.py,sha256=izp5uJPzNoSM9k-EkbqN6RMsmUSTEyhuqxF7S3v-Szw,738
101
101
  amulet/level/formats/leveldb_world/interface/chunk/leveldb_0.py,sha256=48MN18o9MLY2DBI3fOwb6etSc30eBLTVXfiXFVigygs,879
102
102
  amulet/level/formats/leveldb_world/interface/chunk/leveldb_1.py,sha256=9xgQfC-nF4GqV0pW1tFEXGgu66Jhbmyu0X0xARSUsUo,183
@@ -175,7 +175,7 @@ amulet/level/interfaces/chunk/anvil/anvil_2529.py,sha256=UTtQkxcM3jUdSWpy02gehEh
175
175
  amulet/level/interfaces/chunk/anvil/anvil_2681.py,sha256=w9lz9014E3yNFdsLUFvF4UP1IE_OzdwFp8lZ0Zl5tCg,2319
176
176
  amulet/level/interfaces/chunk/anvil/anvil_2709.py,sha256=qRvOb67bjyh-HcSEUiqlf1YKMqPfZjeW98Aid92YQy8,417
177
177
  amulet/level/interfaces/chunk/anvil/anvil_2844.py,sha256=wyl97xOVr2tARqEgNGe0yH9fZNVyeNocH_5ScOX-gD0,10292
178
- amulet/level/interfaces/chunk/anvil/anvil_3463.py,sha256=idqx2IokYxKX_UETXILI7lLUaE8zJMPGcgZQGXqXPvM,423
178
+ amulet/level/interfaces/chunk/anvil/anvil_3463.py,sha256=jifoDIjsFDKcdkaSOSS_gusoAgLqIeAgureVHaB-p_U,423
179
179
  amulet/level/interfaces/chunk/anvil/anvil_na.py,sha256=UcSd3LWjGdDmTvTfKF02UsAtnjLdQc1l_ZN3GpP3LHg,22007
180
180
  amulet/level/interfaces/chunk/anvil/base_anvil_interface.py,sha256=fG3nEkRxY9O-yvlBPFJW1abTb8Vw6Lhh7rjMJf7c1SA,11979
181
181
  amulet/level/translators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -191,7 +191,7 @@ amulet/level/translators/chunk/java/java_numerical_translator.py,sha256=q6JaPlyb
191
191
  amulet/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
192
192
  amulet/libs/leveldb/__init__.py,sha256=Vx5-eTINwbFdZqIh98belJZB0uPwJElQQ_cqtn16FJI,242
193
193
  amulet/operations/__init__.py,sha256=jB7iXP4vs9oC6GUBQQU7A3X7reYYC8jCghUfTGP39b4,141
194
- amulet/operations/clone.py,sha256=Eo1y_GBcScWD3Doj1O5ZA7XXRqxR4EmmENz9ZrkQmmE,587
194
+ amulet/operations/clone.py,sha256=QOUbCrldswL9qJS4l6CVX9qvuZKzmy5pswjHnbi3-_s,587
195
195
  amulet/operations/delete_chunk.py,sha256=-gs4FtWFZJ8E2pkzPGHmBXemLrMp3D7Rf80ZNJ39zJk,947
196
196
  amulet/operations/fill.py,sha256=IWDv5QvwR2KbfGGMrAKZ5xGJtIMrbZdbEMmPtolP9n8,901
197
197
  amulet/operations/paste.py,sha256=ITjnxvO7fP6773GlnK675Ii8Tg6BY1D4zmnhesKGHxk,1457
@@ -201,9 +201,9 @@ amulet/utils/format_utils.py,sha256=imePyp2OIWhDx_eklwjM_9lRBL_JD8NKH3unGNWuZWk,
201
201
  amulet/utils/generator.py,sha256=2pKToghl8irYozX5hBJYtjTQVzhljznPCi42hQKRGDQ,364
202
202
  amulet/utils/matrix.py,sha256=KSqluO0H6oHUfe0pU4Esv67pOmHFurK2BDOrZAeNxg8,7665
203
203
  amulet/utils/numpy_helpers.py,sha256=fM0rjZxbUqoTMTrFooZEVVhHfsqv0j_7KPGsjVq4ReM,1232
204
- amulet/utils/world_utils.py,sha256=xb6JPrrbwDF0_y4ZYjTJ1ieydL3COzzLosTgcxDDyRc,12559
205
- amulet_core-1.9.27.dist-info/METADATA,sha256=JHbdbbE_vOnp5zdLk3Eqgc9sZnvuCwgmQ8DuCTP_4rI,4270
206
- amulet_core-1.9.27.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
207
- amulet_core-1.9.27.dist-info/entry_points.txt,sha256=53zFNThTPzI8f9ertsyU2DoUpxdWU8rjOA_Cu4YH5Vk,63
208
- amulet_core-1.9.27.dist-info/top_level.txt,sha256=3ZqHzNDiIb9kV8TwSeeXxK_9haSrsu631Qe4ndDo0rc,7
209
- amulet_core-1.9.27.dist-info/RECORD,,
204
+ amulet/utils/world_utils.py,sha256=B7YL8LczNMHbFDd-LuffG2fOZfFp_Avv6LQpksaN674,12560
205
+ amulet_core-1.9.29.dist-info/METADATA,sha256=siG83H82WGWrfhgVreBOYL3nz-vGgGkFYBaV6T8VZ3w,4270
206
+ amulet_core-1.9.29.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
207
+ amulet_core-1.9.29.dist-info/entry_points.txt,sha256=53zFNThTPzI8f9ertsyU2DoUpxdWU8rjOA_Cu4YH5Vk,63
208
+ amulet_core-1.9.29.dist-info/top_level.txt,sha256=3ZqHzNDiIb9kV8TwSeeXxK_9haSrsu631Qe4ndDo0rc,7
209
+ amulet_core-1.9.29.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5