Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

## Features

- Parse `level.dat` ([player.dat format](https://minecraft.fandom.com/Player.dat_format)).
- Parse region file ([anvil format](https://minecraft.fandom.com/Anvil_file_format)) and chunks within the region.
- Parse `raids.dat` file ([raids format](https://minecraft.fandom.com/Raids.dat_format)).
- Parse poi file ([anvil format](https://minecraft.fandom.com/Anvil_file_format)).
- Parse `level.dat` ([player.dat format](https://minecraft.wiki/w/Player.dat_format)).
- Parse region file ([anvil format](https://minecraft.wiki/w/Anvil_file_format)) and chunks within the region.
- Parse `raids.dat` file ([raids format](https://minecraft.wiki/w/Raids.dat_format)).
- Parse poi file ([anvil format](https://minecraft.wiki/w/Anvil_file_format)).
- Includes examples to quickly perform analysis, listing, etc. (check `cli` folder).
- Based on [nbtlib](https://github.com/vberlier/nbtlib/) library.
- Inspired by [twoolie's NBT](https://github.com/twoolie/NBT).
Expand Down
2 changes: 1 addition & 1 deletion minenbt/cli/add_to_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from .utils import backup_save, find_player, get_player_file

# From https://minecraft.fandom.com/File:Items_slot_number.png
# From https://minecraft.wiki/w/File:Items_slot_number.png
_SLOTS = set(range(9, 36))


Expand Down
2 changes: 1 addition & 1 deletion minenbt/cli/biome_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .utils import get_world

# https://minecraft.fandom.com/Java_Edition_data_values#Biomes
# https://minecraft.wiki/w/Java_Edition_data_values#Biomes
BIOMES = {
0: "Ocean",
1: "Plains",
Expand Down
4 changes: 2 additions & 2 deletions minenbt/file_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ def py_dict(self) -> "dict[str, AnyNBT | dict[str, str]]":
class Chunk(CompoundTag):
"""Chunks store the terrain and entities within a 16×384×16 area.

https://minecraft.fandom.com/Chunk_format"""
https://minecraft.wiki/w/Chunk_format"""

def section(self, i: int) -> Section | None:
"""Return a vertical section of the chunk, if available"""
if self["DataVersion"].py_int >= 2529:
# https://minecraft.fandom.com/Java_Edition_20w17a
# https://minecraft.wiki/w/Java_Edition_20w17a
return Section(self["sections"][i + 1])
raise ValueError("DataVersion {} not supported".format(self["DataVersion"]))

Expand Down
2 changes: 1 addition & 1 deletion minenbt/savefolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __repr__(self) -> str:
class SaveFolder:
"""A Minecraft Save Folder"""

# https://minecraft.fandom.com/Java_Edition_level_format
# https://minecraft.wiki/w/Java_Edition_level_format

def __init__(self, folder: str | Path) -> None:
self._folder = Path(folder)
Expand Down
2 changes: 1 addition & 1 deletion minenbt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def near_chunks(x, z, distance) -> list[Coord]:
def parse_uuid(compound: CompoundTag, prefix="UUID") -> UUID:
"""Return an uuid.UUID from a compund tag.

See https://minecraft.fandom.com/UUID"""
See https://minecraft.wiki/w/UUID"""
# From MC 1.16
ints = compound[prefix]
if not isinstance(ints, IntArrayTag):
Expand Down