Update 0.0.4

This commit is contained in:
2021-11-21 17:44:35 +08:00
parent 0b1a876b14
commit 8cc1aa708f
8 changed files with 137 additions and 62 deletions

View File

@ -252,41 +252,3 @@ def Datas2BlkWorld(NoteData,world:str,dire:list):
Blocks2World(world,[dire[0],dire[1],dire[2]+i],NoteData[i])
def World2Rys(world:str,startp:list,endp:list,isAir:bool=False ):
level = amulet.load_level(world)
RyStruct = {}
for x in range(startp[0],endp[0]):
for y in range(startp[1],endp[1]):
for z in range(startp[2],endp[2]):
RyStructBlock = {}
cx, cz = block_coords_to_chunk_coords(x, z)
chunk = level.get_chunk(cx, cz, "minecraft:overworld")
universal_block = chunk.block_palette[chunk.blocks[x - 16 * cx, y, z - 16 * cz]]
if universal_block == Block("universal_minecraft","air") and isAir:
continue
universal_block_entity = chunk.block_entities.get((x, y, z), None)
universal_block.namespace
universal_block_entity.namespace
#not be finished
'''
RyStruct = {
(0,0,0) = {
"block":{
"namespace":"",
"base_name":"",
"properties":{}
},
"block_entity":{
"namespace":"",
"base_name":"",
}
}
}
'''