Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block data (similar to param2 in Minetest) #139

Closed
3 tasks done
Unarelith opened this issue Jul 6, 2020 · 0 comments
Closed
3 tasks done

Block data (similar to param2 in Minetest) #139

Unarelith opened this issue Jul 6, 2020 · 0 comments

Comments

@Unarelith
Copy link
Owner

Unarelith commented Jul 6, 2020

We have 16 bits for custom block data. Its 5 first bits are currently used for rotation when it's enabled, but it's possible to do more.

  • The engine should allocate the bits dynamically depending on what's in the block definition, for example:

    • If you define 5 states (Block states #138), you only need 3 bits
    • If you define the block as rotatable, you will need 5 bits
    • etc...
  • The block definition loading should fail if the engine needs to allocate more than 16 bits, and the error message should list what are the allocated bits used for.

  • Also, a new block field custom_data_size = x could be added to allocate x bits of the data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant