BridgeFalls
BridgeFalls 是一个 Minecraft 插件,为已放置的方块及其附近方块添加了结构稳定性规则。
如果某个方块没有有效的支撑,它在放置时可能会被拒绝,或者被标记为不稳定并在稍后掉落。
它专为 Paper/Folia 风格服务器 设计,包含可配置的支撑规则、视觉上的不稳定反馈以及游戏内管理员命令。
功能
- 对放置/破坏方块的 支撑模拟(垂直、水平、顶部支撑和锚点检查)
- 支持 3D 连通性(包括对角线)的 锚点验证
- 不稳定方块的生命周期:标记、警告、持久化,并可选择转换为
FallingBlock
- 使用可配置粒子颜色和警告声音的 视觉反馈
- 针对以下内容的 大型材质规则列表:
- 非支撑垂直方块
- 非支撑水平方块
- 始终稳定的方块
- 始终稳定但无支撑的方块
- 在水上悬浮的支撑方块
- 游戏模式排除(例如创造模式/旁观者模式)
- 运行时配置命令 (
/bf config ...),带有验证和重载功能
- 兼容 Folia 的计划任务 (
GlobalRegionScheduler + 按区域执行)
- 将不稳定方块持久化到
unstable-blocks.yml
兼容性
- Java: 21
- API 目标: Paper API
1.21.11-R0.1-SNAPSHOT
- 声明支持的 Minecraft 版本:
1.20 - 1.21.11
plugin.yml 中包含 folia-supported: true
安装
- 构建或下载插件 jar 文件。
- 将 jar 放入服务器的
plugins/ 文件夹中。
- 启动服务器一次以生成默认文件。
- 编辑:
plugins/BridgeFalls/config.yml
plugins/BridgeFalls/messages.yml
- 使用
/bf reload 或重启服务器。
命令
主要别名:
/bf
/bridgeFalls
/bfCommand
/bridgeFallsCommand
权限:
bridgefalls.admin (默认:op)
核心命令:
/bf help
/bf enable
/bf disable
/bf reload
配置命令:
- 半径
/bf config support-radius <value>
/bf config top-support-radius <value>
/bf config anchor-support-radius <value>
- 行为
/bf config fall-delay-minutes <minutes>
/bf config time-to-check <ticks>
/bf config debug [true|false]
/bf config allow-placing-unstable-blocks [true|false]
/bf config falling-block [enable|disable]
/bf config falling-block drop-item [true|false]
/bf config falling-block hurt-entities [true|false]
- 列表 (
list, add, remove)
no-rest-vertical
no-rest-horizontal
always-stable
always-stable-no-support
floating-support
instability-colors
disabled-gamemodes
支撑工作原理(概览)
BridgeFalls 从多个角度评估支撑情况:
- 直接垂直支撑
- 检查方块下方 3x3 的区域
- 排除空气和
no-rest-blocks-vertical 列表中列出的材质
- 水平支撑
- BFS 风格的搜索,最大距离为
support-radius
- 仅遍历允许作为水平支撑提供者的方块
- 顶部支撑
- 可选的向上检查,最大距离为
top-support-radius
- 锚点检查
- 在
anchor-support-radius 范围内的连通性测试
- 使用包括对角线在内的 3D 相邻方块
如果缺失支撑:
- 放置可能会被拒绝,或者
- 方块会被接受但标记为不稳定(取决于配置)
被标记为不稳定的方块会定期重新评估。如果在 fall-delay-minutes 后仍然不稳定,它们可以作为 FallingBlock 实体掉落。
配置说明
config.yml 中的重要键:
support-radius
top-support-radius
anchor-support-radius
fall-delay-minutes (0 表示立即掉落)
time-to-check (任务间隔,单位为刻)
allow-placing-unstable-blocks
falling-block
falling-block-drop-item
falling-block-hurt-entities
disabled-gamemodes
instability-colors
instable-color (当掉落模式禁用时的默认轮廓颜色)
消息可在 messages.yml 中自定义,并使用占位符(例如 {block}, {radius}, {count}, {minutes})。
Folia 行为
BridgeFalls 使用 全局重复任务仅作为调度器。
所有方块/世界的读取都在 区域调度器 上按位置执行,这是 Folia 区域线程的安全模型。
从源码构建
# Unix/macOS
./gradlew clean shadowJar
# Windows
./gradlew.bat clean shadowJar
输出 jar:
build/libs/BridgeFalls-<version>.jar
本地 Folia 运行任务(项目已配置 run-paper):
# Unix/macOS
./gradlew runFolia
# Windows
./gradlew.bat runFolia
开发质量工具
项目配置了以下工具:
- Checkstyle
- PMD
- SonarQube 插件
许可证
请参阅 LICENSE.md。
BridgeFalls
BridgeFalls is a Minecraft plugin that adds structural stability rules to placed and nearby blocks.
If a block has no valid support, it can be denied on placement or marked unstable and made to fall later.
It is designed for Paper/Folia-style servers and includes configurable support rules, visual instability feedback, and in-game admin commands.
Features
- Support simulation for placed/broken blocks (vertical, horizontal, top support, and anchor checks)
- Anchor validation with 3D connectivity (including diagonals)
- Unstable block lifecycle: mark, warn, persist, and optionally convert to
FallingBlock
- Visual feedback with configurable particle colors and warning sounds
- Large material rule lists for:
- non-supporting vertical blocks
- non-supporting horizontal blocks
- always-stable blocks
- always-stable-but-no-support blocks
- floating-on-water support blocks
- Gamemode exclusions (for example Creative/Spectator)
- Runtime configuration commands (
/bf config ...) with validation and reload
- Folia-compatible scheduling (
GlobalRegionScheduler + per-region execution)
- Persistence of unstable blocks to
unstable-blocks.yml
Compatibility
- Java: 21
- API target: Paper API
1.21.11-R0.1-SNAPSHOT
- Declared supported Minecraft versions:
1.20 - 1.21.11
folia-supported: true in plugin.yml
Installation
- Build or download the plugin jar.
- Put the jar in your server
plugins/ folder.
- Start the server once to generate default files.
- Edit:
plugins/BridgeFalls/config.yml
plugins/BridgeFalls/messages.yml
- Use
/bf reload or restart the server.
Commands
Main aliases:
/bf
/bridgeFalls
/bfCommand
/bridgeFallsCommand
Permission:
bridgefalls.admin (default: op)
Core:
/bf help
/bf enable
/bf disable
/bf reload
Config commands:
- Radius
/bf config support-radius <value>
/bf config top-support-radius <value>
/bf config anchor-support-radius <value>
- Behavior
/bf config fall-delay-minutes <minutes>
/bf config time-to-check <ticks>
/bf config debug [true|false]
/bf config allow-placing-unstable-blocks [true|false]
/bf config falling-block [enable|disable]
/bf config falling-block drop-item [true|false]
/bf config falling-block hurt-entities [true|false]
- Lists (
list, add, remove)
no-rest-vertical
no-rest-horizontal
always-stable
always-stable-no-support
floating-support
instability-colors
disabled-gamemodes
How support works (high level)
BridgeFalls evaluates support from several angles:
- Direct vertical support
- checks the 3x3 area below a block
- excludes air and materials listed in
no-rest-blocks-vertical
- Horizontal support
- BFS-style search up to
support-radius
- only traverses blocks allowed as horizontal support providers
- Top support
- optional upward check up to
top-support-radius
- Anchor check
- connectivity test within
anchor-support-radius
- uses 3D neighboring blocks including diagonals
If support is missing:
- placement can be denied, or
- block is accepted but marked unstable (depending on config)
Marked unstable blocks are periodically re-evaluated. If still unstable after fall-delay-minutes, they can fall as FallingBlock entities.
Configuration notes
Important keys in config.yml:
support-radius
top-support-radius
anchor-support-radius
fall-delay-minutes (0 means immediate fall)
time-to-check (task interval in ticks)
allow-placing-unstable-blocks
falling-block
falling-block-drop-item
falling-block-hurt-entities
disabled-gamemodes
instability-colors
instable-color (default outline when falling mode is disabled)
Messages are customizable in messages.yml with placeholders (for example {block}, {radius}, {count}, {minutes}).
Folia behavior
BridgeFalls uses a global repeating task only as a dispatcher.
All block/world reads are executed per location on the region scheduler, which is the safe model for Folia region threading.
Build from source
# Unix/macOS
./gradlew clean shadowJar
# Windows
./gradlew.bat clean shadowJar
Output jar:
build/libs/BridgeFalls-<version>.jar
Local Folia run task (project configured with run-paper):
# Unix/macOS
./gradlew runFolia
# Windows
./gradlew.bat runFolia
Development quality tools
The project is configured with:
- Checkstyle
- PMD
- SonarQube plugin
License
See LICENSE.md.
评论 0
登录后参与评分
还没有评论,来抢沙发吧