amulet-core 2.0.3a2__tar.gz → 2.0.3a3__tar.gz

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 (84) hide show
  1. {amulet_core-2.0.3a2/src/amulet_core.egg-info → amulet_core-2.0.3a3}/PKG-INFO +1 -1
  2. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/_version.py +3 -3
  3. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/biome/biome.cpp +1 -1
  4. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block/block.py.cpp +9 -0
  5. amulet_core-2.0.3a3/src/amulet/core/block_entity/block_entity.cpp +51 -0
  6. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/biome_3d_component.cpp +31 -3
  7. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/biome_3d_component.hpp +3 -0
  8. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_entity_component.cpp +38 -4
  9. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/section_array_map.py.cpp +9 -0
  10. amulet_core-2.0.3a3/src/amulet/core/entity/entity.cpp +64 -0
  11. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/version/version.cpp +4 -4
  12. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3/src/amulet_core.egg-info}/PKG-INFO +1 -1
  13. amulet_core-2.0.3a2/src/amulet/core/block_entity/block_entity.cpp +0 -26
  14. amulet_core-2.0.3a2/src/amulet/core/entity/entity.cpp +0 -29
  15. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/CMakeLists.txt +0 -0
  16. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/MANIFEST.in +0 -0
  17. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/README.md +0 -0
  18. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/build_requires.py +0 -0
  19. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/get_compiler/CMakeLists.txt +0 -0
  20. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/get_compiler/__init__.py +0 -0
  21. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/pyproject.toml +0 -0
  22. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/requirements.py +0 -0
  23. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/setup.cfg +0 -0
  24. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/setup.py +0 -0
  25. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/__init__.py +0 -0
  26. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/__pyinstaller/__init__.py +0 -0
  27. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/__pyinstaller/hook-amulet.core.py +0 -0
  28. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/_amulet_core.py.cpp +0 -0
  29. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/_amulet_core.pyi +0 -0
  30. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/amulet_coreConfig.cmake +0 -0
  31. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/biome/__init__.pyi +0 -0
  32. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/biome/biome.hpp +0 -0
  33. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/biome/biome.py.cpp +0 -0
  34. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block/__init__.pyi +0 -0
  35. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block/block.cpp +0 -0
  36. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block/block.hpp +0 -0
  37. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block_entity/__init__.pyi +0 -0
  38. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block_entity/block_entity.hpp +0 -0
  39. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/block_entity/block_entity.py.cpp +0 -0
  40. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/__init__.pyi +0 -0
  41. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/chunk.cpp +0 -0
  42. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/chunk.hpp +0 -0
  43. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/chunk.py.cpp +0 -0
  44. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/__init__.pyi +0 -0
  45. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/__init_chunk_components.py.cpp +0 -0
  46. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_component.cpp +0 -0
  47. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_component.hpp +0 -0
  48. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_component.py.cpp +0 -0
  49. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_component.pyi +0 -0
  50. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/block_entity_component.hpp +0 -0
  51. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/section_array_map.cpp +0 -0
  52. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/section_array_map.hpp +0 -0
  53. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/chunk/component/section_array_map.pyi +0 -0
  54. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/dll.hpp +0 -0
  55. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/entity/__init__.pyi +0 -0
  56. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/entity/entity.hpp +0 -0
  57. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/entity/entity.py.cpp +0 -0
  58. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/__init__.pyi +0 -0
  59. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/__init_palette.py.cpp +0 -0
  60. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/biome_palette.cpp +0 -0
  61. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/biome_palette.hpp +0 -0
  62. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/biome_palette.py.cpp +0 -0
  63. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/biome_palette.pyi +0 -0
  64. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/block_palette.cpp +0 -0
  65. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/block_palette.hpp +0 -0
  66. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/block_palette.py.cpp +0 -0
  67. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/palette/block_palette.pyi +0 -0
  68. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/py.typed +0 -0
  69. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/__init__.pyi +0 -0
  70. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/__init_selection.py.cpp +0 -0
  71. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/box.cpp +0 -0
  72. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/box.hpp +0 -0
  73. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/box.pyi +0 -0
  74. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/group.cpp +0 -0
  75. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/group.hpp +0 -0
  76. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/selection/group.pyi +0 -0
  77. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/version/__init__.pyi +0 -0
  78. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/version/version.hpp +0 -0
  79. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet/core/version/version.py.cpp +0 -0
  80. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet_core.egg-info/SOURCES.txt +0 -0
  81. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet_core.egg-info/dependency_links.txt +0 -0
  82. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet_core.egg-info/entry_points.txt +0 -0
  83. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet_core.egg-info/requires.txt +0 -0
  84. {amulet_core-2.0.3a2 → amulet_core-2.0.3a3}/src/amulet_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amulet-core
