Amulet-Team / Amulet-Map-Editor

A new Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7.

Home Page:https://www.amuletmc.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug Report] bedrock .mcstructure export problem

jojojo805 opened this issue · comments

def main():
    world = amulet.load_level("C:/Users/jo1/AppData/Roaming/MinecraftPE_Netease/minecraftWorlds/java2")
    world_dimesion = "minecraft:overworld"
    version = (1, 18, 30)
    path = "C:/Users/jo1/AppData/Roaming/MinecraftPE_Netease/exported_structures/test.mcstructure"
    selection = SelectionGroup(SelectionBox((0, 50, 0), (500, 100, 500)))
    wrapper = MCStructureFormatWrapper(path)
    wrapper.create_and_open("bedrock", version, selection, True)

    wrapper.translation_manager = world.translation_manager
    wrapper_dimension = wrapper.dimensions[0]



    for (cx, cz) in selection.chunk_locations():
        try:
            chunk = world.level_wrapper.load_chunk(cx, cz, world_dimesion)
            wrapper.commit_chunk(chunk, wrapper_dimension)
        except ChunkLoadError:
            print("ChunkLoadError")

    wrapper.save()
    wrapper.close()


if __name__ == '__main__':
    main()

When I run this code, I get the.mcstructure file in the wrong format, When you open it with NBT Studio, you find "minecraft:andesite" in the block_palette, but the palette should actually be "name:minecraft:stone state:stone_type:andesite" Similar to this sentence, so I lost andesite when I converted, is there something wrong with the code I wrote? Can someone help me

5446BCC8-2555-479b-9CB9-59DDFE0C6229
44241B63-3FB3-4865-894A-06B2DBB2DB80

I have found the issue.

It was solved.Thank you.