无需任何客户端模组,即可在世界边界后方破坏或放置方块并伤害实体!
功能
- 绕过世界边界限制,用于:
- 放置方块(仅可通过左击携带的方块实现)
- 破坏方块
- 战斗与实体交互
- 穿越边界移动玩家
- 基于显示实体(display entities)的世界边界外方块轮廓系统
- 方块破坏动画与特效
- 真实的战斗机制,包含暴击及基于护甲和武器的伤害计算
安装
- 将插件 JAR 文件和 packetevents.jar 放入服务器的
plugins/ 文件夹中
- 重启/重载服务器
- 根据需要配置
plugins/BeyondBorderUnlocked/config.yml
[!WARNING]
这些超出世界边界的行为并非游戏设计初衷。
可能会出现意外错误,且体验将与正常 gameplay 不同。
在生产环境使用前请进行充分测试。
配置 (config.yml)
building: false # 允许在边界外放置方块(左击)
breaking: true # 允许在边界外破坏方块(左击)
walkthrough: true # 允许穿越边界
hitting: true # 允许在边界外攻击实体
damage:
enabled: true # 启用下方的自定义边界伤害设置(如果为 false,插件不会修改你世界中下方的值)
buffer: 5.0 # 开始造成伤害前的距离
amount: 0.2 # 每秒伤害量
blockOutline:
enabled: true # 显示边界外的方块轮廓
size: 0.009 # 轮廓段的大小
block: black_stained_glass # 用于轮廓的方块类型
命令
/beyondborder reload - 重新加载配置
/beyondborder set <setting> <value> - 更改设置
可用设置:
building, breaking, walkthrough, blockOutline.enabled, hitting (true/false)
damage.enabled, damage.buffer, blockOutline.size, damage.amount (数值)
blockOutline.block (文本)
权限:
beyondborder.commands - 访问命令(默认:op)
API 文档
要在插件中使用此 API,请在你的 plugin.yml 中添加 depends: BeyondBorderUnlocked,并将此插件作为仅编译依赖项:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compileOnly("com.github.max1mde:BeyondBorderUnlocked:1.0.0")
}
访问 API
BeyondBorderUnlocked plugin = BeyondBorderUnlocked.getInstance();
Config config = plugin.getPluginConfig();
事件
| 事件类 |
异步 |
可取消 |
BlockBreakBorderEvent |
否 |
是 |
BlockPlaceBorderEvent |
否 |
是 |
AsyncEntityDamageBorderEvent |
是 |
是 |
AsyncEntityInteractBorderEvent |
是 |
是 |
示例事件用法:
@EventHandler
public void onEntityDamage(AsyncEntityDamageBorderEvent event) {
if (event.getDamager() instanceof Player) {
event.setDamage(event.getDamage() * 1.5); // 例如增加 50% 的伤害
}
}
已知问题
- 只能使用鼠标左键放置方块
- 由于需要传送玩家,穿越世界边界存在 bug
- 有时即使按住鼠标左键,方块也会继续破坏或破坏进度重置
- 方块选择框在某些方块上的大小不正确
- 方块破坏、伤害计算和其他交互等机制并不完全准确
工作原理
默认情况下,位于世界边界后的 Minecraft 客户端不会发送某些数据包:
- 不发送方块破坏/放置数据包
- 不发送方块破坏进度数据包
- 客户端不显示方块选择轮廓
本插件通过以下方式工作:
- 监听手臂摆动动画数据包(这些数据包始终会被发送)
- 计算玩家正在查看的方块
- 在服务端模拟相应的操作:
方块选择轮廓是通过以下方式使用显示实体创建的:
- 由 12 个物品显示实体组成的 3D 轮廓
- 用于生成和定位这些实体的自定义数据包
- 仅对看向该方块的可见
因此,当在边界外右键点击时,building 功能无法工作,因为客户端在边界外右键点击时不发送任何数据包。唯一发送的数据包是玩家左击时的手臂动画数据包。
Break or place blocks & damage entities behind the vanilla worldborder without any client side-mods!
Features
- Bypass world border restrictions for:
- Placing blocks (only possible by left clicking with a block)
- Breaking blocks
- Combat and entity interactions
- Player movement through border
- Visual block outline system for blocks beyond border (using display entities)
- Block breaking animations and effects
- Realistic combat mechanics with critical hits & damage calculation based on armor and weapons
Installation
- Place the plugin JAR and packetevents.jar in your server's
plugins/ folder
- Restart/reload your server
- Configure
plugins/BeyondBorderUnlocked/config.yml to your needs
[!WARNING]
These actions beyond the world border are not intended by game design.
Unexpected bugs may occur, and the experience will differ from normal gameplay.
Test thoroughly before production use.
Configuration (config.yml)
building: false # Allow block placement beyond border (left click)
breaking: true # # Allow block breaking beyond border (left click)
walkthrough: true # Allow walking through border
hitting: true # Allow hitting entities beyond border
damage:
enabled: true # Enable custom border damage settings below (if false, the plugin does not modify the values below in your worlds)
buffer: 5.0 # Distance before damage starts
amount: 0.2 # Damage per second
blockOutline:
enabled: true # Show block outlines beyond border
size: 0.009 # Size of outline segments
block: black_stained_glass # Block type for outline
Commands
/beyondborder reload - Reload configuration
/beyondborder set <setting> <value> - Change settings
Available settings:
building, breaking, walkthrough, blockOutline.enabled, hitting (true/false)
damage.enabled, damage.buffer, blockOutline.size, damage.amount (numbers)
blockOutline.block (text)
Permissions:
beyondborder.commands - Access to commands (default: op)
API Documentation
To use the api add depends: BeyondBorderUnlocked to your plugin.yml
and this plugin as a compile-only dependency:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compileOnly("com.github.max1mde:BeyondBorderUnlocked:1.0.0")
}
Accessing the API
BeyondBorderUnlocked plugin = BeyondBorderUnlocked.getInstance();
Config config = plugin.getPluginConfig();
Events
| Event Class |
Async |
Cancellable |
BlockBreakBorderEvent |
No |
Yes |
BlockPlaceBorderEvent |
No |
Yes |
AsyncEntityDamageBorderEvent |
Yes |
Yes |
AsyncEntityInteractBorderEvent |
Yes |
Yes |
Example Event Usage:
@EventHandler
public void onEntityDamage(AsyncEntityDamageBorderEvent event) {
if (event.getDamager() instanceof Player) {
event.setDamage(event.getDamage() * 1.5); // 50% more damage for example
}
}
Known Issues
- Blocks can only be placed using the left mouse button
- Walking through the world border is buggy due to required player teleportation
- Blocks sometimes continue breaking without holding the mouse button, or breaking progress resets even when holding the left mouse button
- The block selection outline box has incorrect sizing for certain blocks
- Mechanics such as block breaking, damage calculations, and other interactions are not entirely accurate
How does it work?
By default, Minecraft clients don't send certain packets when behind the world border:
- No block break/place packets
- No block break progress packets
- No block selection outline is displayed by the client
This plugin works by:
- Listening for arm swing animation packets (which are always sent)
- Calculating which block the player is looking at
- Simulating the appropriate action server-side:
- Block breaking with animations and effects
- Block placement with sound effects
The block selection outline is created using:
- 12 item display entities forming a 3D outline
- Custom packets to spawn and position these entities
- Only visible to the player looking at the block
Because of that, the building feature does not work when right-clicking, as the client does not send any packets when right-clicking beyond the world border. The only packet sent is the arm animation packet when the player left-clicks.
评论 0
登录后参与评分
还没有评论,来抢沙发吧