3
- Version: 2.0.3a2
3
+ Version: 2.0.3a3
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
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2025-06-27T16:04:02+0100",
11
+ "date": "2025-06-30T07:54:37+0100",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "e066fffa9dd7f65769e62a638a8b55659eae70d0",
15
- "version": "2.0.3a2"
14
+ "full-revisionid": "3d4ebbe5b281a06285d5e207cbbe5909f0e22a75",
15
+ "version": "2.0.3a3"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -34,7 +34,7 @@ Biome Biome::deserialise(BinaryReader& reader)
34
34
  return { platform, version, namespace_, base_name };
35
35
  }
36
36
  default:
37
- throw std::invalid_argument("Unsupported version " + std::to_string(version_number));
37
+ throw std::invalid_argument("Unsupported Biome version " + std::to_string(version_number));
38
38
  }
39
39
  }
40
40
 
@@ -291,6 +291,15 @@ void init_block(py::module m_parent)
291
291
  py::tuple(py::cast(self.get_blocks())));
292
292
  });
293
293
 
294
+ BlockStack.def(
295
+ py::pickle(
296
+ [](const Amulet::BlockStack& self) -> py::bytes {
297
+ return py::bytes(Amulet::serialise(self));
298
+ },
299
+ [](py::bytes state) {
300
+ return Amulet::deserialise<Amulet::BlockStack>(state.cast<std::string>());
301
+ }));
302
+
294
303
  pyext::collections::def_Sequence_getitem_slice(BlockStack);
295
304
  pyext::collections::def_Sequence_contains(BlockStack);
296
305
  pyext::collections::def_Sequence_iter<Amulet::Block>(BlockStack);
