Amulet-Map-Editor icon indicating copy to clipboard operation
Amulet-Map-Editor copied to clipboard

Bug In Biome Convert To 3d

Open PREMIEREHELL opened this issue 2 years ago • 1 comments

Current Behaviour:

The 3d array does not match the 2d array

Expected behavior:

They should match

Steps To Reproduce:

chunk.biomes.convert_to_3d()

Environment:

  • OS: Windows

Input

(<BiomesShape.Shape2D: 2>, array([[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
       [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]], dtype=uint32), None) 

Output

<BiomesShape.Shape3D: 3>, None, {0: array([[[6, 6, 6, 6],
        [0, 0, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 0]],

       [[6, 6, 6, 6],
        [0, 0, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 0]],

       [[6, 6, 6, 6],
        [0, 0, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 0]],

       [[6, 6, 6, 6],
        [0, 0, 0, 0],
        [0, 0, 0, 0],
        [0, 0, 0, 0]]], dtype=uint32)})

world file https://discord.com/channels/324647192583340043/858645423928508416/982656254134595694

ready to extract and run https://discord.com/channels/324647192583340043/858645423928508416/982665798676000778

import amulet
from amulet.api.chunk.biomes import Biomes
path = r"1_12_test"  # ADD YOUR PATH
world2 = amulet.load_level(path)
for x,z in world2.level_wrapper.all_chunk_coords('minecraft:overworld'):
    chunk = world2.get_chunk(x, z, 'minecraft:overworld')
    print(chunk.biomes.to_raw())
    chunk.biomes.convert_to_3d()
    new = Biomes(chunk.biomes._3d)
    print(new.to_raw())
    break

PREMIEREHELL avatar Jun 04 '22 14:06 PREMIEREHELL

Can you attach a level to test it with an the full python code file that I can just run.

gentlegiantJGC avatar Jun 04 '22 14:06 gentlegiantJGC