placing non-obstacle blocks
This commit is contained in:
@@ -257,7 +257,8 @@ void PlayerController::updateInteraction(){
|
|||||||
}
|
}
|
||||||
vox = chunks->get(x, y, z);
|
vox = chunks->get(x, y, z);
|
||||||
if (vox && (block = contentIds->getBlockDef(vox->id))->replaceable) {
|
if (vox && (block = contentIds->getBlockDef(vox->id))->replaceable) {
|
||||||
if (!level->physics->isBlockInside(x,y,z, player->hitbox)){
|
if (!level->physics->isBlockInside(x,y,z, player->hitbox)
|
||||||
|
|| !def->obstacle){
|
||||||
chunks->set(x, y, z, player->choosenBlock, states);
|
chunks->set(x, y, z, player->choosenBlock, states);
|
||||||
lighting->onBlockSet(x,y,z, player->choosenBlock);
|
lighting->onBlockSet(x,y,z, player->choosenBlock);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user