@@ -0,0 +1,51 @@
1
+ #include <amulet/nbt/nbt_encoding/binary.hpp>
2
+
3
+ #include <amulet/core/dll.hpp>
4
+
5
+ #include "block_entity.hpp"
6
+
7
+ namespace Amulet {
8
+
9
+ void BlockEntity::serialise(BinaryWriter& writer) const
10
+ {
11
+ writer.write_numeric<std::uint8_t>(1);
12
+ writer.write_size_and_bytes(get_platform());
13
+ get_version().serialise(writer);
14
+ writer.write_size_and_bytes(_namespace);
15
+ writer.write_size_and_bytes(_base_name);
16
+ Amulet::NBT::encode_nbt(writer, *_nbt);
17
+ }
18
+
19
+ BlockEntity BlockEntity::deserialise(BinaryReader& reader)
20
+ {
21
+ auto version_number = reader.read_numeric<std::uint8_t>();
22
+ switch (version_number) {
23
+ case 1: {
24
+ std::string platform { reader.read_size_and_bytes() };
25
+ VersionNumber version = VersionNumber::deserialise(reader);
26
+ std::string namespace_ { reader.read_size_and_bytes() };
27
+ std::string base_name { reader.read_size_and_bytes() };
28
+ auto named_tag = std::make_shared<Amulet::NBT::NamedTag>(Amulet::NBT::decode_nbt(reader));
29
+ return BlockEntity {
30
+ std::move(platform),
31
+ std::move(version),
32
+ std::move(namespace_),
33
+ std::move(base_name),
34
+ std::move(named_tag)
35
+ };
36
+ }
37
+ default:
38
+ throw std::invalid_argument("Unsupported BlockEntity version " + std::to_string(version_number));
39
+ }
40
+ }
41
+
42
+ bool BlockEntity::operator==(const BlockEntity& other) const
43
+ {
44
+ return (
45
+ PlatformVersionContainer::operator==(other)
46
+ && _namespace == other._namespace
47
+ && _base_name == other._base_name
48
+ && Amulet::NBT::NBTTag_eq(*_nbt, *other._nbt));
49
+ }
50
+
51
+ }
@@ -6,14 +6,42 @@ namespace Amulet {
6
6
 
7
7
  // Biome3DComponent
8
8
 
9
+ void Biome3DComponentData::serialise(BinaryWriter& writer) const
10
+ {
11
+ writer.write_numeric<std::uint8_t>(1);
12
+ _palette->serialise(writer);
13
+ _sections->serialise(writer);
14
+ }
15
+ Biome3DComponentData Biome3DComponentData::deserialise(BinaryReader& reader)
16
+ {
17
+ auto version_number = reader.read_numeric<std::uint8_t>();
18
+ switch (version_number) {
19
+ case 1: {
20
+ auto palette = std::make_shared<BiomePalette>(BiomePalette::deserialise(reader));
21
+ auto sections = std::make_shared<SectionArrayMap>(SectionArrayMap::deserialise(reader));
22
+ return Biome3DComponentData { std::move(palette), std::move(sections) };
23
+ }
24
+ default:
25
+ throw std::invalid_argument("Unsupported Biome3DComponentData version " + std::to_string(version_number));
26
+ }
27
+ }
28
+
9
29
  std::optional<std::string> Biome3DComponent::serialise() const
10
30
  {
11
- throw std::runtime_error("NotImplementedError");
31
+ if (_value) {
32
+ return Amulet::serialise(**_value);
33
+ } else {
34
+ return std::nullopt;
35
+ }
12
36
  }
13
37
  // Deserialise the component
14
- void Biome3DComponent::deserialise(std::optional<std::string>)
38
+ void Biome3DComponent::deserialise(std::optional<std::string> data)
15
39
  {
16
- throw std::runtime_error("NotImplementedError");
40
+ if (data) {
41
+ _value = std::make_shared<Biome3DComponentData>(Amulet::deserialise<Biome3DComponentData>(*data));
42
+ } else {
43
+ _value = std::nullopt;
44
+ }
17
45
  }
18
46
 
19
47
  const std::string Biome3DComponent::ComponentID = "Amulet::Biome3DComponent";
@@ -59,6 +59,9 @@ public:
59
59
  std::shared_ptr<BiomePalette> get_palette_ptr() { return _palette; }
60
60
  SectionArrayMap& get_sections() { return *_sections; }
61
61
  std::shared_ptr<SectionArrayMap> get_sections_ptr() { return _sections; }
62
+
63
+ AMULET_CORE_EXPORT void serialise(BinaryWriter&) const;
64
+ AMULET_CORE_EXPORT static Biome3DComponentData deserialise(BinaryReader&);
62
65
  };
63
66
 
