mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fixes + Block.replaceable
This commit is contained in:
parent
cee0214ac5
commit
dc0c497ec1
6 changed files with 46 additions and 15 deletions
|
|
@ -238,9 +238,12 @@ void PlayerController::updateInteraction(){
|
|||
y = (int)(iend.y)+(int)(norm.y);
|
||||
z = (int)(iend.z)+(int)(norm.z);
|
||||
}
|
||||
if (!level->physics->isBlockInside(x,y,z, player->hitbox)){
|
||||
chunks->set(x, y, z, player->choosenBlock, states);
|
||||
lighting->onBlockSet(x,y,z, player->choosenBlock);
|
||||
vox = chunks->get(x, y, z);
|
||||
if (vox && (block = contentIds->getBlockDef(vox->id))->replaceable) {
|
||||
if (!level->physics->isBlockInside(x,y,z, player->hitbox)){
|
||||
chunks->set(x, y, z, player->choosenBlock, states);
|
||||
lighting->onBlockSet(x,y,z, player->choosenBlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Events::jactive(BIND_PLAYER_PICK)){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue