...]Also a different question now:
I created two test cases one with a single ramp texture 21 and one with a single stair1 again texture 21 to test the block data structure.The values I get from the blueprint file are:
blocktype hex dec ramp 26C1 9921 stair1 0F51 3921
seeing this result I understand that 21 refers to the texture, while the first two numbers refer to the position? If that is the case how does the game know if the block is a square block, a ramp or a stair1, a stair2, or a stair3 etc.?
Not where I can test this, but does the variation byte have any difference?
Display MoreBasically the first step would be to read the bytes of the blueprint file and decompress it (the game uses GZIP for compression). Once you have the decompressed byte buffer/array, you can start reading the single bytes. This is the structure of every blueprint (I hope I didn't miss anything - if you have any questions, don't hesitate to ask):
Bytes Info 1 blueprint version 2 blueprint size x 2 blueprint size y 2 blueprint size z 8 creation date (timestamp, amount of milliseconds passed since 1st of January 1970) 4 name length (String bytes) xx blueprint name (byte length see previous 4 bytes) 4 author name length (String bytes) xx author name (byte length see previous 4 bytes) 4 world name length (String bytes) xx world name (byte length see previous 4 bytes) 4 block data length xx block data (see below)
**** see "arrow" in modified code block ***4 object data length xx object data (see below) 4 construction data length xx construction data (see below) 4 preview image data length xx preview image data
[...]
Object data information
Objects (furniture, doors etc) are represented by a special object which holds information about the typeid (short), the variation (byte), position x y and z (float) and rotation x y z (short). The first 4 bytes in the encoded blueprint bytes hold information about the actual amount of objects in this blueprint. Java way to read the objects:
Display MoreJava