Universal Graves
这是一个简单但高度可定制的墓碑/死亡箱子模组!
你可以通过修改消息、方块和全息文本的内容,以及设置保护时长、过期后是否掉落物品等选项来自定义其行为。
此模组可以在纯服务端环境中运行!
本模组仅适用于 Fabric 和 Quilt!
如果你有任何问题,欢迎在 Discord 上提问。
也可以查看我的其他模组和项目,或许对你有用!
正在使用 2.x/1.19.x 或更早版本?
点击此处查看正确的说明文档!
图片
命令(及权限):
/graves - 主命令,显示玩家墓地的列表(权限 universal_graves.list,默认开放)
/graves player <player> - 打开包含选定玩家墓地列表的 GUI(权限 universal_graves.list_others)
/graves modify <player> - 打开包含执行者墓地列表的 GUI,并允许对其进行修改(权限 universal_graves.modify)
/graves reload - 重新加载配置文件和样式(需要权限 universal_graves.reload)
此外,拥有 universal_graves.teleport 权限的玩家还可以传送至任意墓地。
配置:
你可以在 ./config/universal-graves/config.json 中找到主配置文件。
格式说明使用了简化文本系统,相关文档请见此处。
此外,每种消息类型都有几个特定的本地变量,你可以将其作为 ${variable} 输入。
大多数与墓地相关的消息支持以下变量:player、protection_time、break_time、xp、
item_count、position、world、death_cause、minecraft_day、creation_date、since_creation、
id。
还有几种其他数据类型:
{/* PREDICATE */} - 使用谓词格式,所有支持的谓词请参阅此处。
{/* COST */} - 指定费用的格式。
{
// 费用类型。支持 "free"、"creative"、"item" 和 "level"
"type": "",
// 仅用于 "item" 类型,描述物品堆栈
"input": {/* ITEMSTACK */},
// 费用数量。
"count": 0
}
{/* ITEMSTACK */} - 表示一个物品。
简单格式:"minecraft:skeleton_skull"
完整格式
{
"id": "minecraft:skeleton_skull",
"Count": 1,
// 可选的 NBT 数据,
"tag": {}
}
{
// 配置版本。除非你愿意承担数据损坏的风险,否则不要修改它!
"config_version": 3,
"protection": {
// 坟墓对其他玩家的保护时间。设置为 -1 表示无限期保护。单位为秒
"non_owner_protection_time": 900,
// 坟墓在多久后自动销毁。设置为 -1 以禁用此功能。单位为秒
"self_destruction_time": 1800,
// 使坟墓在过期/自毁后掉落物品
"drop_items_on_expiration": true,
// 允许攻击者访问坟墓,这在面向 PvP 的服务器上很有用。
"attackers_bypass_protection": false,
// 使坟墓使用真实时间而非仅在世界/服务器运行时才进行计时。
"use_real_time": false
},
"interactions": {
// 死后访问坟墓的费用,
"unlocking_cost": { /* COST */ },
// 启用给予死亡指南针,指向玩家的坟墓。
"give_death_compass": true,
// 使点击坟墓打开用户界面 (GUI)。
"enable_click_to_open_gui": true,
// 启用通过潜行并手持空手点击坟墓来快速拾取物品。
"shift_and_use_quick_pickup": true,
// 允许玩家远程移除坟墓的保护。
"allow_remote_protection_removal": true,
// 允许玩家远程破坏坟墓。
"allow_remote_breaking": true,
// 允许玩家远程支付解锁坟墓的费用。
"allow_remote_unlocking": false
},
"storage": {
// 选择存储多少经验值。
// 可用类型:"none"(无)、"vanilla"(原版)、"drop"(掉落)、"percent_point"(百分比点数)、"percent_level"(百分比等级)
"experience_type": "percent_points",
// 对于 "percent_X" 类型,存储的百分比数量
"experience_percent:setting_value": 100.0,
// 允许创建仅包含 XP 的坟墓
"can_store_only_xp": false,
// 启用使用替代的经验球实体,以防止与某些模组发生经验值重复利用漏洞。
"alternative_experience_entity": false,
// 阻止附魔物品被添加到坟墓中。
"blocked_enchantments": [
"somemod:soulbound"
]
},
"placement": {
// 限制每个玩家的坟墓数量。-1 表示无限制
"player_grave_limit": -1,
// 允许坟墓替换任何方块
"replace_any_block": false,
// 用于搜索空闲位置的最大距离范围(相对于起始位置)。
"max_distance_from_source_location": 8,
// 允许在失败时移动起始位置
"shift_location_on_failure": true,
// 允许的最大位移尝试次数。
"max_shift_tries": 5,
// 用于位移的距离。
"max_shift_distance": 40,
// 使坟墓生成在流体上方而不是流体内部。
"generate_on_top_of_fluids": false,
// 使破损的坟墓恢复被替换的方块。
"restore_replaced_block": false,
// 使玩家在破坏破损坟墓后,恢复被替换的方块。
"restore_replaced_block_after_player_breaking": true,
// 不生成坟墓的伤害类型。
"cancel_creation_for_damage_types": {
"minecraft:fire": "... 自定义消息或留空"
},
// 防止生成坟墓的攻击者实体类型。
"cancel_creation_for_ignored_attacker_types": {
"minecraft:player": "... 自定义消息或留空"
},
// 阻止生成坟墓的条件谓词
"blocking_predicates": [{/* PREDICATE */}],
// 阻止在模组化的领地保护区域内生成坟墓。
"block_in_protected_area": {
"goml:claim_protection": true
},
// 阻止在整个世界中生成坟墓。
"blacklisted_worlds": [
"dungeons:world"
],
// 阻止在特定区域生成坟墓。
"blacklisted_areas": {
"minecraft:overworld": [
{
"x1": -100,
"y1": -200,
"z1": -100,
"x2": 100,
"y2": 500,
"z2": 100,
}
]
},
// 默认的坟墓生成失败消息。
"creation_default_failure_text": "...",
// 领地范围内的坟墓生成失败消息。
"creation_claim_failure_text": "..."
},
"teleportation": {
// 传送费用
"cost": {/* COST */},
// 最终确定传送前所需的时间。
"required_time": 5,
// 相对于坟墓位置的 Y 轴偏移量。
"y_offset": 1.0,
// 玩家无敌状态持续的时间。
"invincibility_time": 2,
// 允许玩家在等待期间移动。
"allow_movement_while_waiting": false,
// 发送给玩家的消息
"text": {
"timer": "...",
"timer_allow_moving": "...",
"location": "...",
"canceled": "..."
}
},
"model": {
// 默认模型文件名
"default": "default",
// 获取坟墓模型的替代方案。
"alternative": [
{
"require": {/* PREDICATE */},
"model": "model_name"
}
],
// 启用针对 Geyser 玩家的变通方案,使其坟墓对他们来说看起来像头颅。
"enable_geyser_workaround": true,
// 视觉/容器坟墓的基础物品。
"gravestone_item_base": "minecraft:skeleton_skull",
// 添加到物品中的 NBT 数据。
"gravestone_item_nbt": {}
},
"ui": {/* UI 定义,可修改文本,*/},
"text": {
// 占位符中使用的日期格式。使用 https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
"date_format": "dd.MM.yyyy, HH:mm",
// 世界名称的重写。
"world_names": {
"custom:world": "Custom World!"
}
}
}
坟墓模型
待办:完成本节内容。
坟墓模型存储在 config/universal-graves/models/ 目录下。默认情况下,应该有一个 example.json 文件,它是默认样式的副本。
要覆盖默认的坟墓样式,复制该文件并将其重命名为 default.json 或配置中指定的其他名称,然后定义其样式。
你也可以使用不同的名称和替代方案,以创建随机/独特的模型。
Universal Graves
It's a simple, but really customisable grave/death chest mod!
You can customise as you like, by modifying message, blocks and hologram texts, how long it will be protected,
if should drop items after expiring and alike.
This mod can work purely on servers!
This mod works only on Fabric and Quilt!
If you have any questions, you can ask them on my Discord
Also check out my other mods and project, as you might find them useful!
Using 2.x/1.19.x or older?
Click here to view correct readme!
Images
Commands (and permissions):
/graves - Main command, shows list of player's graves (universal_graves.list, available by default)
/graves player <player> - Opens gui with list of selected player's graves (universal_graves.list_others)
/graves modify <player> - Opens gui with list of executor's graves with ability to modify them (universal_graves.modify)
/graves reload - Reloads configuration and styles (requires universal_graves.reload)
Additionally, by having universal_graves.teleport permission, you can teleport to any grave.
Configuration:
You can find main config file in ./config/universal-graves/config.json.
Formatting uses Simplified Text for which docs you can find here.
Additionally, every message type has few own local variables, which you type as ${variable}.
Most grave specific messages support these variables: player, protection_time, break_time, xp,
item_count, position, world, death_cause, minecraft_day, creation_date, since_creation,
id.
There are few other data types:
{/* PREDICATE */} - Uses predicate format, see here for all supported ones.
{/* COST */} - Format for specifying cost.
{
// Type of cost. Supports, "free", "creative", "item" and "level"
"type": "",
// Only used for "item", describes Item Stack
"input": {/* ITEMSTACK */},
// Amount of cost.
"count": 0
}
{/* ITEMSTACK */} - represents an item.
Simple format: "minecraft:skeleton_skull"
Full format
{
"id": "minecraft:skeleton_skull",
"Count": 1,
// Optional nbt,
"tag": {}
}
{
// Config version. Never modify it unless you want to risk data corruption!
"config_version": 3,
"protection": {
// Time grave is protected against other players. Set to -1 to make it infinite. In seconds
"non_owner_protection_time": 900,
// Time after which grave destroys itself. Set to -1 to disable it. In seconds
"self_destruction_time": 1800,
// Makes grave drop items after it expires/self destructs
"drop_items_on_expiration": true,
// Allows attackers to access graves, useful in case of pvp oriented servers.
"attackers_bypass_protection": false,
// Makes grave use real time instead of only progressing when world/server is running.
"use_real_time": false
},
"interactions": {
// Cost for accessing grave after death,
"unlocking_cost": { /* COST */ },
// Enables giving death compass, which points to player's grave.
"give_death_compass": true,
// Makes clicking grave open an ui.
"enable_click_to_open_gui": true,
// Enables quick pickup by shifting and clicking grave with empty hand.
"shift_and_use_quick_pickup": true,
// Allows players to remotely remove protection form grave.
"allow_remote_protection_removal": true,
// Allows players to remotely break grave.
"allow_remote_breaking": true,
// Allows players to remotely pay cost of unlocking the grave.
"allow_remote_unlocking": false
},
"storage": {
// Selects how much of experience is stored.
// Available types: "none", "vanilla", "drop", "percent_point", "percent_level"
"experience_type": "percent_points",
// Amount of percent stored for "percent_X" types
"experience_percent:setting_value": 100.0,
// Allows to create graves with only XP
"can_store_only_xp": false,
// Enables usage of alternative experience orb entity, to prevent XP duplication with some mods.
"alternative_experience_entity": false,
// Blocks items with enchantments from being added to grave.
"blocked_enchantments": [
"somemod:soulbound"
]
},
"placement": {
// Limits grave count per player. -1 is unlimited
"player_grave_limit": -1,
// Allows grave to replace any block
"replace_any_block": false,
// Max distance around starting position used for search of free spot.
"max_distance_from_source_location": 8,
// Allows shifting starting position on failure
"shift_location_on_failure": true,
// Max amount of shifts allowed.
"max_shift_tries": 5,
// Distance used for shifting.
"max_shift_distance": 40,
// Makes grave generate on top of fluids instead of within them.
"generate_on_top_of_fluids": false,
// Makes broken graves restore replaced block.
"restore_replaced_block": false,
// Makes broken graves restore replaced block after player breaks them.
"restore_replaced_block_after_player_breaking": true,
// Damage types that don't generate graves.
"cancel_creation_for_damage_types": {
"minecraft:fire": "... custom message or empty"
},
// Attacker's entity types preventing grave creation.
"cancel_creation_for_ignored_attacker_types": {
"minecraft:player": "... custom message or empty"
},
// Predicates blocking creation of graves
"blocking_predicates": [{/* PREDICATE */}],
// Blocks creation of graves in modded claim areas.
"block_in_protected_area": {
"goml:claim_protection": true
},
// Blocks creation of graves in entire worlds.
"blacklisted_worlds": [
"dungeons:world"
],
// Blocks creation of graves in areas.
"blacklisted_areas": {
"minecraft:overworld": [
{
"x1": -100,
"y1": -200,
"z1": -100,
"x2": 100,
"y2": 500,
"z2": 100,
}
]
},
// Default grave creation failure message.
"creation_default_failure_text": "...",
// Grave creation failure in claim message.
"creation_claim_failure_text": "..."
},
"teleportation": {
// Teleportation cost
"cost": {/* COST */},
// Time before finalizing teleportation.
"required_time": 5,
// Y offset from grave location.
"y_offset": 1.0,
// Time for which player is invincible.
"invincibility_time": 2,
// Allows player to move while waiting.
"allow_movement_while_waiting": false,
// Messages send to player
"text": {
"timer": "...",
"timer_allow_moving": "...",
"location": "...",
"canceled": "..."
}
},
"model": {
// Default model file name
"default": "default",
// Alternatives for getting grave model.
"alternative": [
{
"require": {/* PREDICATE */},
"model": "model_name"
}
],
// Enables workaround for geyser players, making graves look like skulls for them.
"enable_geyser_workaround": true,
// Base item fro visual/container grave.
"gravestone_item_base": "minecraft:skeleton_skull",
// NBT added to the item.
"gravestone_item_nbt": {}
},
"ui": {/* UI DEFINITIONS, modify text, */},
"text": {
// Date format used in placeholders. Uses https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html
"date_format": "dd.MM.yyyy, HH:mm",
// Overrides for world names.
"world_names": {
"custom:world": "Custom World!"
}
}
}
Grave models
Todo: Finish this section.
Grave models are stored in config/universal-graves/models/. By default, there should be example.json file, which is a copy of default style.
To override default grave style, copy that file and rename it to default.json or other name specified in config and define its style.
You can also use different name and alternatives, to make random/unique models.
评论 0
登录后参与评分
还没有评论,来抢沙发吧