Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.
This repository was archived by the owner on May 8, 2023. It is now read-only.

1.19.x support? #43

@ZMP-Productions

Description

@ZMP-Productions

Getting errors that, after looking at other bug reports, seem to originate from minecraft versions. the .mca file im trying to use is in 1.19.2. getting the following eror:
Traceback (most recent call last): File "c:\Users\Zoe\Desktop\projects\minecraft related\<redacted project name>\scripts\main.py", line 49, in <module> chunk = anvil.Chunk.from_region(region, 0, 0) File "C:\Users\Zoe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\anvil\chunk.py", line 382, in from_region return cls(nbt_data) File "C:\Users\Zoe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\anvil\chunk.py", line 55, in __init__ self.data = nbt_data['Level'] File "C:\Users\Zoe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\nbt\nbt.py", line 543, in __getitem__ raise KeyError("Tag %s does not exist" % key) KeyError: 'Tag Level does not exist'

The code:

import anvil

region = anvil.Region.from_file('r.0.0.mca') # line 48
chunk = anvil.Chunk.from_region(region, 0, 0)
block = chunk.get_block(0, 60, 0)
print(block)
print(block.id)
print(block.properties)

**** EDIT ****
anvil-new (pip install anvil-new) works for this mca file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions