任务属性 (Quest Properties)
基本信息
| 属性 | 值 |
|---|---|
| 定义位置 | betterquesting/api/properties/NativeProps.java |
| 生效数量 | 52 个 IPropertyType 字段(grep -cE '^\s+public static final IPropertyType<' 结果 52) |
| 命名空间 | 全部为 betterquesting:<field>,见 ResourceLocation 实参 |
| 注释掉的属性 | 1 个 —— FRAME(betterquesting:frame),整条被 // 注释,不注册、不生效(NativeProps.java:142-143) |
| 废弃但仍存在的属性 | 1 个 —— MAIN(betterquesting:isMain),带 @Deprecated 标注(NativeProps.java:29-32) |
功能
NativeProps 是 BetterQuesting 全部内置任务/任务线属性的单一事实来源。每个属性是一个 IPropertyType<T>,携带三样东西:ResourceLocation 唯一 ID、默认值,以及(在少数类型上)图标或本地化 key。属性值存在各处的 PropertyContainer 中(任务、任务线、世界设置各一个容器),因此属性 ID 是 NBT 存档的键。
NativeProps 是属性定义,不是赋值点。真正读取它们的地方分散在:
- 世界级设置
QuestSettings(13 个,见 世界任务设置) - 任务线级
QuestLine.setupProps()(4 个) - 任务级
QuestInstance与各任务/奖励实现 - 客户端
BQ_Settings(40 个配置项,见 客户端配置)
属性表
标识与描述
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:name |
String | "untitled.name"(本地化 key) |
betterquesting:desc |
String | "untitled.desc"(本地化 key) |
betterquesting:icon |
BigItemStack | Items.nether_star |
betterquesting:pack_name |
String | "" |
betterquesting:pack_version |
Integer | 0 |
可见性与逻辑
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:visibility |
EnumQuestVisibility |
NORMAL |
betterquesting:taskLogic |
EnumLogic |
AND |
betterquesting:questLogic |
EnumLogic |
AND |
betterquesting:isGlobal |
Boolean | false |
betterquesting:globalShare |
Boolean | false |
betterquesting:isSilent |
Boolean | false |
betterquesting:autoClaim |
Boolean | false |
betterquesting:lockedProgress |
Boolean | false |
betterquesting:simultaneous |
Boolean | false |
betterquesting:countAsQuest |
Boolean | true(唯一一个默认 true 的布尔) |
betterquesting:isMain |
Boolean | false —— @Deprecated(NativeProps.java:29-32) |
重复
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:repeatTime |
Integer | -1(负数 = 不重复) |
betterquesting:repeat_relative |
Boolean | true |
音效与完成表现
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:snd_unlock |
String | "random.click" |
betterquesting:snd_update |
String | "random.levelup" |
betterquesting:snd_complete |
String | "random.levelup" |
betterquesting:completion_particle |
String | "default" |
betterquesting:completion_animation |
String | "default" |
betterquesting:confetti_icon |
BigItemStack | Items.stick meta 0 |
betterquesting:particle_count |
Integer | -1(沿用玩家设置) |
逐任务通知覆写
源码注释写明:字符串 "default" / 数值 -1 / Integer.MIN_VALUE 表示"回落到玩家个人设置"(NativeProps.java:99)。
| 属性 ID | 类型 | 默认值 | 含义 |
|---|---|---|---|
betterquesting:notification_style |
String | "default" |
覆盖 任务通知 的样式 |
betterquesting:notification_show_icon |
String | "default" |
覆写是否显示图标 |
betterquesting:notification_title |
String | "" |
覆写标题文本 |
betterquesting:notification_subtitle |
String | "" |
覆写副标题文本 |
betterquesting:notification_duration |
Float | -1f |
覆写显示时长(秒) |
betterquesting:notification_fade_in |
Float | -1f |
覆写淡入(秒) |
betterquesting:notification_fade_out |
Float | -1f |
覆写淡出(秒) |
betterquesting:notification_title_scale |
Float | -1f |
覆写标题缩放 |
betterquesting:notification_subtitle_scale |
Float | -1f |
覆写副标题缩放 |
betterquesting:notification_icon_scale |
Float | -1f |
覆写图标缩放 |
betterquesting:notification_icon_offset_y |
Integer | Integer.MIN_VALUE |
覆写图标 Y 偏移 |
betterquesting:notification_pos_x |
Integer | Integer.MIN_VALUE |
覆写水平位置 |
betterquesting:notification_pos_y |
Integer | Integer.MIN_VALUE |
覆写垂直位置 |
betterquesting:notification_effect |
Integer | -1 |
覆写特效档位 |
背景图
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:bg_image |
String | "" |
betterquesting:bg_size |
Integer | 256 |
队伍
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:party_enable |
Boolean | true |
硬核与生命
| 属性 ID | 类型 | 默认值 | 说明 |
|---|---|---|---|
betterquesting:hardcore |
Boolean | false |
死亡扣命开关 |
betterquesting:editMode |
Boolean | true |
允许 OP 编辑;为真时 观测站 完全停摆 |
betterquesting:lives |
Integer | 1 |
当前生命(世界级容器中) |
betterquesting:livesDef |
Integer | 3 |
新玩家初始生命(LifeDatabase.getLives 的 computeIfAbsent 回退值) |
betterquesting:livesMax |
Integer | 10 |
生命上限(LifeDatabase.setLives 的 clamp_int 上界) |
主界面
| 属性 ID | 类型 | 默认值 |
|---|---|---|
betterquesting:home_image |
String | "betterquesting:textures/gui/default_title.png" |
betterquesting:home_anchor_x |
Float | 0.5F |
betterquesting:home_anchor_y |
Float | 0F |
betterquesting:home_offset_x |
Integer | -128 |
betterquesting:home_offset_y |
Integer | 0 |
数值
| 数值名 | 值 |
|---|---|
| 生效属性总数 | 52 |
| 被注释掉的属性 | 1(FRAME) |
标 @Deprecated 的属性 |
1(MAIN) |
默认值为 true 的布尔属性 |
1(countAsQuest) |
| 「回落到玩家设置」语义的整数哨兵 | Integer.MIN_VALUE(notification_icon_offset_y / notification_pos_x / notification_pos_y) |