HomeJavaModsMaxEntitiesInChunk
MaxEntitiesInChunk
ModsJava

MaxEntitiesInChunk

by Sudark · on Modrinth

Manage or Restrict the number of entities in each chunk. specially adapt to Mohist Server.| 限制每个区块的实体上限,并适配Mohist。

⬇ Download on Modrinth

info


功能概述 | Overview

一个轻量级 Paper 插件,用于限制每个区块内的实体自然生成数量,精细化控制服务器负载。
A lightweight Paper plugin that limits natural entity spawns per chunk for fine-grained server performance control.


核心特性 | Key Features

1. 按区块精准控制 | Per-Chunk Control

2. 跨世界支持 | Multi-World Support

3. 仅限制自然生成 | Natural Spawns Only

4. 持久化存储 | Persistent Storage


设计原理 | Design Principles

事件驱动 | Event-Driven

插件监听 CreatureSpawnEvent,在实体生成前判断当前区块实体数量是否超过上限:
The plugin listens to CreatureSpawnEvent and checks if the current chunk entity count exceeds the limit before spawning:

实体自然生成 → 获取所在区块 → 读取区块上限 → 超限则取消生成
Entity Spawns → Get Chunk → Read Limit → Cancel if Exceeded

默认上限 | Default Limit

性能友好 | Performance-Friendly


命令 | Commands

主命令 / Main Command: /LimitEntitiesInChunk (简写 / Alias: /leic)

子命令 Subcommand 说明 Description
set <数量> 设置当前所在区块的实体上限
Set entity limit for current chunk
cancel 取消当前区块的自定义上限(恢复默认 20)
Remove custom limit for current chunk (reset to default 20)
list 列出所有已配置区块的上限
List all configured chunk limits

使用示例 | Usage Examples

# 将当前区块实体上限设为50
# Set current chunk entity limit to 50
/leic set 50

# 取消当前区块的限制,恢复默认
# Remove current chunk limit, reset to default
/leic cancel

# 查看所有配置
# View all configurations
/leic list

配置文件 | Configuration

插件会在 plugins/MaxEntitiesInChunk/ 目录下生成 chunks.yml
The plugin generates chunks.yml in plugins/MaxEntitiesInChunk/:

world:
  "0,0": 50
  "1,-2": 30
world_nether:
  "5,10": 15

格式:世界名.区块X坐标,区块Z坐标: 上限
Format: worldName.chunkX,chunkZ: limit


安装 | Installation

  1. 下载插件 jar 文件 / Download the plugin jar
  2. 放入 plugins/ 文件夹 / Place in plugins/ folder
  3. 重启服务器 / Restart server
Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more