mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
fix: user bits and manually set rotation not saving
This commit is contained in:
parent
6d933ac263
commit
86dd6562de
4 changed files with 18 additions and 10 deletions
|
|
@ -19,10 +19,10 @@ struct blockstate {
|
|||
static_assert (sizeof(blockstate) == 2);
|
||||
|
||||
inline constexpr blockstate_t blockstate2int(blockstate b) {
|
||||
return b.rotation |
|
||||
(b.segment << 3) |
|
||||
(b.reserved << 5) |
|
||||
(b.userbits << 8);
|
||||
return static_cast<blockstate_t>(b.rotation) |
|
||||
static_cast<blockstate_t>(b.segment) << 3 |
|
||||
static_cast<blockstate_t>(b.reserved) << 5 |
|
||||
static_cast<blockstate_t>(b.userbits) << 8;
|
||||
}
|
||||
|
||||
inline constexpr blockstate int2blockstate(blockstate_t i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue