mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Merge branch 'main' into entities
This commit is contained in:
commit
7487c55e0c
4 changed files with 21 additions and 5 deletions
|
|
@ -418,8 +418,11 @@ void PlayerController::processRightClick(Block* def, Block* target) {
|
|||
if (!chunks->checkReplaceability(def, state, coord)) {
|
||||
return;
|
||||
}
|
||||
if (def->grounded && !chunks->isSolidBlock(coord.x, coord.y-1, coord.z)) {
|
||||
return;
|
||||
if (def->grounded) {
|
||||
const auto& vec = get_ground_direction(def, state.rotation);
|
||||
if (!chunks->isSolidBlock(coord.x+vec.x, coord.y+vec.y, coord.z+vec.z)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (chosenBlock != vox->id && chosenBlock) {
|
||||
onBlockInteraction(coord, def, BlockInteraction::placing);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue