MaxEntitiesInChunk 图标

MaxEntitiesInChunk

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/meic
资源信息

Minecraft 版本: 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: paper purpur spigot

标签: management mobs optimization

资源介绍

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

  • 针对每个区块单独设置实体上限
  • Set individual entity limits for each chunk

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

  • 自动区分不同世界的区块设置
  • Automatically separates chunk settings by world

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

  • 只拦截自然生成的实体 (NATURAL SpawnReason)
  • Only intercepts naturally spawned entities
  • 不影响刷怪笼、命令召唤、玩家繁殖等
  • Does not affect spawners, commands, breeding, etc.

4. 持久化存储 | Persistent Storage

  • 区块配置保存至 chunks.yml
  • Chunk configurations saved to chunks.yml
  • 服务器重启后自动加载
  • Automatically loaded on server restart

设计原理 | 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

  • 未配置的区块默认上限为 20 实体
  • Unconfigured chunks default to 20 entities

性能友好 | Performance-Friendly

  • 使用内存 Map 缓存配置,避免频繁文件读取
  • Uses in-memory Map cache to avoid frequent file reads
  • 仅在配置变更时写入文件
  • Only writes to file when configuration changes

命令 | 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
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Laggy Printers

价格:0 墨喵币
下载量:0

查看详情
Undopia 3D Bars

价格:0 墨喵币
下载量:0

查看详情
TV Test Pattern Themed Tooltip (Frame-only Alt-BG 7-Color)

价格:0 墨喵币
下载量:0

查看详情
Sticky Pistons Plus

价格:0 墨喵币
下载量:0

查看详情