PassivePhantoms
一款 Minecraft Bukkit/Spigot 插件,使潜影贝(Phantom)在末地自然生成,并且在被玩家攻击之前处于被动状态。该插件包含每个区块的怪物上限系统以防止无限生成,并改进了移动机制以帮助防止潜影贝卡在紫颂花树上。
注意:移动改进功能具有实验性,潜影贝仍可能卡在紫颂花树上。
工作原理
- 自然生成:通过自定义生成控制,默认启用末地生成;除非
allow_overworld_spawning为 true,否则主世界生成处于关闭状态 - 被动行为:新生成的潜影贝完全处于被动状态,不会主动追击玩家
- 挑衅机制:当玩家攻击潜影贝(近战或远程)时,它会变得“愤怒”并可以反击
- 远程攻击反应:潜影贝在被箭矢、三叉戟、雪球或其他投射物击中时也会变得具有攻击性
- 即时反应:愤怒的潜影贝会立即锁定并攻击击中它的玩家
- 持续愤怒:一旦潜影贝变怒,它将保持攻击状态,并保留原版行为
- 怪物上限保护:每个区块最多 8 只潜影贝,防止无限生成并确保公平分布
- 移动改进:自动卡住检测与逃脱辅助功能可防止潜影贝被困在紫颂花树中
安装方法
- 下载:从发布页面获取最新的 JAR 文件 (v1.3.0-Dev2a)
- 安装:将
PassivePhantoms-1.3.0-Dev2a.jar放入服务器的plugins/文件夹中 - (推荐):如果是从旧版本更新,请删除整个
PassivePhantoms配置文件夹,让插件在下一次服务器启动时重新生成一个新的配置文件。这样可以确保获得所有新的配置选项并避免遗留问题。 - 重启:重启服务器
- 验证:检查控制台是否显示 “PassivePhantoms plugin enabled!” 消息
配置
插件首次运行时会在 config.yml 文件中生成以下选项:
debug_logging: 启用/禁用调试消息(默认:false)passive_phantoms_enabled: 启用/禁用插件(默认:true)phantom_settings.custom_spawn_control: 控制潜影贝生成(默认:true)phantom_settings.allow_overworld_spawning: 当自定义生成控制开启时,允许原版主世界潜影贝生成(默认:false)phantom_settings.allow_end_spawning: 当自定义生成控制开启时,允许自定义末地潜影贝生成(默认:true)phantom_settings.end_spawn_chance: 末地潜影贝生成几率(默认:0.05 = 5%)phantom_settings.max_phantoms_per_chunk: 每个区块最大潜影贝数量(默认:8)phantom_settings.movement_improvements_enabled: 启用移动改进(默认:true)phantom_settings.stuck_detection_ticks: 检查潜影贝是否卡住的频率(默认:100 tick = 5 秒)phantom_settings.stuck_threshold: 连续检测到卡住前的次数阈值(默认:3)phantom_settings.stuck_distance_threshold: 最小移动距离(默认:1.0 格)phantom_settings.max_stuck_attempts: 移除前最大的逃脱尝试次数(默认:5)
命令
/passivephantoms- 显示插件版本和用法/passivephantoms reload- 重新加载配置/passivephantoms debug- 切换调试日志记录/passivephantoms status- 检查插件状态和潜影贝数量/passivephantoms list- 列出具有攻击性的潜影贝/passivephantoms update- 检查 Modrinth 是否有新版本
权限
passivephantoms.reload- 允许重新加载配置(默认:op)passivephantoms.notify- 当插件过时且在加入服务器时接收更新通知(默认:op)passivephantoms.update- 允许使用/passivephantoms update(默认:op)
怪物上限系统
该插件实现了基于区块的怪物上限系统,以防止潜影贝无限生成:
- 每区块限制:可配置的每个区块最大潜影贝数量(默认:8)
- 公平分布:防止单个玩家独占所有潜影贝
- 多区块支持:每个区块可以独立达到其上限
- 高效计数:使用区块坐标进行快速潜影贝计数
- 调试监控:在调试日志中显示区块状态和潜影贝数量
- 可配置:服务器管理员可以通过
phantom_settings.max_phantoms_per_chunk调整限制 - 严格执行:怪物上限被严格执行;任何区块都不会超过配置的限制,模拟原版怪物上限逻辑。
- 验证:在配置中启用
debug_logging: true以查看每当区块怪物上限达到或被强制执行时的日志消息。
从源代码构建
前置要求
- Java 8 或更高版本
- Maven 3.6 或更高版本
步骤
- 克隆此仓库
- 运行:
mvn clean package - 在
target/文件夹中找到编译好的 JAR 文件
兼容性
- Minecraft 版本:1.13 – 1.21+ / 26.x
- 服务器类型:Bukkit, Spigot, Paper, Folia
- Folia:完全支持 (
folia-supported: true)。实体/世界工作使用 EntityScheduler 和基于区块的 RegionScheduler。 - Java 版本:8 或更高版本
故障排除
潜影贝未在末地生成
- 验证插件已启用(默认为 true)
- 检查 config.yml 中的生成几率设置,默认值较低,增加它以验证功能是否正常
潜影贝在被击中后未发起攻击:
- 确保你使用的是最新版本
- 检查服务器控制台是否有任何错误消息
- 验证插件在控制台中已启用
插件未加载:
- 确保你使用的是 Java 8 或更高版本
- 检查 JAR 文件是否在正确的 plugins 文件夹中
- 验证你的服务器版本是否兼容
投射物未使潜影贝变得具有攻击性:
- 确保你使用的是 1.2.5 或更高版本
- 检查投射物是否由玩家发射
- 验证是否启用了调试日志以查看详细消息
幻翼生成过多:
- 生物上限系统限制每个区块最多生成 8 只幻翼
- 使用
/passivephantoms status查看幻翼数量 - 启用调试日志以查看生物上限状态信息
更新后配置出现问题:
- 如果更新插件后遇到错误或功能缺失,请删除整个
PassivePhantoms配置文件夹,让插件重新生成一个新的。这样可以确保所有新设置都已存在,并避免遗留的配置问题。
幻翼卡在紫颂果树上:
- 移动改进系统会自动检测并帮助被困的幻翼
- 在配置文件中启用
movement_improvements_enabled: true(默认已启用) - 使用
/passivephantoms status检查插件状态 - 调整
stuck_detection_ticks以改变检测频率 - 如果幻翼被救助得过于频繁,可以增加
stuck_threshold的值
许可证
本项目为开源项目。可根据需要自由修改和分发。
支持
如果遇到任何问题或有疑问,请在 GitHub 仓库中创建 Issue。
PassivePhantoms
A Minecraft Bukkit/Spigot plugin that makes phantoms spawn naturally in the end & are passive until they are attacked by a player. Features a per-chunk mobcap system to prevent infinite spawning and movement improvements to help prevent phantoms from getting hung up on chorus fruit trees.
Note: Movement improvements are experimental and phantoms may still get hung up on chorus trees.
How It Works
- Natural Spawning: With custom spawn control, End spawns are enabled by default; Overworld is off unless
allow_overworld_spawningis true - Passive Behavior: New phantoms are completely passive and won't target players
- Provocation: When a player attacks a phantom (melee or projectile), it becomes "angry" and can attack back
- Projectile Aggression: Phantoms also become aggressive when hit by arrows, tridents, snowballs, or other projectiles
- Immediate Response: Angry phantoms immediately target and attack the player who hit them
- Persistent Anger: Once a phantom is angry, it remains aggressive, retaining vanilla behaviors
- Mobcap Protection: Maximum of 8 phantoms per chunk prevents infinite spawning and ensures fair distribution
- Movement Improvements: Automatic stuck detection and escape assistance prevents phantoms from getting trapped in chorus fruit trees
Installation
- Download: Get the latest JAR file from the releases (v1.3.0-Dev2a)
- Install: Place
PassivePhantoms-1.3.0-Dev2a.jarin your server'splugins/folder - (Recommended): If updating from an older version, delete the entire
PassivePhantomsconfig folder and let the plugin generate a new one on next server start. This ensures you get all new config options and avoid legacy issues. - Restart: Restart your server
- Verify: Check the console for "PassivePhantoms plugin enabled!" message
Configuration
The plugin generates a config.yml file on first run with the following options:
debug_logging: Enable/disable debug messages (default: false)passive_phantoms_enabled: Enable/disable the plugin (default: true)phantom_settings.custom_spawn_control: Control phantom spawning (default: true)phantom_settings.allow_overworld_spawning: Allow vanilla Overworld phantom spawns when custom spawn control is on (default: false)phantom_settings.allow_end_spawning: Allow custom End phantom spawns when custom spawn control is on (default: true)phantom_settings.end_spawn_chance: Chance for phantoms to spawn in The End (default: 0.05 = 5%)phantom_settings.max_phantoms_per_chunk: Maximum phantoms per chunk (default: 8)phantom_settings.movement_improvements_enabled: Enable movement improvements (default: true)phantom_settings.stuck_detection_ticks: How often to check for stuck phantoms (default: 100 ticks = 5 seconds)phantom_settings.stuck_threshold: Consecutive checks before considering stuck (default: 3)phantom_settings.stuck_distance_threshold: Minimum movement distance (default: 1.0 blocks)phantom_settings.max_stuck_attempts: Maximum escape attempts before removal (default: 5)
Commands
/passivephantoms- Shows plugin version and usage/passivephantoms reload- Reloads the configuration/passivephantoms debug- Toggle debug logging/passivephantoms status- Check plugin status and phantom populations/passivephantoms list- List aggressive phantoms/passivephantoms update- Check Modrinth for a newer version
Permissions
passivephantoms.reload- Allows reloading the configuration (default: op)passivephantoms.notify- Receive update notice on join when outdated (default: op)passivephantoms.update- Allows/passivephantoms update(default: op)
Mobcap System
The plugin implements a per-chunk mobcap system to prevent infinite phantom spawning:
- Per-chunk limit: Configurable maximum phantoms per chunk (default: 8)
- Fair distribution: Prevents single players from monopolizing all phantoms
- Multiple chunks: Each chunk can independently reach its limit
- Efficient counting: Uses chunk coordinates for fast phantom counting
- Debug monitoring: Shows chunk status and phantom populations in debug logs
- Configurable: Server admins can adjust the limit via
phantom_settings.max_phantoms_per_chunk - Strict enforcement: The mobcap is strictly enforced; no chunk will ever exceed the configured limit, mirroring vanilla mobcap logic.
- Verification: Enable
debug_logging: truein your config to see log messages whenever the chunk mobcap is reached or enforced.
Building from Source
Prerequisites
- Java 8 or higher
- Maven 3.6 or higher
Steps
- Clone this repository
- Run:
mvn clean package - Find the compiled JAR in the
target/folder
Compatibility
- Minecraft Version: 1.13 – 1.21+ / 26.x
- Server Type: Bukkit, Spigot, Paper, Folia
- Folia: Fully supported (
folia-supported: true). Entity/world work uses EntityScheduler and per-chunk RegionScheduler. - Java Version: 8 or higher
Troubleshooting
Phantoms not spawning in the end
- Verify plugin is enabled (true by defualt)
- Check spawn chance setting in config.yml, it is low be default, increase it to verify functionality
Phantoms not attacking after being hit:
- Make sure you're using the latest version
- Check server console for any error messages
- Verify the plugin is enabled in the console
Plugin not loading:
- Ensure you're using Java 8 or higher
- Check that the JAR file is in the correct plugins folder
- Verify your server version is compatible
Projectiles not making phantoms aggressive:
- Ensure you're using version 1.2.5 or higher
- Check that the projectile was shot by a player
- Verify debug logging is enabled to see detailed messages
Too many phantoms spawning:
- The mobcap system limits phantoms to 8 per chunk
- Use
/passivephantoms statusto check phantom populations - Enable debug logging to see mobcap status messages
Config issues after updating:
- If you experience errors or missing features after updating the plugin, delete the entire
PassivePhantomsconfig folder and let the plugin generate a new one. This ensures all new settings are present and avoids legacy config problems.
Phantoms getting stuck in chorus fruit trees:
- The movement improvement system automatically detects and helps stuck phantoms
- Enable
movement_improvements_enabled: truein your config (default: enabled) - Use
/passivephantoms statusto check plugin status - Adjust
stuck_detection_ticksfor more/less frequent checks - Increase
stuck_thresholdif phantoms are being helped too aggressively
License
This project is open source. Feel free to modify and distribute as needed.
Support
If you encounter any issues or have questions, please create an issue on the GitHub repository.
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 PassivePhantoms
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 添加了
allow_overworld_spawning和allow_end_spawning(配置 v4),用于可选的主世界/末地生成控制。 - 默认值与之前行为一致:主世界关闭,末地自定义生成开启。
- 状态/调试输出会显示这两个标志;迁移操作会将新键合并到现有配置中。
- Locktight 风格的更新检查器:使用
/passivephantoms update命令,为管理员加入时发送通知,并在版本过时时通知在线的管理员。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
使床在所有维度中爆炸的模组
插件
为 Armor Poser 模组添加兼容性
插件
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
评论 0
登录后参与评分
还没有评论,来抢沙发吧