64
67
  class Biome3DComponent {
@@ -6,13 +6,47 @@ namespace Amulet {
6
6
 
7
7
  // BlockEntityComponentData
8
8
 
9
- void BlockEntityComponentData::serialise(BinaryWriter&) const
9
+ void BlockEntityComponentData::serialise(BinaryWriter& writer) const
10
10
  {
11
- throw std::runtime_error("NotImplementedError");
11
+ writer.write_numeric<std::uint8_t>(1);
12
+ get_version_range().serialise(writer);
13
+ writer.write_numeric<std::uint16_t>(get_x_size());
14
+ writer.write_numeric<std::uint16_t>(get_z_size());
15
+
16
+ writer.write_numeric<std::uint64_t>(get_block_entities().size());
17
+ for (const auto& [coord, block_entity] : get_block_entities()) {
18
+ writer.write_numeric<std::uint16_t>(std::get<0>(coord));
19
+ writer.write_numeric<std::int64_t>(std::get<1>(coord));
20
+ writer.write_numeric<std::uint16_t>(std::get<2>(coord));
21
+ block_entity->serialise(writer);
22
+ }
12
23
  }
13
- BlockEntityComponentData BlockEntityComponentData::deserialise(BinaryReader&)
24
+ BlockEntityComponentData BlockEntityComponentData::deserialise(BinaryReader& reader)
14
25
  {
15
- throw std::runtime_error("NotImplementedError");
26
+ auto version_number = reader.read_numeric<std::uint8_t>();
27
+ switch (version_number) {
28
+ case 1: {
29
+ auto version_range = VersionRange::deserialise(reader);
30
+ auto x_size = reader.read_numeric<std::uint16_t>();
31
+ auto z_size = reader.read_numeric<std::uint16_t>();
32
+ BlockEntityComponentData block_entities {
33
+ std::move(version_range),
34
+ x_size,
35
+ z_size
36
+ };
37
+ auto block_entity_count = reader.read_numeric<std::uint64_t>();
38
+ for (std::uint16_t i = 0; i < block_entity_count; i++) {
39
+ auto dx = reader.read_numeric<std::uint16_t>();
40
+ auto y = reader.read_numeric<std::int64_t>();
41
+ auto dz = reader.read_numeric<std::uint16_t>();
42
+ auto block_entity = std::make_shared<BlockEntity>(BlockEntity::deserialise(reader));
43
+ block_entities.set({ dx, y, dz }, std::move(block_entity));
44
+ }
45
+ return block_entities;
46
+ }
47
+ default:
48
+ throw std::invalid_argument("Unsupported BlockEntityComponentData version " + std::to_string(version_number));
49
+ }
16
50
  }
17
51
 
18
52
  // BlockEntityComponent
@@ -233,5 +233,14 @@ py::module init_section_array_map(py::module m_parent)
233
233
  pyext::collections::def_MutableMapping_setdefault<std::int64_t, pyext::numpy::array_t<std::uint32_t>>(SectionArrayMap);
234
234
  pyext::collections::register_MutableMapping(SectionArrayMap);
235
235
 
236
+ SectionArrayMap.def(
237
+ py::pickle(
238
+ [](const Amulet::SectionArrayMap& self) -> py::bytes {
239
+ return py::bytes(Amulet::serialise(self));
240
+ },
241
+ [](py::bytes state) {
242
+ return Amulet::deserialise<Amulet::SectionArrayMap>(state.cast<std::string>());
243
+ }));
244
+
236
245
  return m;
237
246
  }
@@ -0,0 +1,64 @@
1
+ #include <amulet/nbt/nbt_encoding/binary.hpp>
2
+
3
+ #include <amulet/core/dll.hpp>
4
+ #include <amulet/core/version/version.hpp>
5
+
6
+ #include "entity.hpp"
7
+
8
+ namespace Amulet {
9
+
10
+ void Entity::serialise(BinaryWriter& writer) const
11
+ {
12
+ writer.write_numeric<std::uint8_t>(1);
13
+ writer.write_size_and_bytes(get_platform());
14
+ get_version().serialise(writer);
15
+ writer.write_size_and_bytes(_namespace);
16
+ writer.write_size_and_bytes(_base_name);
17
+ writer.write_numeric<double>(_x);
18
+ writer.write_numeric<double>(_y);
19
+ writer.write_numeric<double>(_z);
20
+ Amulet::NBT::encode_nbt(writer, *_nbt);
21
+ }
22
+
23
+ Entity Entity::deserialise(BinaryReader& reader)
24
+ {
25
+ auto version_number = reader.read_numeric<std::uint8_t>();
26
+ switch (version_number) {
27
+ case 1: {
28
+ std::string platform { reader.read_size_and_bytes() };
29
+ VersionNumber version = VersionNumber::deserialise(reader);
30
+ std::string namespace_ { reader.read_size_and_bytes() };
31
+ std::string base_name { reader.read_size_and_bytes() };
32
+ double x = reader.read_numeric<double>();
33
+ double y = reader.read_numeric<double>();
34
+ double z = reader.read_numeric<double>();
35
+ auto named_tag = std::make_shared<Amulet::NBT::NamedTag>(Amulet::NBT::decode_nbt(reader));
36
+ return Entity {
37
+ std::move(platform),
38
+ std::move(version),
39
+ std::move(namespace_),
40
+ std::move(base_name),
41
+ x,
42
+ y,
43
+ z,
44
+ std::move(named_tag)
45
+ };
46
+ }
47
+ default:
48
+ throw std::invalid_argument("Unsupported BlockEntity version " + std::to_string(version_number));
49
+ }
50
+ }
51
+
52
+ bool Entity::operator==(const Entity& other) const
53
+ {
54
+ return (
55
+ PlatformVersionContainer::operator==(other)
56
+ && _namespace == other._namespace
57
+ && _base_name == other._base_name
58
+ && _x == other._x
59
+ && _y == other._y
60
+ && _z == other._z
61
+ && Amulet::NBT::NBTTag_eq(*_nbt, *other._nbt));
62
+ }
63
+
64
+ } // namespace Amulet
@@ -31,7 +31,7 @@ VersionNumber VersionNumber::deserialise(BinaryReader& reader)
31
31
  return vec;
32
32
  }
