Hourray!
After spending many night hours I think I got it the right way around...
My first try was to change the "
extract_slice" and "
extract_slice_half_bytes" functions to read the nodes the other way around.Althought I think I understood the code, my maths didn't word :'(
Nota :
MC uses "blocks" as voxels in a 16x16x128 chunk
MT uses "nodes" as voxels in 16x16x16 blocks...So I tried another way.
> In
MTMap.save : changed
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
(self.getBlockAsInteger((block.pos[0],block.pos[1],block.pos[2])),
to
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
(self.getBlockAsInteger((-block.pos[0],block.pos[1],-block.pos[2])),
in order to get a first rotation. This puts the MT blocks at their right place, but didn't rotate their content.
> Instead of reversing X axis (MC and MT uses left/right "trièdre" - sorry, didn't find the english for that) , I reversed Z axis
In
MCBlock.reverse_X_axis and
MCBlock.expand_half_bytes (yeah, data on u12 ... so easy...) I changed the order data was read, reversing Z instead of X.
By the way : I think this code could be optimised but I'm not used enought to Python
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
l2 = l[locSt:locSt+16]
for i in l2:
l3.append(i)
So... Do you want my file?