mcdex 0.1.0.dev0__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.
- mcdex/__init__.py +281 -0
- mcdex/advancements/__init__.py +16 -0
- mcdex/advancements/_mc_advancements.py +3558 -0
- mcdex/advancements/advancements.json +12101 -0
- mcdex/attributes/__init__.py +16 -0
- mcdex/attributes/_mc_attributes.py +83 -0
- mcdex/attributes/attributes.json +289 -0
- mcdex/banner_patterns/__init__.py +16 -0
- mcdex/banner_patterns/_mc_banner_patterns.py +86 -0
- mcdex/banner_patterns/banner_patterns.json +310 -0
- mcdex/base/__init__.py +146 -0
- mcdex/base/_advancement_id.py +22 -0
- mcdex/base/_attribute_id.py +22 -0
- mcdex/base/_banner_pattern_id.py +26 -0
- mcdex/base/_biome_id.py +22 -0
- mcdex/base/_block_entity_id.py +22 -0
- mcdex/base/_block_id.py +35 -0
- mcdex/base/_cat_sound_variant_id.py +23 -0
- mcdex/base/_cat_variant_id.py +22 -0
- mcdex/base/_catalogue_meta.py +38 -0
- mcdex/base/_chicken_sound_variant_id.py +23 -0
- mcdex/base/_chicken_variant_id.py +23 -0
- mcdex/base/_cow_sound_variant_id.py +23 -0
- mcdex/base/_cow_variant_id.py +22 -0
- mcdex/base/_damage_type_id.py +21 -0
- mcdex/base/_dimension_id.py +21 -0
- mcdex/base/_effect_id.py +21 -0
- mcdex/base/_enchantment_id.py +22 -0
- mcdex/base/_entity_id.py +35 -0
- mcdex/base/_equipment_slot.py +34 -0
- mcdex/base/_frog_variant_id.py +22 -0
- mcdex/base/_game_id.py +88 -0
- mcdex/base/_game_rule_id.py +21 -0
- mcdex/base/_item_id.py +98 -0
- mcdex/base/_mc_thing.py +289 -0
- mcdex/base/_mc_version.py +140 -0
- mcdex/base/_music_id.py +25 -0
- mcdex/base/_not_in_version.py +68 -0
- mcdex/base/_painting_variant_id.py +23 -0
- mcdex/base/_particle_id.py +21 -0
- mcdex/base/_pig_sound_variant_id.py +23 -0
- mcdex/base/_pig_variant_id.py +22 -0
- mcdex/base/_potion_id.py +25 -0
- mcdex/base/_potion_modifier.py +30 -0
- mcdex/base/_sound_id.py +21 -0
- mcdex/base/_statistic_id.py +22 -0
- mcdex/base/_structure_id.py +21 -0
- mcdex/base/_trim_material_id.py +26 -0
- mcdex/base/_trim_pattern_id.py +25 -0
- mcdex/base/_version.py +188 -0
- mcdex/base/_villager_profession_id.py +24 -0
- mcdex/base/_villager_type_id.py +25 -0
- mcdex/base/_wolf_sound_variant_id.py +23 -0
- mcdex/base/_wolf_variant_id.py +22 -0
- mcdex/base/_zombie_nautilus_variant_id.py +23 -0
- mcdex/biomes/__init__.py +16 -0
- mcdex/biomes/_mc_biomes.py +137 -0
- mcdex/biomes/biomes.json +652 -0
- mcdex/block_entities/__init__.py +16 -0
- mcdex/block_entities/_mc_block_entities.py +95 -0
- mcdex/block_entities/block_entities.json +331 -0
- mcdex/blocks/__init__.py +16 -0
- mcdex/blocks/_mc_blocks.py +1338 -0
- mcdex/blocks/blocks.json +7770 -0
- mcdex/cat_sound_variants/__init__.py +16 -0
- mcdex/cat_sound_variants/_mc_cat_sound_variants.py +47 -0
- mcdex/cat_sound_variants/cat_sound_variants.json +25 -0
- mcdex/cat_variants/__init__.py +16 -0
- mcdex/cat_variants/_mc_cat_variants.py +54 -0
- mcdex/cat_variants/cat_variants.json +91 -0
- mcdex/chicken_sound_variants/__init__.py +17 -0
- mcdex/chicken_sound_variants/_mc_chicken_sound_variants.py +48 -0
- mcdex/chicken_sound_variants/chicken_sound_variants.json +24 -0
- mcdex/chicken_variants/__init__.py +16 -0
- mcdex/chicken_variants/_mc_chicken_variants.py +47 -0
- mcdex/chicken_variants/chicken_variants.json +30 -0
- mcdex/cow_sound_variants/__init__.py +16 -0
- mcdex/cow_sound_variants/_mc_cow_sound_variants.py +47 -0
- mcdex/cow_sound_variants/cow_sound_variants.json +24 -0
- mcdex/cow_variants/__init__.py +16 -0
- mcdex/cow_variants/_mc_cow_variants.py +47 -0
- mcdex/cow_variants/cow_variants.json +30 -0
- mcdex/damage_types/__init__.py +16 -0
- mcdex/damage_types/_mc_damage_types.py +94 -0
- mcdex/damage_types/damage_types.json +317 -0
- mcdex/dimensions/__init__.py +16 -0
- mcdex/dimensions/_mc_dimensions.py +46 -0
- mcdex/dimensions/dimensions.json +29 -0
- mcdex/effects/__init__.py +16 -0
- mcdex/effects/_mc_effects.py +83 -0
- mcdex/effects/effects.json +251 -0
- mcdex/enchantments/__init__.py +16 -0
- mcdex/enchantments/_mc_enchantments.py +86 -0
- mcdex/enchantments/enchantments.json +270 -0
- mcdex/entities/__init__.py +16 -0
- mcdex/entities/_mc_entities.py +206 -0
- mcdex/entities/entities.json +1042 -0
- mcdex/frog_variants/__init__.py +16 -0
- mcdex/frog_variants/_mc_frog_variants.py +47 -0
- mcdex/frog_variants/frog_variants.json +29 -0
- mcdex/game_rules/__init__.py +16 -0
- mcdex/game_rules/_mc_game_rules.py +110 -0
- mcdex/game_rules/game_rules.json +436 -0
- mcdex/items/__init__.py +16 -0
- mcdex/items/_mc_items.py +1842 -0
- mcdex/items/items.json +20060 -0
- mcdex/music/__init__.py +16 -0
- mcdex/music/_music.py +65 -0
- mcdex/music/music.json +143 -0
- mcdex/painting_variants/__init__.py +16 -0
- mcdex/painting_variants/_mc_painting_variants.py +96 -0
- mcdex/painting_variants/painting_variants.json +369 -0
- mcdex/particles/__init__.py +16 -0
- mcdex/particles/_mc_particles.py +184 -0
- mcdex/particles/particles.json +917 -0
- mcdex/pig_sound_variants/__init__.py +16 -0
- mcdex/pig_sound_variants/_mc_pig_sound_variants.py +48 -0
- mcdex/pig_sound_variants/pig_sound_variants.json +30 -0
- mcdex/pig_variants/__init__.py +16 -0
- mcdex/pig_variants/_mc_pig_variants.py +46 -0
- mcdex/pig_variants/pig_variants.json +30 -0
- mcdex/potions/__init__.py +20 -0
- mcdex/potions/_mc_potions.py +101 -0
- mcdex/potions/_modified_potion.py +129 -0
- mcdex/potions/potions.json +297 -0
- mcdex/py.typed +0 -0
- mcdex/sounds/__init__.py +16 -0
- mcdex/sounds/_mc_sounds.py +2395 -0
- mcdex/sounds/sounds.json +13077 -0
- mcdex/statistics/__init__.py +16 -0
- mcdex/statistics/_mc_statistics.py +123 -0
- mcdex/statistics/statistics.json +521 -0
- mcdex/structures/__init__.py +16 -0
- mcdex/structures/_mc_structures.py +99 -0
- mcdex/structures/structures.json +367 -0
- mcdex/trim_materials/__init__.py +16 -0
- mcdex/trim_materials/_mc_trim_materials.py +54 -0
- mcdex/trim_materials/trim_materials.json +77 -0
- mcdex/trim_patterns/__init__.py +16 -0
- mcdex/trim_patterns/_mc_trim_patterns.py +61 -0
- mcdex/trim_patterns/trim_patterns.json +119 -0
- mcdex/villager_professions/__init__.py +17 -0
- mcdex/villager_professions/_mc_villager_professions.py +61 -0
- mcdex/villager_professions/villager_professions.json +125 -0
- mcdex/villager_types/__init__.py +16 -0
- mcdex/villager_types/_mc_villager_types.py +52 -0
- mcdex/villager_types/villager_types.json +54 -0
- mcdex/wolf_sound_variants/__init__.py +17 -0
- mcdex/wolf_sound_variants/_mc_wolf_sound_variants.py +53 -0
- mcdex/wolf_sound_variants/wolf_sound_variants.json +54 -0
- mcdex/wolf_variants/__init__.py +16 -0
- mcdex/wolf_variants/_mc_wolf_variants.py +53 -0
- mcdex/wolf_variants/wolf_variants.json +66 -0
- mcdex/zombie_nautilus_variants/__init__.py +17 -0
- mcdex/zombie_nautilus_variants/_mc_zombie_nautilus_variants.py +48 -0
- mcdex/zombie_nautilus_variants/zombie_nautilus_variants.json +23 -0
- mcdex-0.1.0.dev0.dist-info/METADATA +1285 -0
- mcdex-0.1.0.dev0.dist-info/RECORD +161 -0
- mcdex-0.1.0.dev0.dist-info/WHEEL +5 -0
- mcdex-0.1.0.dev0.dist-info/licenses/LICENSE +201 -0
- mcdex-0.1.0.dev0.dist-info/top_level.txt +1 -0
mcdex/base/_sound_id.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SoundId pairs a sound's unique name with the id a version of the game
|
|
3
|
+
needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class SoundId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a sound in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', what '/playsound' takes in that version.
|
|
16
|
+
|
|
17
|
+
Implementation
|
|
18
|
+
--------------
|
|
19
|
+
|
|
20
|
+
All of it is 'GameId's: a 'SoundId' is equal only to a 'SoundId'.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
StatisticId pairs a statistic's unique name with the id a version of the game
|
|
3
|
+
needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class StatisticId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a statistic in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', the name the game keeps the count under,
|
|
16
|
+
which '/scoreboard' objectives count in that version.
|
|
17
|
+
|
|
18
|
+
Implementation
|
|
19
|
+
--------------
|
|
20
|
+
|
|
21
|
+
All of it is 'GameId's: a 'StatisticId' is equal only to a 'StatisticId'.
|
|
22
|
+
"""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""
|
|
2
|
+
StructureId pairs a structure's unique name with the id a version of the game
|
|
3
|
+
needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class StructureId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a structure in one version: its 'uniqueName', the same in
|
|
15
|
+
every version, and its 'minecraftId', what /locate takes in that version.
|
|
16
|
+
|
|
17
|
+
Implementation
|
|
18
|
+
--------------
|
|
19
|
+
|
|
20
|
+
All of it is 'GameId's: a 'StructureId' is equal only to a 'StructureId'.
|
|
21
|
+
"""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TrimMaterialId pairs a trim material's unique name with the id a version of the
|
|
3
|
+
game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TrimMaterialId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a trim material in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', what an armor trim's material takes in that
|
|
16
|
+
version.
|
|
17
|
+
|
|
18
|
+
A command takes it only inside an armor piece's data, whose shape changed
|
|
19
|
+
over the versions: see the README's 'Ids that go inside an item'.
|
|
20
|
+
|
|
21
|
+
Implementation
|
|
22
|
+
--------------
|
|
23
|
+
|
|
24
|
+
All of it is 'GameId's: a 'TrimMaterialId' is equal only to a
|
|
25
|
+
'TrimMaterialId'.
|
|
26
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TrimPatternId pairs a trim pattern's unique name with the id a version of the
|
|
3
|
+
game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TrimPatternId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a trim pattern in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', what an armor trim's pattern takes in that
|
|
16
|
+
version.
|
|
17
|
+
|
|
18
|
+
A command takes it only inside an armor piece's data, whose shape changed
|
|
19
|
+
over the versions: see the README's 'Ids that go inside an item'.
|
|
20
|
+
|
|
21
|
+
Implementation
|
|
22
|
+
--------------
|
|
23
|
+
|
|
24
|
+
All of it is 'GameId's: a 'TrimPatternId' is equal only to a 'TrimPatternId'.
|
|
25
|
+
"""
|
mcdex/base/_version.py
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Version enumerates every release of Minecraft, in the order Mojang
|
|
3
|
+
released them.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
from worktoy.keenum import KeeNum, Kee
|
|
12
|
+
from worktoy.waitaminute.keenum import KeeResolveError
|
|
13
|
+
|
|
14
|
+
from . import MCVersion
|
|
15
|
+
|
|
16
|
+
if TYPE_CHECKING: # pragma: no cover, no mutate
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Version(KeeNum):
|
|
21
|
+
"""
|
|
22
|
+
Version enumerates every release of Minecraft, in the order Mojang
|
|
23
|
+
released them, from 1.0 to 26.3: 103 members, each holding its
|
|
24
|
+
'MCVersion'. Only real releases are members; there was never a '1.2'
|
|
25
|
+
(the first was 1.2.1) nor a '1.5' (1.5.1). Since 26.1, Mojang numbers
|
|
26
|
+
its releases by year.
|
|
27
|
+
|
|
28
|
+
The list is Mojang's own version manifest, as it read on 2026-11-07:
|
|
29
|
+
piston-meta.mojang.com/mc/game/version_manifest_v2.json
|
|
30
|
+
|
|
31
|
+
A member resolves from its name, from its 'MCVersion', or from the text
|
|
32
|
+
the game reports, and members order by their versions:
|
|
33
|
+
|
|
34
|
+
Version('1.7.10') is Version.V1_7_10
|
|
35
|
+
Version(MCVersion(26, 3)) is Version.V26_3
|
|
36
|
+
Version.V1_7_10 < Version.V1_9
|
|
37
|
+
|
|
38
|
+
Implementation
|
|
39
|
+
--------------
|
|
40
|
+
|
|
41
|
+
'__class_resolve__' reads a 'str' that names no member as an
|
|
42
|
+
'MCVersion' and resolves that by value; text that reads as no version,
|
|
43
|
+
or as a version that was never released, defers to the enumeration,
|
|
44
|
+
which raises 'KeeResolveError'. Equality is the identity of
|
|
45
|
+
'KeeNum'; the ordering compares the values, and returns
|
|
46
|
+
'NotImplemented' for anything but a member.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
V1_0 = Kee[MCVersion](MCVersion(1, 0, 0))
|
|
50
|
+
V1_1 = Kee[MCVersion](MCVersion(1, 1, 0))
|
|
51
|
+
V1_2_1 = Kee[MCVersion](MCVersion(1, 2, 1))
|
|
52
|
+
V1_2_2 = Kee[MCVersion](MCVersion(1, 2, 2))
|
|
53
|
+
V1_2_3 = Kee[MCVersion](MCVersion(1, 2, 3))
|
|
54
|
+
V1_2_4 = Kee[MCVersion](MCVersion(1, 2, 4))
|
|
55
|
+
V1_2_5 = Kee[MCVersion](MCVersion(1, 2, 5))
|
|
56
|
+
V1_3_1 = Kee[MCVersion](MCVersion(1, 3, 1))
|
|
57
|
+
V1_3_2 = Kee[MCVersion](MCVersion(1, 3, 2))
|
|
58
|
+
V1_4_2 = Kee[MCVersion](MCVersion(1, 4, 2))
|
|
59
|
+
V1_4_4 = Kee[MCVersion](MCVersion(1, 4, 4))
|
|
60
|
+
V1_4_5 = Kee[MCVersion](MCVersion(1, 4, 5))
|
|
61
|
+
V1_4_6 = Kee[MCVersion](MCVersion(1, 4, 6))
|
|
62
|
+
V1_4_7 = Kee[MCVersion](MCVersion(1, 4, 7))
|
|
63
|
+
V1_5_1 = Kee[MCVersion](MCVersion(1, 5, 1))
|
|
64
|
+
V1_5_2 = Kee[MCVersion](MCVersion(1, 5, 2))
|
|
65
|
+
V1_6_1 = Kee[MCVersion](MCVersion(1, 6, 1))
|
|
66
|
+
V1_6_2 = Kee[MCVersion](MCVersion(1, 6, 2))
|
|
67
|
+
V1_6_4 = Kee[MCVersion](MCVersion(1, 6, 4))
|
|
68
|
+
V1_7_2 = Kee[MCVersion](MCVersion(1, 7, 2))
|
|
69
|
+
V1_7_3 = Kee[MCVersion](MCVersion(1, 7, 3))
|
|
70
|
+
V1_7_4 = Kee[MCVersion](MCVersion(1, 7, 4))
|
|
71
|
+
V1_7_5 = Kee[MCVersion](MCVersion(1, 7, 5))
|
|
72
|
+
V1_7_6 = Kee[MCVersion](MCVersion(1, 7, 6))
|
|
73
|
+
V1_7_7 = Kee[MCVersion](MCVersion(1, 7, 7))
|
|
74
|
+
V1_7_8 = Kee[MCVersion](MCVersion(1, 7, 8))
|
|
75
|
+
V1_7_9 = Kee[MCVersion](MCVersion(1, 7, 9))
|
|
76
|
+
V1_7_10 = Kee[MCVersion](MCVersion(1, 7, 10))
|
|
77
|
+
V1_8 = Kee[MCVersion](MCVersion(1, 8, 0))
|
|
78
|
+
V1_8_1 = Kee[MCVersion](MCVersion(1, 8, 1))
|
|
79
|
+
V1_8_2 = Kee[MCVersion](MCVersion(1, 8, 2))
|
|
80
|
+
V1_8_3 = Kee[MCVersion](MCVersion(1, 8, 3))
|
|
81
|
+
V1_8_4 = Kee[MCVersion](MCVersion(1, 8, 4))
|
|
82
|
+
V1_8_5 = Kee[MCVersion](MCVersion(1, 8, 5))
|
|
83
|
+
V1_8_6 = Kee[MCVersion](MCVersion(1, 8, 6))
|
|
84
|
+
V1_8_7 = Kee[MCVersion](MCVersion(1, 8, 7))
|
|
85
|
+
V1_8_8 = Kee[MCVersion](MCVersion(1, 8, 8))
|
|
86
|
+
V1_8_9 = Kee[MCVersion](MCVersion(1, 8, 9))
|
|
87
|
+
V1_9 = Kee[MCVersion](MCVersion(1, 9, 0))
|
|
88
|
+
V1_9_1 = Kee[MCVersion](MCVersion(1, 9, 1))
|
|
89
|
+
V1_9_2 = Kee[MCVersion](MCVersion(1, 9, 2))
|
|
90
|
+
V1_9_3 = Kee[MCVersion](MCVersion(1, 9, 3))
|
|
91
|
+
V1_9_4 = Kee[MCVersion](MCVersion(1, 9, 4))
|
|
92
|
+
V1_10 = Kee[MCVersion](MCVersion(1, 10, 0))
|
|
93
|
+
V1_10_1 = Kee[MCVersion](MCVersion(1, 10, 1))
|
|
94
|
+
V1_10_2 = Kee[MCVersion](MCVersion(1, 10, 2))
|
|
95
|
+
V1_11 = Kee[MCVersion](MCVersion(1, 11, 0))
|
|
96
|
+
V1_11_1 = Kee[MCVersion](MCVersion(1, 11, 1))
|
|
97
|
+
V1_11_2 = Kee[MCVersion](MCVersion(1, 11, 2))
|
|
98
|
+
V1_12 = Kee[MCVersion](MCVersion(1, 12, 0))
|
|
99
|
+
V1_12_1 = Kee[MCVersion](MCVersion(1, 12, 1))
|
|
100
|
+
V1_12_2 = Kee[MCVersion](MCVersion(1, 12, 2))
|
|
101
|
+
V1_13 = Kee[MCVersion](MCVersion(1, 13, 0))
|
|
102
|
+
V1_13_1 = Kee[MCVersion](MCVersion(1, 13, 1))
|
|
103
|
+
V1_13_2 = Kee[MCVersion](MCVersion(1, 13, 2))
|
|
104
|
+
V1_14 = Kee[MCVersion](MCVersion(1, 14, 0))
|
|
105
|
+
V1_14_1 = Kee[MCVersion](MCVersion(1, 14, 1))
|
|
106
|
+
V1_14_2 = Kee[MCVersion](MCVersion(1, 14, 2))
|
|
107
|
+
V1_14_3 = Kee[MCVersion](MCVersion(1, 14, 3))
|
|
108
|
+
V1_14_4 = Kee[MCVersion](MCVersion(1, 14, 4))
|
|
109
|
+
V1_15 = Kee[MCVersion](MCVersion(1, 15, 0))
|
|
110
|
+
V1_15_1 = Kee[MCVersion](MCVersion(1, 15, 1))
|
|
111
|
+
V1_15_2 = Kee[MCVersion](MCVersion(1, 15, 2))
|
|
112
|
+
V1_16 = Kee[MCVersion](MCVersion(1, 16, 0))
|
|
113
|
+
V1_16_1 = Kee[MCVersion](MCVersion(1, 16, 1))
|
|
114
|
+
V1_16_2 = Kee[MCVersion](MCVersion(1, 16, 2))
|
|
115
|
+
V1_16_3 = Kee[MCVersion](MCVersion(1, 16, 3))
|
|
116
|
+
V1_16_4 = Kee[MCVersion](MCVersion(1, 16, 4))
|
|
117
|
+
V1_16_5 = Kee[MCVersion](MCVersion(1, 16, 5))
|
|
118
|
+
V1_17 = Kee[MCVersion](MCVersion(1, 17, 0))
|
|
119
|
+
V1_17_1 = Kee[MCVersion](MCVersion(1, 17, 1))
|
|
120
|
+
V1_18 = Kee[MCVersion](MCVersion(1, 18, 0))
|
|
121
|
+
V1_18_1 = Kee[MCVersion](MCVersion(1, 18, 1))
|
|
122
|
+
V1_18_2 = Kee[MCVersion](MCVersion(1, 18, 2))
|
|
123
|
+
V1_19 = Kee[MCVersion](MCVersion(1, 19, 0))
|
|
124
|
+
V1_19_1 = Kee[MCVersion](MCVersion(1, 19, 1))
|
|
125
|
+
V1_19_2 = Kee[MCVersion](MCVersion(1, 19, 2))
|
|
126
|
+
V1_19_3 = Kee[MCVersion](MCVersion(1, 19, 3))
|
|
127
|
+
V1_19_4 = Kee[MCVersion](MCVersion(1, 19, 4))
|
|
128
|
+
V1_20 = Kee[MCVersion](MCVersion(1, 20, 0))
|
|
129
|
+
V1_20_1 = Kee[MCVersion](MCVersion(1, 20, 1))
|
|
130
|
+
V1_20_2 = Kee[MCVersion](MCVersion(1, 20, 2))
|
|
131
|
+
V1_20_3 = Kee[MCVersion](MCVersion(1, 20, 3))
|
|
132
|
+
V1_20_4 = Kee[MCVersion](MCVersion(1, 20, 4))
|
|
133
|
+
V1_20_5 = Kee[MCVersion](MCVersion(1, 20, 5))
|
|
134
|
+
V1_20_6 = Kee[MCVersion](MCVersion(1, 20, 6))
|
|
135
|
+
V1_21 = Kee[MCVersion](MCVersion(1, 21, 0))
|
|
136
|
+
V1_21_1 = Kee[MCVersion](MCVersion(1, 21, 1))
|
|
137
|
+
V1_21_2 = Kee[MCVersion](MCVersion(1, 21, 2))
|
|
138
|
+
V1_21_3 = Kee[MCVersion](MCVersion(1, 21, 3))
|
|
139
|
+
V1_21_4 = Kee[MCVersion](MCVersion(1, 21, 4))
|
|
140
|
+
V1_21_5 = Kee[MCVersion](MCVersion(1, 21, 5))
|
|
141
|
+
V1_21_6 = Kee[MCVersion](MCVersion(1, 21, 6))
|
|
142
|
+
V1_21_7 = Kee[MCVersion](MCVersion(1, 21, 7))
|
|
143
|
+
V1_21_8 = Kee[MCVersion](MCVersion(1, 21, 8))
|
|
144
|
+
V1_21_9 = Kee[MCVersion](MCVersion(1, 21, 9))
|
|
145
|
+
V1_21_10 = Kee[MCVersion](MCVersion(1, 21, 10))
|
|
146
|
+
V1_21_11 = Kee[MCVersion](MCVersion(1, 21, 11))
|
|
147
|
+
V26_1 = Kee[MCVersion](MCVersion(26, 1, 0))
|
|
148
|
+
V26_1_1 = Kee[MCVersion](MCVersion(26, 1, 1))
|
|
149
|
+
V26_1_2 = Kee[MCVersion](MCVersion(26, 1, 2))
|
|
150
|
+
V26_2 = Kee[MCVersion](MCVersion(26, 2, 0))
|
|
151
|
+
V26_3 = Kee[MCVersion](MCVersion(26, 3, 0))
|
|
152
|
+
|
|
153
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
154
|
+
# Python API # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
155
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
156
|
+
|
|
157
|
+
@classmethod
|
|
158
|
+
def __class_resolve__(cls, identifier: Any) -> Any:
|
|
159
|
+
"""
|
|
160
|
+
Resolves the text the game reports, as '1.7.10', to its member, or
|
|
161
|
+
returns 'NotImplemented'.
|
|
162
|
+
"""
|
|
163
|
+
if not isinstance(identifier, str):
|
|
164
|
+
return NotImplemented
|
|
165
|
+
try:
|
|
166
|
+
return cls.fromValue(MCVersion(identifier))
|
|
167
|
+
except (ValueError, KeeResolveError):
|
|
168
|
+
return NotImplemented
|
|
169
|
+
|
|
170
|
+
def __lt__(self, other: Any) -> bool:
|
|
171
|
+
if isinstance(other, Version):
|
|
172
|
+
return self.value < other.value
|
|
173
|
+
return NotImplemented
|
|
174
|
+
|
|
175
|
+
def __le__(self, other: Any) -> bool:
|
|
176
|
+
if isinstance(other, Version):
|
|
177
|
+
return self.value <= other.value
|
|
178
|
+
return NotImplemented
|
|
179
|
+
|
|
180
|
+
def __gt__(self, other: Any) -> bool:
|
|
181
|
+
if isinstance(other, Version):
|
|
182
|
+
return self.value > other.value
|
|
183
|
+
return NotImplemented
|
|
184
|
+
|
|
185
|
+
def __ge__(self, other: Any) -> bool:
|
|
186
|
+
if isinstance(other, Version):
|
|
187
|
+
return self.value >= other.value
|
|
188
|
+
return NotImplemented
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""
|
|
2
|
+
VillagerProfessionId pairs a villager profession's unique name with the id a
|
|
3
|
+
version of the game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VillagerProfessionId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a villager profession in one version: its 'uniqueName', the same in
|
|
15
|
+
every version, and its 'minecraftId', what /summon takes for a villager of
|
|
16
|
+
that profession in that version: the villager with its data, from 1.14 its
|
|
17
|
+
'VillagerData', before it its profession and career numbers.
|
|
18
|
+
|
|
19
|
+
Implementation
|
|
20
|
+
--------------
|
|
21
|
+
|
|
22
|
+
All of it is 'GameId's: a 'VillagerProfessionId' is equal only to a
|
|
23
|
+
'VillagerProfessionId'.
|
|
24
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
VillagerTypeId pairs a villager type's unique name with the id a version of the
|
|
3
|
+
game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VillagerTypeId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a villager type in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', what /summon takes for a villager of that
|
|
16
|
+
type, its home biome's look, in that version: the villager with its
|
|
17
|
+
'VillagerData' from 1.14, the villager itself before, when every villager
|
|
18
|
+
was of the plains type.
|
|
19
|
+
|
|
20
|
+
Implementation
|
|
21
|
+
--------------
|
|
22
|
+
|
|
23
|
+
All of it is 'GameId's: a 'VillagerTypeId' is equal only to a
|
|
24
|
+
'VillagerTypeId'.
|
|
25
|
+
"""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WolfSoundVariantId pairs a wolf sound variant's unique name with the id a
|
|
3
|
+
version of the game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WolfSoundVariantId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a wolf sound variant in one version: its 'uniqueName', the same in
|
|
15
|
+
every version, and its 'minecraftId', what /summon takes for a wolf of that
|
|
16
|
+
sound variant in that version.
|
|
17
|
+
|
|
18
|
+
Implementation
|
|
19
|
+
--------------
|
|
20
|
+
|
|
21
|
+
All of it is 'GameId's: a 'WolfSoundVariantId' is equal only to a
|
|
22
|
+
'WolfSoundVariantId'.
|
|
23
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WolfVariantId pairs a wolf variant's unique name with the id a version of the
|
|
3
|
+
game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class WolfVariantId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a wolf variant in one version: its 'uniqueName', the same in every
|
|
15
|
+
version, and its 'minecraftId', what /summon takes for a wolf of that variant
|
|
16
|
+
in that version.
|
|
17
|
+
|
|
18
|
+
Implementation
|
|
19
|
+
--------------
|
|
20
|
+
|
|
21
|
+
All of it is 'GameId's: a 'WolfVariantId' is equal only to a 'WolfVariantId'.
|
|
22
|
+
"""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ZombieNautilusVariantId pairs a zombie nautilus variant's unique name with the
|
|
3
|
+
id a version of the game needs to identify it.
|
|
4
|
+
"""
|
|
5
|
+
# Apache-2.0 license
|
|
6
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from . import GameId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ZombieNautilusVariantId(GameId):
|
|
13
|
+
"""
|
|
14
|
+
The id of a zombie nautilus variant in one version: its 'uniqueName', the
|
|
15
|
+
same in every version, and its 'minecraftId', what /summon takes for a zombie
|
|
16
|
+
nautilus of that variant in that version.
|
|
17
|
+
|
|
18
|
+
Implementation
|
|
19
|
+
--------------
|
|
20
|
+
|
|
21
|
+
All of it is 'GameId's: a 'ZombieNautilusVariantId' is equal only to a
|
|
22
|
+
'ZombieNautilusVariantId'.
|
|
23
|
+
"""
|
mcdex/biomes/__init__.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The 'mcdex.biomes' package provides the biomes of the game: the
|
|
3
|
+
'MCBiomes' catalogue, an enumeration of every biome of the data file
|
|
4
|
+
'biomes.json' that ships with the package.
|
|
5
|
+
|
|
6
|
+
- MCBiomes
|
|
7
|
+
"""
|
|
8
|
+
# Apache-2.0 license
|
|
9
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from ._mc_biomes import MCBiomes
|
|
13
|
+
|
|
14
|
+
__all__ = (
|
|
15
|
+
'MCBiomes',
|
|
16
|
+
)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MCBiomes is the catalogue of the game's biomes: an enumeration with one
|
|
3
|
+
member for every biome of the data file that ships with mcdex, each the
|
|
4
|
+
same biome in every version, with the id each version knows it by:
|
|
5
|
+
the biome's number to 1.8.9, its name from 1.9.
|
|
6
|
+
"""
|
|
7
|
+
# Apache-2.0 license
|
|
8
|
+
# Copyright (c) 2026 Asger Jon Vistisen
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from worktoy.keenum import Kee
|
|
12
|
+
|
|
13
|
+
from ..base import BiomeId, MCThing
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class MCBiomes(MCThing):
|
|
17
|
+
"""
|
|
18
|
+
The catalogue of the game's biomes, each a member, found by its name in
|
|
19
|
+
capitals, in any case, or by its unique name:
|
|
20
|
+
|
|
21
|
+
plains = MCBiomes.PLAINS
|
|
22
|
+
plains is MCBiomes['plains'] # True
|
|
23
|
+
plains['1.8.9'] # BiomeId('plains', '1')
|
|
24
|
+
len(MCBiomes)
|
|
25
|
+
|
|
26
|
+
Implementation
|
|
27
|
+
--------------
|
|
28
|
+
|
|
29
|
+
All of it is 'MCThing's, reading 'biomes.json' beside this module.
|
|
30
|
+
mcdex's tools write the members, one for every name of that file.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
34
|
+
# NAMESPACE # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
35
|
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
36
|
+
|
|
37
|
+
# Class Variables
|
|
38
|
+
__data_file__ = 'biomes.json'
|
|
39
|
+
__data_key__ = 'biomes'
|
|
40
|
+
__id_class__ = BiomeId
|
|
41
|
+
__kind__ = 'biome'
|
|
42
|
+
|
|
43
|
+
# Members, one for every name of 'biomes.json'
|
|
44
|
+
BADLANDS = Kee[str]('badlands')
|
|
45
|
+
BADLANDS_PLATEAU = Kee[str]('badlands_plateau')
|
|
46
|
+
BAMBOO_JUNGLE = Kee[str]('bamboo_jungle')
|
|
47
|
+
BAMBOO_JUNGLE_HILLS = Kee[str]('bamboo_jungle_hills')
|
|
48
|
+
BASALT_DELTAS = Kee[str]('basalt_deltas')
|
|
49
|
+
BEACH = Kee[str]('beach')
|
|
50
|
+
BIRCH_FOREST = Kee[str]('birch_forest')
|
|
51
|
+
BIRCH_FOREST_HILLS = Kee[str]('birch_forest_hills')
|
|
52
|
+
CHERRY_GROVE = Kee[str]('cherry_grove')
|
|
53
|
+
COLD_OCEAN = Kee[str]('cold_ocean')
|
|
54
|
+
CRIMSON_FOREST = Kee[str]('crimson_forest')
|
|
55
|
+
DAPPLED_FOREST = Kee[str]('dappled_forest')
|
|
56
|
+
DARK_FOREST = Kee[str]('dark_forest')
|
|
57
|
+
DARK_FOREST_HILLS = Kee[str]('dark_forest_hills')
|
|
58
|
+
DEEP_COLD_OCEAN = Kee[str]('deep_cold_ocean')
|
|
59
|
+
DEEP_DARK = Kee[str]('deep_dark')
|
|
60
|
+
DEEP_FROZEN_OCEAN = Kee[str]('deep_frozen_ocean')
|
|
61
|
+
DEEP_LUKEWARM_OCEAN = Kee[str]('deep_lukewarm_ocean')
|
|
62
|
+
DEEP_OCEAN = Kee[str]('deep_ocean')
|
|
63
|
+
DEEP_WARM_OCEAN = Kee[str]('deep_warm_ocean')
|
|
64
|
+
DESERT = Kee[str]('desert')
|
|
65
|
+
DESERT_HILLS = Kee[str]('desert_hills')
|
|
66
|
+
DESERT_LAKES = Kee[str]('desert_lakes')
|
|
67
|
+
DRIPSTONE_CAVES = Kee[str]('dripstone_caves')
|
|
68
|
+
END_BARRENS = Kee[str]('end_barrens')
|
|
69
|
+
END_HIGHLANDS = Kee[str]('end_highlands')
|
|
70
|
+
END_MIDLANDS = Kee[str]('end_midlands')
|
|
71
|
+
ERODED_BADLANDS = Kee[str]('eroded_badlands')
|
|
72
|
+
FLOWER_FOREST = Kee[str]('flower_forest')
|
|
73
|
+
FOREST = Kee[str]('forest')
|
|
74
|
+
FROZEN_OCEAN = Kee[str]('frozen_ocean')
|
|
75
|
+
FROZEN_PEAKS = Kee[str]('frozen_peaks')
|
|
76
|
+
FROZEN_RIVER = Kee[str]('frozen_river')
|
|
77
|
+
GIANT_SPRUCE_TAIGA_HILLS = Kee[str]('giant_spruce_taiga_hills')
|
|
78
|
+
GIANT_TREE_TAIGA_HILLS = Kee[str]('giant_tree_taiga_hills')
|
|
79
|
+
GROVE = Kee[str]('grove')
|
|
80
|
+
ICE_SPIKES = Kee[str]('ice_spikes')
|
|
81
|
+
JAGGED_PEAKS = Kee[str]('jagged_peaks')
|
|
82
|
+
JUNGLE = Kee[str]('jungle')
|
|
83
|
+
JUNGLE_HILLS = Kee[str]('jungle_hills')
|
|
84
|
+
LUKEWARM_OCEAN = Kee[str]('lukewarm_ocean')
|
|
85
|
+
LUSH_CAVES = Kee[str]('lush_caves')
|
|
86
|
+
MANGROVE_SWAMP = Kee[str]('mangrove_swamp')
|
|
87
|
+
MEADOW = Kee[str]('meadow')
|
|
88
|
+
MODIFIED_BADLANDS_PLATEAU = Kee[str]('modified_badlands_plateau')
|
|
89
|
+
MODIFIED_GRAVELLY_MOUNTAINS = Kee[str]('modified_gravelly_mountains')
|
|
90
|
+
MODIFIED_JUNGLE = Kee[str]('modified_jungle')
|
|
91
|
+
MODIFIED_JUNGLE_EDGE = Kee[str]('modified_jungle_edge')
|
|
92
|
+
MODIFIED_WOODED_BADLANDS_PLATEAU = Kee[str](
|
|
93
|
+
'modified_wooded_badlands_plateau')
|
|
94
|
+
MOUNTAIN_EDGE = Kee[str]('mountain_edge')
|
|
95
|
+
MUSHROOM_FIELD_SHORE = Kee[str]('mushroom_field_shore')
|
|
96
|
+
MUSHROOM_FIELDS = Kee[str]('mushroom_fields')
|
|
97
|
+
NETHER_WASTES = Kee[str]('nether_wastes')
|
|
98
|
+
OCEAN = Kee[str]('ocean')
|
|
99
|
+
OLD_GROWTH_BIRCH_FOREST = Kee[str]('old_growth_birch_forest')
|
|
100
|
+
OLD_GROWTH_PINE_TAIGA = Kee[str]('old_growth_pine_taiga')
|
|
101
|
+
OLD_GROWTH_SPRUCE_TAIGA = Kee[str]('old_growth_spruce_taiga')
|
|
102
|
+
PALE_GARDEN = Kee[str]('pale_garden')
|
|
103
|
+
PLAINS = Kee[str]('plains')
|
|
104
|
+
RIVER = Kee[str]('river')
|
|
105
|
+
SAVANNA = Kee[str]('savanna')
|
|
106
|
+
SAVANNA_PLATEAU = Kee[str]('savanna_plateau')
|
|
107
|
+
SHATTERED_SAVANNA_PLATEAU = Kee[str]('shattered_savanna_plateau')
|
|
108
|
+
SMALL_END_ISLANDS = Kee[str]('small_end_islands')
|
|
109
|
+
SNOWY_BEACH = Kee[str]('snowy_beach')
|
|
110
|
+
SNOWY_MOUNTAINS = Kee[str]('snowy_mountains')
|
|
111
|
+
SNOWY_PLAINS = Kee[str]('snowy_plains')
|
|
112
|
+
SNOWY_SLOPES = Kee[str]('snowy_slopes')
|
|
113
|
+
SNOWY_TAIGA = Kee[str]('snowy_taiga')
|
|
114
|
+
SNOWY_TAIGA_HILLS = Kee[str]('snowy_taiga_hills')
|
|
115
|
+
SNOWY_TAIGA_MOUNTAINS = Kee[str]('snowy_taiga_mountains')
|
|
116
|
+
SOUL_SAND_VALLEY = Kee[str]('soul_sand_valley')
|
|
117
|
+
SPARSE_JUNGLE = Kee[str]('sparse_jungle')
|
|
118
|
+
STONY_PEAKS = Kee[str]('stony_peaks')
|
|
119
|
+
STONY_SHORE = Kee[str]('stony_shore')
|
|
120
|
+
SULFUR_CAVES = Kee[str]('sulfur_caves')
|
|
121
|
+
SUNFLOWER_PLAINS = Kee[str]('sunflower_plains')
|
|
122
|
+
SWAMP = Kee[str]('swamp')
|
|
123
|
+
SWAMP_HILLS = Kee[str]('swamp_hills')
|
|
124
|
+
TAIGA = Kee[str]('taiga')
|
|
125
|
+
TAIGA_HILLS = Kee[str]('taiga_hills')
|
|
126
|
+
TAIGA_MOUNTAINS = Kee[str]('taiga_mountains')
|
|
127
|
+
TALL_BIRCH_HILLS = Kee[str]('tall_birch_hills')
|
|
128
|
+
THE_END = Kee[str]('the_end')
|
|
129
|
+
THE_VOID = Kee[str]('the_void')
|
|
130
|
+
WARM_OCEAN = Kee[str]('warm_ocean')
|
|
131
|
+
WARPED_FOREST = Kee[str]('warped_forest')
|
|
132
|
+
WINDSWEPT_FOREST = Kee[str]('windswept_forest')
|
|
133
|
+
WINDSWEPT_GRAVELLY_HILLS = Kee[str]('windswept_gravelly_hills')
|
|
134
|
+
WINDSWEPT_HILLS = Kee[str]('windswept_hills')
|
|
135
|
+
WINDSWEPT_SAVANNA = Kee[str]('windswept_savanna')
|
|
136
|
+
WOODED_BADLANDS = Kee[str]('wooded_badlands')
|
|
137
|
+
WOODED_HILLS = Kee[str]('wooded_hills')
|