# 区块优化

## 一、介绍

区块优化系统将会对地皮世界的区块被服务器保存或者加载时对其进行检查并优化，若检测到对应区块的实体或者方块实体数量过多时将会清理，以达到优化服务器的效果.

## 二、设置

要想实现此功能，您需要遵从如下步骤：

* 打开 `setting.yml` 文件并找到如下内容：

```
enabled-components:
  # 是否启用区块优化机制
  chunk-processor: false
```

将其修改为：

```
enabled-components:
  # 是否启用区块优化机制
  chunk-processor: true
```

* 您还可以在此文件中修改如下地方的内容以达到对服务器更好的优化.

```
# 区块优化配置
chunk-processor:
  # 自动取消保存未被认领的地皮所在的区块
  auto-trim: false
  # 每个区块的 tile 实体上限
  max-tiles: 4096
  # 每个区块的普通实体上限
  max-entities: 512
  # 是否禁用原版方块重力
  disable-physics: false
```

* 重启服务器.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/plotsquared-wiki/you-hua/qu-kuai-you-hua.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
