void setBlock(Chunk *chunk, int x, int y, int z, Block block) { Block *current = getBlock(chunk, x, y, z); if (current->logic) freeLogic(current->logic); block.nb_pos_x = current->nb_pos_x; block.nb_neg_x = current->nb_neg_x; block.nb_pos_y = current->nb_pos_y; block.nb_neg_y = current->nb_neg_y; block.nb_pos_z = current->nb_pos_z; block.nb_neg_z = current->nb_neg_z; *getBlock(chunk, x, y, z) = block; renderChunk(chunk); }
static void handle_deinit(void) { accel_data_service_unsubscribe(); hide_sleep_window(); // We are already in background capturing the sleep // if (get_config()->status == STATUS_ACTIVE) { // set_config_status(STATUS_NOTACTIVE); // notify_status_update(get_config()->status); // } // No more worker updates app_worker_message_unsubscribe(); freeLogic(); }