amulet-core 2.0a5__cp312-cp312-win_amd64.whl → 2.0a7__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.
- amulet/__init__.cp312-win_amd64.pyd +0 -0
- amulet/__init__.py.cpp +43 -0
- amulet/__init__.pyi +0 -2
- amulet/_init.py +0 -2
- amulet/_version.py +3 -3
- amulet/biome.py.cpp +122 -0
- amulet/biome.pyi +0 -2
- amulet/block.py.cpp +377 -0
- amulet/block.pyi +0 -2
- amulet/block_entity.py.cpp +115 -0
- amulet/block_entity.pyi +0 -2
- amulet/chunk.py.cpp +80 -0
- amulet/chunk.pyi +0 -2
- amulet/chunk_components/biome_3d_component.cpp +5 -0
- amulet/chunk_components/biome_3d_component.hpp +79 -0
- amulet/chunk_components/block_component.cpp +41 -0
- amulet/chunk_components/block_component.hpp +88 -0
- amulet/chunk_components/block_entity_component.cpp +5 -0
- amulet/chunk_components/block_entity_component.hpp +147 -0
- amulet/chunk_components/section_array_map.cpp +129 -0
- amulet/chunk_components/section_array_map.hpp +147 -0
- amulet/chunk_components.pyi +20 -18
- amulet/collections/eq.py.hpp +37 -0
- amulet/collections/hash.py.hpp +27 -0
- amulet/collections/holder.py.hpp +37 -0
- amulet/collections/iterator.py.hpp +80 -0
- amulet/collections/mapping.py.hpp +199 -0
- amulet/collections/mutable_mapping.py.hpp +226 -0
- amulet/collections/sequence.py.hpp +163 -0
- amulet/collections.pyi +8 -5
- amulet/entity.py +22 -20
- amulet/game/translate/_functions/_code_functions/_text.py +2 -2
- amulet/game/translate/_functions/abc.py +10 -3
- amulet/img/__init__.py +10 -0
- amulet/img/missing_no.png +0 -0
- amulet/img/missing_pack.png +0 -0
- amulet/img/missing_world.png +0 -0
- amulet/io/binary_reader.hpp +45 -0
- amulet/io/binary_writer.hpp +30 -0
- amulet/level/__init__.pyi +2 -6
- amulet/level/abc/_level/_creatable_level.py +1 -2
- amulet/level/abc/_level/_level.py +1 -5
- amulet/level/java/__init__.pyi +0 -5
- amulet/level/java/_raw/__init__.pyi +0 -4
- amulet/level/java/_raw/java_chunk_decode.cpp +531 -0
- amulet/level/java/_raw/java_chunk_decode.hpp +23 -0
- amulet/level/java/_raw/java_chunk_encode.cpp +25 -0
- amulet/level/java/_raw/java_chunk_encode.hpp +23 -0
- amulet/level/java/chunk_components/data_version_component.cpp +32 -0
- amulet/level/java/chunk_components/data_version_component.hpp +31 -0
- amulet/level/java/chunk_components/java_raw_chunk_component.cpp +56 -0
- amulet/level/java/chunk_components/java_raw_chunk_component.hpp +45 -0
- amulet/level/java/java_chunk.cpp +170 -0
- amulet/level/java/java_chunk.hpp +141 -0
- amulet/level/java/long_array.hpp +175 -0
- amulet/level/java/long_array.pyi +2 -1
- amulet/mesh/block/__init__.py +1 -0
- amulet/mesh/block/block_mesh.py +369 -0
- amulet/mesh/block/cube.py +149 -0
- amulet/mesh/block/missing_block.py +20 -0
- amulet/mesh/util.py +17 -0
- amulet/palette/biome_palette.hpp +85 -0
- amulet/palette/block_palette.cpp +32 -0
- amulet/palette/block_palette.hpp +93 -0
- amulet/player.py +4 -6
- amulet/pybind11/collections.hpp +118 -0
- amulet/pybind11/numpy.hpp +26 -0
- amulet/pybind11/py_module.hpp +34 -0
- amulet/pybind11/type_hints.hpp +51 -0
- amulet/pybind11/types.hpp +25 -0
- amulet/pybind11/typing.hpp +7 -0
- amulet/resource_pack/__init__.py +62 -0
- amulet/resource_pack/abc/__init__.py +2 -0
- amulet/resource_pack/abc/resource_pack.py +38 -0
- amulet/resource_pack/abc/resource_pack_manager.py +87 -0
- amulet/resource_pack/bedrock/__init__.py +2 -0
- amulet/resource_pack/bedrock/bedrock_vanilla_fix/pack_icon.png +0 -0
- amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/grass_carried.png +0 -0
- amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/grass_side_carried.png +0 -0
- amulet/resource_pack/bedrock/bedrock_vanilla_fix/textures/blocks/water.png +0 -0
- amulet/resource_pack/bedrock/blockshapes/__init__.py +31 -0
- amulet/resource_pack/bedrock/blockshapes/air.py +35 -0
- amulet/resource_pack/bedrock/blockshapes/base_blockshape.py +29 -0
- amulet/resource_pack/bedrock/blockshapes/bubble_column.py +29 -0
- amulet/resource_pack/bedrock/blockshapes/cake.py +46 -0
- amulet/resource_pack/bedrock/blockshapes/chest.py +54 -0
- amulet/resource_pack/bedrock/blockshapes/comparator.py +51 -0
- amulet/resource_pack/bedrock/blockshapes/cross_texture.py +186 -0
- amulet/resource_pack/bedrock/blockshapes/cross_texture0.py +17 -0
- amulet/resource_pack/bedrock/blockshapes/cross_texture_green.py +16 -0
- amulet/resource_pack/bedrock/blockshapes/cube.py +38 -0
- amulet/resource_pack/bedrock/blockshapes/default.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door.py +38 -0
- amulet/resource_pack/bedrock/blockshapes/door1.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door2.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door3.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door4.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door5.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/door6.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/double_plant.py +40 -0
- amulet/resource_pack/bedrock/blockshapes/enchanting_table.py +22 -0
- amulet/resource_pack/bedrock/blockshapes/farmland.py +22 -0
- amulet/resource_pack/bedrock/blockshapes/fence.py +22 -0
- amulet/resource_pack/bedrock/blockshapes/flat.py +55 -0
- amulet/resource_pack/bedrock/blockshapes/flat_wall.py +55 -0
- amulet/resource_pack/bedrock/blockshapes/furnace.py +44 -0
- amulet/resource_pack/bedrock/blockshapes/furnace_lit.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/green_cube.py +39 -0
- amulet/resource_pack/bedrock/blockshapes/ladder.py +36 -0
- amulet/resource_pack/bedrock/blockshapes/lilypad.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/partial_block.py +57 -0
- amulet/resource_pack/bedrock/blockshapes/piston.py +44 -0
- amulet/resource_pack/bedrock/blockshapes/piston_arm.py +72 -0
- amulet/resource_pack/bedrock/blockshapes/portal_frame.py +22 -0
- amulet/resource_pack/bedrock/blockshapes/pressure_plate.py +29 -0
- amulet/resource_pack/bedrock/blockshapes/pumpkin.py +36 -0
- amulet/resource_pack/bedrock/blockshapes/pumpkin_carved.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/pumpkin_lit.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/red_dust.py +14 -0
- amulet/resource_pack/bedrock/blockshapes/repeater.py +53 -0
- amulet/resource_pack/bedrock/blockshapes/slab.py +33 -0
- amulet/resource_pack/bedrock/blockshapes/slab_double.py +15 -0
- amulet/resource_pack/bedrock/blockshapes/tree.py +41 -0
- amulet/resource_pack/bedrock/blockshapes/turtle_egg.py +15 -0
- amulet/resource_pack/bedrock/blockshapes/vine.py +52 -0
- amulet/resource_pack/bedrock/blockshapes/wall.py +22 -0
- amulet/resource_pack/bedrock/blockshapes/water.py +38 -0
- amulet/resource_pack/bedrock/download_resources.py +147 -0
- amulet/resource_pack/bedrock/resource_pack.py +40 -0
- amulet/resource_pack/bedrock/resource_pack_manager.py +361 -0
- amulet/resource_pack/bedrock/sort_blockshapes.py +15 -0
- amulet/resource_pack/java/__init__.py +2 -0
- amulet/resource_pack/java/download_resources.py +212 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_black.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_blue.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_brown.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_cyan.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_gray.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_green.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_light_blue.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_light_gray.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_lime.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_magenta.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_orange.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_pink.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_purple.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_red.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_white.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/banner/banner_yellow.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/barrier.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/end_portal.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/grass.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/lava.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/structure_void.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/assets/minecraft/textures/block/water.png +0 -0
- amulet/resource_pack/java/java_vanilla_fix/pack.png +0 -0
- amulet/resource_pack/java/resource_pack.py +44 -0
- amulet/resource_pack/java/resource_pack_manager.py +551 -0
- amulet/resource_pack/unknown_resource_pack.py +10 -0
- amulet/utils/__init__.pyi +0 -5
- amulet/utils/call_spec/_call_spec.py +2 -7
- amulet/utils/comment_json.py +188 -0
- amulet/utils/matrix.py +3 -3
- amulet/utils/numpy.hpp +36 -0
- amulet/utils/numpy_helpers.py +2 -2
- amulet/utils/world_utils.py +2 -2
- amulet/version.py.cpp +281 -0
- amulet/version.pyi +0 -8
- {amulet_core-2.0a5.dist-info → amulet_core-2.0a7.dist-info}/METADATA +3 -3
- amulet_core-2.0a7.dist-info/RECORD +295 -0
- amulet/chunk_/components/biome.py +0 -155
- amulet/chunk_/components/block_entity.py +0 -117
- amulet/chunk_/components/entity.py +0 -64
- amulet/chunk_/components/height_2d.py +0 -16
- amulet/level/bedrock/__init__.py +0 -2
- amulet/level/bedrock/_chunk_handle.py +0 -19
- amulet/level/bedrock/_dimension.py +0 -22
- amulet/level/bedrock/_level.py +0 -187
- amulet/level/bedrock/_raw/__init__.py +0 -5
- amulet/level/bedrock/_raw/_actor_counter.py +0 -53
- amulet/level/bedrock/_raw/_chunk.py +0 -54
- amulet/level/bedrock/_raw/_chunk_decode.py +0 -668
- amulet/level/bedrock/_raw/_chunk_encode.py +0 -602
- amulet/level/bedrock/_raw/_constant.py +0 -9
- amulet/level/bedrock/_raw/_dimension.py +0 -343
- amulet/level/bedrock/_raw/_level.py +0 -463
- amulet/level/bedrock/_raw/_level_dat.py +0 -90
- amulet/level/bedrock/_raw/_typing.py +0 -6
- amulet/level/bedrock/_raw/leveldb_chunk_versions.py +0 -83
- amulet/level/bedrock/chunk/__init__.py +0 -1
- amulet/level/bedrock/chunk/_chunk.py +0 -126
- amulet/level/bedrock/chunk/components/chunk_version.py +0 -12
- amulet/level/bedrock/chunk/components/finalised_state.py +0 -13
- amulet/level/bedrock/chunk/components/raw_chunk.py +0 -15
- amulet/level/construction/__init__.py +0 -0
- amulet/level/java/_chunk_handle.pyi +0 -15
- amulet/level/java/_dimension.pyi +0 -13
- amulet/level/java/_level.pyi +0 -120
- amulet/level/java/_raw/_chunk_decode.py +0 -561
- amulet/level/java/_raw/_chunk_encode.py +0 -463
- amulet/level/java/_raw/_constant.pyi +0 -20
- amulet/level/java/_raw/_data_pack/__init__.pyi +0 -8
- amulet/level/java/_raw/_data_pack/data_pack.pyi +0 -197
- amulet/level/java/_raw/_data_pack/data_pack_manager.pyi +0 -75
- amulet/level/java/_raw/_dimension.pyi +0 -72
- amulet/level/java/_raw/_level.pyi +0 -238
- amulet/level/java/_raw/_typing.pyi +0 -5
- amulet/level/java/anvil/__init__.pyi +0 -11
- amulet/level/java/anvil/_dimension.pyi +0 -109
- amulet/level/java/anvil/_region.pyi +0 -197
- amulet/level/java/anvil/_sector_manager.pyi +0 -142
- amulet/level/java_forge/__init__.py +0 -0
- amulet/level/mcstructure/__init__.py +0 -0
- amulet/level/nbt/__init__.py +0 -0
- amulet/level/schematic/__init__.py +0 -0
- amulet/level/sponge_schematic/__init__.py +0 -0
- amulet/utils/call_spec/__init__.pyi +0 -53
- amulet/utils/call_spec/_call_spec.pyi +0 -272
- amulet/utils/matrix.pyi +0 -177
- amulet/utils/shareable_lock.pyi +0 -190
- amulet/utils/signal/__init__.pyi +0 -25
- amulet/utils/signal/_signal.pyi +0 -84
- amulet/utils/task_manager.pyi +0 -168
- amulet/utils/typing.py +0 -4
- amulet/utils/typing.pyi +0 -6
- amulet/utils/weakref.pyi +0 -50
- amulet/utils/world_utils.pyi +0 -109
- amulet_core-2.0a5.dist-info/RECORD +0 -210
- /amulet/{level/bedrock/chunk/components → mesh}/__init__.py +0 -0
- {amulet_core-2.0a5.dist-info → amulet_core-2.0a7.dist-info}/WHEEL +0 -0
- {amulet_core-2.0a5.dist-info → amulet_core-2.0a7.dist-info}/entry_points.txt +0 -0
- {amulet_core-2.0a5.dist-info → amulet_core-2.0a7.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from typing import Any, Protocol, cast, Self, ClassVar
|
|
4
|
-
from abc import
|
|
3
|
+
from typing import Any, Protocol, cast, Self, ClassVar, TypeVar
|
|
4
|
+
from abc import abstractmethod, ABCMeta
|
|
5
5
|
|
|
6
6
|
from amulet_nbt import (
|
|
7
7
|
read_snbt,
|
|
@@ -65,10 +65,17 @@ class Data(Protocol):
|
|
|
65
65
|
def __eq__(self, other: Any) -> bool: ...
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
class TranslationFunctionProtocol(Protocol):
|
|
69
|
+
_instances: ClassVar[dict[Self, Self]]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
T = TypeVar("T", bound=TranslationFunctionProtocol)
|
|
73
|
+
|
|
74
|
+
|
|
68
75
|
class CacheMeta(ABCMeta):
|
|
69
76
|
"""This modifies the construction of the instance to always return a cached instance, if one exists."""
|
|
70
77
|
|
|
71
|
-
def __call__(cls: type[
|
|
78
|
+
def __call__(cls: type[T], *args: Any, **kwargs: Any) -> T: # type: ignore
|
|
72
79
|
obj = cls.__new__(cls)
|
|
73
80
|
obj.__init__(*args, **kwargs) # type: ignore
|
|
74
81
|
return cls._instances.setdefault(obj, obj)
|
amulet/img/__init__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def _get_path(file: str) -> str:
|
|
5
|
+
return os.path.abspath(os.path.join(os.path.dirname(__file__), file))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
missing_no_icon_path = _get_path("missing_no.png")
|
|
9
|
+
missing_pack_icon_path = _get_path("missing_pack.png")
|
|
10
|
+
missing_world_icon_path = _get_path("missing_world.png")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <string>
|
|
4
|
+
#include <cstdint>
|
|
5
|
+
#include <cstring>
|
|
6
|
+
#include <algorithm>
|
|
7
|
+
#include <bit>
|
|
8
|
+
#include <functional>
|
|
9
|
+
#include <stdexcept>
|
|
10
|
+
#include <memory>
|
|
11
|
+
|
|
12
|
+
#include <amulet_nbt/io/binary_reader.hpp>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace Amulet {
|
|
16
|
+
class BinaryReader: public AmuletNBT::BinaryReader {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
public:
|
|
20
|
+
BinaryReader(
|
|
21
|
+
const std::string& input,
|
|
22
|
+
size_t& position
|
|
23
|
+
) : AmuletNBT::BinaryReader(input, position, std::endian::little, [](const std::string& value) {return value; }) {}
|
|
24
|
+
|
|
25
|
+
std::string readSizeAndBytes() {
|
|
26
|
+
std::uint64_t length;
|
|
27
|
+
readNumericInto<std::uint64_t>(length);
|
|
28
|
+
// Ensure the buffer is long enough
|
|
29
|
+
if (position + length > data.size()) {
|
|
30
|
+
throw std::out_of_range("Cannot read string of length " + std::to_string(length) + " at position " + std::to_string(position));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
std::string value = data.substr(position, length);
|
|
34
|
+
position += length;
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
template <class T>
|
|
40
|
+
std::shared_ptr<T> deserialise(const std::string& data){
|
|
41
|
+
size_t position = 0;
|
|
42
|
+
BinaryReader reader(data, position);
|
|
43
|
+
return T::deserialise(reader);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <string>
|
|
4
|
+
#include <cstdint>
|
|
5
|
+
#include <cstring>
|
|
6
|
+
#include <algorithm>
|
|
7
|
+
#include <bit>
|
|
8
|
+
#include <functional>
|
|
9
|
+
|
|
10
|
+
#include <amulet_nbt/io/binary_writer.hpp>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
namespace Amulet {
|
|
14
|
+
class BinaryWriter: public AmuletNBT::BinaryWriter {
|
|
15
|
+
public:
|
|
16
|
+
BinaryWriter(): AmuletNBT::BinaryWriter(std::endian::little, [](const std::string& value) {return value; }) {}
|
|
17
|
+
|
|
18
|
+
void writeSizeAndBytes(const std::string& value) {
|
|
19
|
+
writeNumeric<std::uint64_t>(value.size());
|
|
20
|
+
data.append(value);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
template <typename T>
|
|
25
|
+
std::string serialise(const T& obj){
|
|
26
|
+
BinaryWriter writer;
|
|
27
|
+
obj.serialise(writer);
|
|
28
|
+
return writer.getBuffer();
|
|
29
|
+
}
|
|
30
|
+
}
|
amulet/level/__init__.pyi
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
3
|
from amulet.level._load import (
|
|
6
4
|
NoValidLevel,
|
|
7
5
|
get_level,
|
|
@@ -11,17 +9,15 @@ from amulet.level._load import (
|
|
|
11
9
|
from amulet.level.abc._level._level import Level
|
|
12
10
|
from amulet.level.java._level import JavaLevel
|
|
13
11
|
|
|
14
|
-
from . import java
|
|
12
|
+
from . import _load, abc, java
|
|
15
13
|
|
|
16
14
|
__all__ = [
|
|
17
15
|
"JavaLevel",
|
|
18
16
|
"Level",
|
|
19
17
|
"NoValidLevel",
|
|
18
|
+
"abc",
|
|
20
19
|
"get_level",
|
|
21
20
|
"java",
|
|
22
21
|
"register_level_class",
|
|
23
22
|
"unregister_level_class",
|
|
24
23
|
]
|
|
25
|
-
|
|
26
|
-
def __dir__() -> typing.Any: ...
|
|
27
|
-
def __getattr__(arg0: typing.Any) -> typing.Any: ...
|
|
@@ -2,7 +2,6 @@ from __future__ import annotations
|
|
|
2
2
|
from abc import ABC, abstractmethod
|
|
3
3
|
from typing import TYPE_CHECKING, Any
|
|
4
4
|
|
|
5
|
-
from amulet.utils.typing import Intersection
|
|
6
5
|
from amulet.utils.call_spec import method_spec
|
|
7
6
|
|
|
8
7
|
|
|
@@ -18,7 +17,7 @@ class CreatableLevel(ABC):
|
|
|
18
17
|
@classmethod
|
|
19
18
|
@abstractmethod
|
|
20
19
|
@method_spec()
|
|
21
|
-
def create(cls, *args: Any, **kwargs: Any) ->
|
|
20
|
+
def create(cls, *args: Any, **kwargs: Any) -> Level:
|
|
22
21
|
"""
|
|
23
22
|
Create a new instance without any existing data.
|
|
24
23
|
You must call :meth:`~amulet.level.abc.Level.open` to open the level for editing.
|
|
@@ -3,16 +3,15 @@ from __future__ import annotations
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
from typing import TYPE_CHECKING, Optional, TypeVar, Type, Generic, Iterator, Callable
|
|
5
5
|
from contextlib import contextmanager, AbstractContextManager as ContextManager
|
|
6
|
-
import os
|
|
7
6
|
import logging
|
|
8
7
|
from weakref import finalize
|
|
9
8
|
|
|
10
9
|
from runtime_final import final
|
|
11
10
|
from PIL import Image
|
|
12
11
|
|
|
13
|
-
from amulet import IMG_DIRECTORY
|
|
14
12
|
from amulet.version import PlatformType, VersionNumber
|
|
15
13
|
from amulet.data_types import DimensionId
|
|
14
|
+
from amulet.img import missing_world_icon_path
|
|
16
15
|
|
|
17
16
|
from amulet.chunk import Chunk
|
|
18
17
|
|
|
@@ -31,9 +30,6 @@ if TYPE_CHECKING:
|
|
|
31
30
|
|
|
32
31
|
log = logging.getLogger(__name__)
|
|
33
32
|
|
|
34
|
-
missing_world_icon_path = os.path.abspath(
|
|
35
|
-
os.path.join(IMG_DIRECTORY, "missing_world_icon.png")
|
|
36
|
-
)
|
|
37
33
|
missing_world_icon: Optional[Image.Image] = None
|
|
38
34
|
|
|
39
35
|
|
amulet/level/java/__init__.pyi
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import typing
|
|
4
|
-
|
|
5
3
|
from amulet.level.java._level import JavaLevel
|
|
6
4
|
|
|
7
5
|
from . import (
|
|
@@ -16,6 +14,3 @@ from . import (
|
|
|
16
14
|
)
|
|
17
15
|
|
|
18
16
|
__all__ = ["JavaLevel", "anvil", "chunk", "chunk_components", "long_array"]
|
|
19
|
-
|
|
20
|
-
def __dir__() -> typing.Any: ...
|
|
21
|
-
def __getattr__(arg0: typing.Any) -> typing.Any: ...
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import typing
|
|
4
3
|
from builtins import str as InternalDimensionId
|
|
5
4
|
|
|
6
5
|
from amulet.level.java._raw._dimension import JavaRawDimension
|
|
@@ -14,6 +13,3 @@ __all__ = [
|
|
|
14
13
|
"JavaRawDimension",
|
|
15
14
|
"JavaRawLevel",
|
|
16
15
|
]
|
|
17
|
-
|
|
18
|
-
def __dir__() -> typing.Any: ...
|
|
19
|
-
def __getattr__(arg0: typing.Any) -> typing.Any: ...
|