-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Consider using blockstates instead of simple blocks #471
Conversation
State ids are all unique, so I don't know what you are doing bit shifting the block id in there. That is useless information. |
It seems you're misunderstanding something because multi block and multi block state are the same thing conceptually. The u16s are the state ids which are unique across all blocks |
From_block and from_block_props are already implemented somewhere I believe. The block macro? |
I don't like the to i32 and u32 implementations, if anything, it should only be the state_id |
I didnt found any block props creator |
And from block too, so if you find make me know |
Looks like it was removed when the ill-fated runtime migration happened, but it should be implemented as a part of: https://github.com/Pumpkin-MC/Pumpkin/blob/master/pumpkin-macros/src/block_state.rs#L19 |
No, blockstate structure its u32, while simple block its u16 |
Or you mean what its u16 its a block state? |
If that, why anywhere whe uses block id, instead of state id? |
Its a different things |
That's because that's how we define a var int. We use a u16 simply because there is less that 65535 unique block states and we can save memory |
This is just for a quick check if two states are of the same block. It is not used in chunk serialization |
Can you more explain? |
It should be "block state id" I'm pretty sure the comments were made before all this complexity came in |
No, before this its also be block id. |
Description
i maked blockstates working in chunks, but needs fix anvil loading
Testing
cargo run
see what all works, without anvil loading
Please follow our Coding Guidelines