33
33
  default:
34
- throw std::invalid_argument("Unsupported version " + std::to_string(version_number));
34
+ throw std::invalid_argument("Unsupported VersionNumber version " + std::to_string(version_number));
35
35
  }
36
36
  }
37
37
 
@@ -89,7 +89,7 @@ PlatformVersionContainer PlatformVersionContainer::deserialise(BinaryReader& rea
89
89
  return { platform, version };
90
90
  }
91
91
  default:
92
- throw std::invalid_argument("Unsupported version " + std::to_string(version_number));
92
+ throw std::invalid_argument("Unsupported PlatformVersionContainer version " + std::to_string(version_number));
93
93
  }
94
94
  }
95
95
 
@@ -112,7 +112,7 @@ VersionRange VersionRange::deserialise(BinaryReader& reader)
112
112
  return { platform, min_version, max_version };
113
113
  }
114
114
  default:
115
- throw std::invalid_argument("Unsupported version " + std::to_string(version_number));
115
+ throw std::invalid_argument("Unsupported VersionRange version " + std::to_string(version_number));
116
116
  }
117
117
  }
118
118
 
@@ -140,7 +140,7 @@ VersionRangeContainer VersionRangeContainer::deserialise(BinaryReader& reader)
140
140
  return VersionRange::deserialise(reader);
141
141
  }
142
142
  default:
143
- throw std::invalid_argument("Unsupported version " + std::to_string(version_number));
143
+ throw std::invalid_argument("Unsupported VersionRangeContainer version " + std::to_string(version_number));
144
144
  }
145
145
  }
146
146
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amulet-core
3
- Version: 2.0.3a2
3
+ Version: 2.0.3a3
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
@@ -1,26 +0,0 @@
1
- #include <amulet/core/dll.hpp>
2
-
3
- #include "block_entity.hpp"
4
-
5
- namespace Amulet {
6
-
7
- void BlockEntity::serialise(BinaryWriter&) const
8
- {
9
- throw std::runtime_error("NotImplementedError");
10
- }
11
-
12
- BlockEntity BlockEntity::deserialise(BinaryReader&)
13
- {
14
- throw std::runtime_error("NotImplementedError");
15
- }
16
-
17
- bool BlockEntity::operator==(const BlockEntity& other) const
18
- {
19
- return (
20
- PlatformVersionContainer::operator==(other)
21
- && _namespace == other._namespace
22
- && _base_name == other._base_name
23
- && Amulet::NBT::NBTTag_eq(*_nbt, *other._nbt));
24
- }
25
-
26
- }
@@ -1,29 +0,0 @@
1
- #include <amulet/core/dll.hpp>
2
- #include <amulet/core/version/version.hpp>
3
-
4
- #include "entity.hpp"
5
-
6
- namespace Amulet {
7
-
8
- void Entity::serialise(BinaryWriter&) const
9
- {
10
- throw std::runtime_error("NotImplementedError");
11
- }
12
- Entity Entity::deserialise(BinaryReader&)
13
- {
14
- throw std::runtime_error("NotImplementedError");
15
- }
16
-
17
- bool Entity::operator==(const Entity& other) const
18
- {
19
- return (
20
- PlatformVersionContainer::operator==(other)
21
- && _namespace == other._namespace
22
- && _base_name == other._base_name
23
- && _x == other._x
24
- && _y == other._y
25
- && _z == other._z
26
- && Amulet::NBT::NBTTag_eq(*_nbt, *other._nbt));
27
- }
28
-
29
- } // namespace Amulet
File without changes
File without changes
File without changes
File without changes