PointControl
一款轻量级的 Forge 模组,为 Minecraft 添加了据点控制机制。
玩家可以争夺区域控制权,队伍通过占领并坚守据点来获得优势。
适用于:
- PvP 服务器
- 小游戏
- 阵营战
- 领土控制系统
- 冒险地图
据点可以在任意位置创建,系统会自动追踪附近的玩家并确定哪个队伍控制了该区域。
功能特性
- 在世界中任意位置创建据点
- 自动检测队伍优势
- 可配置的占领时长
- 自定义的占领动画
- 客户端 HUD 显示据点状态
- 据点数据随世界存档持久保存
- 提供事件 API 供其他模组调用
工作原理
据点(Point) 是游戏中的一个区域。
身处该区域内的玩家会为其所属队伍的势力值做出贡献。
如果某一队伍在该区域内的玩家数量多于其他队伍:
- 据点开始被同化
- 进度逐渐增加,直到达到占领时长
- 该队伍成为据点的所有者
如果有其他队伍进入该区域:
- 占领进度可能会下降
- 据点可能变为争夺中状态
- 据点可能易主
命令
所有命令均需操作员权限。
创建据点
在玩家当前位置创建一个新的据点。
/point create <id> <radius>
示例:
/point create alpha 10
创建一个具有:
移除据点
删除现有的据点。
/point remove <id>
示例:
/point remove alpha
列出据点
显示所有已创建的据点。
/point list
输出示例:
Points: alpha, bravo, charlie
修改占领时长
设置占领一个据点所需的时间。
/point assimilation duration <id> <ticks>
示例:
/point assimilation duration alpha 60
默认值:
30 ticks
数值越高,占领速度越慢。
修改占领动画
设置 HUD 中显示的动画效果。
/point assimilation animation <id> <animation>
可用动画:
up
down
in
out
示例:
/point assimilation animation alpha out
配置
配置文件路径:
config/pointcontrol.json
配置示例:
{
"enableDeassimilationWhenNoPlayers": true,
"deassimilationPeriod": 6
}
enableDeassimilationWhenNoPlayers
如果启用,当区域内没有玩家时,占领进度会缓慢下降。
deassimilationPeriod
控制占领进度衰减的速度。
数值越低 = 衰减越快。
HUD
当存在据点时,玩家屏幕上会显示占领 HUD。
HUD 显示内容包括:
队伍支持
该模组使用 Minecraft 记分板队伍。
示例:
/team add red
/team add blue
玩家必须加入队伍,占领逻辑才能正常工作。
开发者 API
PointControl 提供了简单的事件接口以便进行模组集成。
事件
PointCaptureEvent
PointCapturedTickEvent
PointLostEvent
使用示例:
EventManager.POINT_CAPTURE.add(event -> {
Point point = event.getPoint();
Team team = event.getTeam();
});
PointControl
A lightweight Forge mod that adds capture points to Minecraft.
Players can fight for control of areas, and teams can capture and hold points to gain dominance.
Perfect for:
- PvP servers
- mini-games
- faction battles
- territory control systems
- adventure maps
Points can be created anywhere and will automatically track nearby players and determine which team controls the area.
Features
- Create capture points anywhere in the world
- Automatic team dominance detection
- Configurable capture duration
- Customizable capture animations
- Client HUD showing point status
- Persistent points saved with the world
- Event API for other mods
How It Works
A Point is a area in the world.
Players inside the area contribute to their team's dominance.
If one team has more players inside the area than others:
- The point starts assimilating
- Progress increases until capture duration is reached
- The team becomes the owner of the point
If another team enters the area:
- capture progress can decrease
- the point can become contested
- the point can be lost
Commands
All commands require operator.
Create a Point
Creates a new capture point at the player's position.
/point create <id> <radius>
Example:
/point create alpha 10
Creates a point with:
- id:
alpha
- radius:
10 blocks
Remove a Point
Deletes an existing point.
/point remove <id>
Example:
/point remove alpha
List Points
Displays all existing points.
/point list
Example output:
Points: alpha, bravo, charlie
Change Capture Duration
Sets how long it takes to capture a point.
/point assimilation duration <id> <ticks>
Example:
/point assimilation duration alpha 60
Default value:
30 ticks
Higher values make capturing slower.
Change Capture Animation
Sets the animation used in the HUD.
/point assimilation animation <id> <animation>
Available animations:
up
down
in
out
Example:
/point assimilation animation alpha out
Configuration
Config file:
config/pointcontrol.json
Example configuration:
{
"enableDeassimilationWhenNoPlayers": true,
"deassimilationPeriod": 6
}
enableDeassimilationWhenNoPlayers
If enabled, capture progress will slowly decrease when no players are present.
deassimilationPeriod
Controls how quickly capture progress decays.
Lower values = faster decay.
HUD
When points exist, players will see a capture HUD on the screen.
The HUD displays:
- point identifier
- capture progress
- controlling team color
- capture animation
Team Support
The mod uses Minecraft scoreboard teams.
Example:
/team add red
/team add blue
Players must belong to teams for capture logic to work.
Developer API
PointControl provides simple events for mod integration.
Events
PointCaptureEvent
PointCapturedTickEvent
PointLostEvent
Example usage:
EventManager.POINT_CAPTURE.add(event -> {
Point point = event.getPoint();
Team team = event.getTeam();
});
评论 0
登录后参与评分
还没有评论,来抢沙发吧