mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
add ladder block rotation
This commit is contained in:
parent
e00038327f
commit
e2806fb19c
5 changed files with 32 additions and 1 deletions
|
|
@ -219,7 +219,8 @@ std::unique_ptr<VoxelFragment> VoxelFragment::rotated(const Content& content) co
|
|||
| ((voxel.state.segment & 0b100) >> 2);
|
||||
auto& def = content.blocks.require(blockNames[voxel.id]);
|
||||
if (def.rotations.name == BlockRotProfile::PANE_NAME ||
|
||||
def.rotations.name == BlockRotProfile::PIPE_NAME) {
|
||||
def.rotations.name == BlockRotProfile::PIPE_NAME ||
|
||||
def.rotations.name == BlockRotProfile::LADDER_NAME) {
|
||||
if (voxel.state.rotation < 4) {
|
||||
voxel.state.rotation = (voxel.state.rotation + 3) & 0b11;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue