Merge branch 'main' into entities
This commit is contained in:
@@ -84,9 +84,12 @@ void BlocksController::updateBlock(int x, int y, int z) {
|
||||
if (vox == nullptr)
|
||||
return;
|
||||
auto def = level->content->getIndices()->blocks.get(vox->id);
|
||||
if (def->grounded && !chunks->isSolidBlock(x, y-1, z)) {
|
||||
breakBlock(nullptr, def, x, y, z);
|
||||
return;
|
||||
if (def->grounded) {
|
||||
const auto& vec = get_ground_direction(def, vox->state.rotation);
|
||||
if (!chunks->isSolidBlock(x+vec.x, y+vec.y, z+vec.z)) {
|
||||
breakBlock(nullptr, def, x, y, z);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (def->rt.funcsset.update) {
|
||||
scripting::update_block(def, x, y, z);
|
||||
|
||||
Reference in New Issue
Block a user