Gravity Anchors
可放置的锚点,能够扭曲局部重力。标记一个方块(或放置自定义的 Gravity Anchor 物品),它就会成为一个引力井。右键点击它可以在三种场模式之间切换,附近的实体将被以受限于 TPS 友好的速度上限的方式吸入、推开或发射。
功能说明
每隔几刻,每个锚点都会在其半径范围内扫描实体,并根据当前模式施加相应的速度:
- 吸引 (Attract):将实体向内拉取,强度随距离衰减。适用于物品收集和怪物通道。
- 排斥 (Repel):将实体推开。
- 发射 (Launch):按计时器将实体向上和向外发射,你可以借此建造弹射台和陷阱。
锚点在服务器重启后依然保留。所有速度均被限制,以防止实体飞出地图,繁忙区域会进行速率限制以保持服务器流畅运行。
创建与使用锚点
注视一个方块并运行 /gravityanchor 将其标记为锚点。它默认处于吸引模式。
你也可以运行 /gravityanchor item 获取一个可放置的 Gravity Anchor 物品,它是一个发光的磁石。放置它即可创建锚点。破坏该方块会移除锚点,在生存模式下它会掉落回物品形态。
右键点击任意锚点方块可在吸引、排斥和发射模式之间循环切换。新模式会在你的操作栏中显示,并伴有提示音。
命令
所有命令均以 /gravityanchor 开头(别名:/ga, /gravity, /anchor)。
| 命令 |
描述 |
/gravityanchor |
将你注视的方块标记为锚点。 |
/gravityanchor mode <attract|repel|launch> |
设置你注视的锚点的模式。 |
/gravityanchor tune <radius|strength> <value> |
调整所注视的锚点参数(半径上限为 32,强度上限为 5)。 |
/gravityanchor item |
给予你一个可放置的 Gravity Anchor 物品。 |
/gravityanchor list |
列出已注册的锚点(显示相对于你在世界中的距离)。 |
/gravityanchor remove |
移除你注视的锚点。 |
/gravityanchor clear |
移除所有锚点。(管理员) |
/gravityanchor reload |
重新加载 config.yml。(管理员) |
/gravityanchor info |
插件信息及当前设置。 |
权限
| 权限节点 |
默认值 |
授予权限 |
gravity.use |
op |
创建、调整、切换、列出和移除锚点;获取物品。 |
gravity.admin |
op |
执行 clear 和 reload(包含 gravity.use 的所有权限)。 |
gravity.use 控制所有锚点的创建和调整。gravity.admin 是用于破坏性命令和全局命令的第二层级。
配置 (config.yml)
| 键名 |
默认值 |
含义 |
affect-players |
true |
锚点场是否会影响玩家。 |
exempt-sneaking |
true |
潜行的玩家不受任何场的影响。 |
max-velocity |
2.5 |
场施加速度的硬性上限(方块/刻)。 |
task-period-ticks |
2 |
场引擎运行的频率(每多少刻执行一次)。 |
max-entities-per-anchor |
60 |
单次运行中单个锚点处理的最大实体数量。 |
trace-particles |
true |
绘制尘环/场轮廓粒子效果。 |
launch-interval-ticks |
30 |
发射模式触发脉冲的频率(每多少刻执行一次)。 |
modes.<mode>.radius / .strength |
依模式而定 |
当创建锚点或切换到该模式时应用的默认值。 |
针对单个锚点的 tune 调整将持续生效,直到你切换该锚点的模式为止。
兼容性
兼容 Paper、Spigot、Bukkit 和 Purpur,支持 Minecraft 版本 1.21.1 至 1.21.11 以及 26.1.x 系列(已在 26.1.2 上验证),需要 Java 21。仅基于 Spigot API 构建(不包含仅限 Paper 的类),以确保可移植性。
原始概念,内部测试想法,并非来自 Reddit 帖子。
Gravity Anchors
Placeable anchors that warp local gravity. Mark a block (or place the custom
Gravity Anchor item) and it becomes a gravity well. Right-click it to cycle
through three field modes, and nearby entities get pulled, pushed, or launched
by a capped, TPS-friendly velocity field.
What it does
Every couple of ticks each anchor scans for entities inside its radius and
applies a velocity based on its current mode:
- Attract pulls entities inward, with the strength falling off over distance.
Good for item collection and mob funnels.
- Repel pushes entities away.
- Launch fires entities up and outward on a timer, so you can build launch pads
and traps.
Anchors stick around across restarts. Every velocity is clamped so nothing flies
off the map, and busy areas are rate-limited to keep the server smooth.
Creating and using anchors
Look at a block and run /gravityanchor to mark it as an anchor. It starts in
Attract mode.
You can also run /gravityanchor item to get a placeable Gravity Anchor, which
is a glowing lodestone. Place it to create an anchor. Breaking the block removes
the anchor, and in survival it drops the item back.
Right-click any anchor block to cycle the mode from Attract to Repel to Launch.
The new mode shows on your action bar with a sound cue.
Commands
All under /gravityanchor (aliases: /ga, /gravity, /anchor).
| Command |
Description |
/gravityanchor |
Mark the block you are looking at as an anchor. |
/gravityanchor mode <attract|repel|launch> |
Set the mode of the anchor you are looking at. |
/gravityanchor tune <radius|strength> <value> |
Tune the looked-at anchor (radius capped at 32, strength at 5). |
/gravityanchor item |
Give yourself a placeable Gravity Anchor item. |
/gravityanchor list |
List registered anchors (with distance, in your world). |
/gravityanchor remove |
Remove the anchor you are looking at. |
/gravityanchor clear |
Remove ALL anchors. (admin) |
/gravityanchor reload |
Reload config.yml. (admin) |
/gravityanchor info |
Plugin info and current settings. |
Permissions
| Permission |
Default |
Grants |
gravity.use |
op |
Create, tune, cycle, list, and remove anchors; get the item. |
gravity.admin |
op |
clear and reload (includes gravity.use). |
gravity.use gates all anchor creation and tuning. gravity.admin is a second
tier for the destructive and global commands.
Configuration (config.yml)
| Key |
Default |
Meaning |
affect-players |
true |
Whether anchor fields move players at all. |
exempt-sneaking |
true |
Sneaking players are ignored by all fields. |
max-velocity |
2.5 |
Hard cap (blocks/tick) on field-applied speed. |
task-period-ticks |
2 |
How often the field engine runs. |
max-entities-per-anchor |
60 |
Max entities one anchor processes per run. |
trace-particles |
true |
Draw the dust ring/field outline. |
launch-interval-ticks |
30 |
How often Launch mode fires its impulse. |
modes.<mode>.radius / .strength |
per mode |
Defaults applied when an anchor is created or switched to that mode. |
Per-anchor tune overrides stick until you switch that anchor's mode.
Compatibility
Works on Paper, Spigot, Bukkit, and Purpur for 1.21.1 through 1.21.11 and the
26.1.x line (verified on 26.1.2), Java 21. Built against the Spigot API only (no
Paper-only classes) for portability.
Original concept, an internal test idea, not from a Reddit post.
评论 0
登录后参与评分
还没有评论,来抢沙发吧