玩家负重
Player Weight 是一款 Fabric 模组,为所有物品添加了重量值,并支持配置在超出重量阈值时施加惩罚。
服务器端必须安装 Player Weight,客户端可选。
配置
Player Weight 基于配置文件驱动;你可以使用配置文件更改模组的所有(合理)方面。
例如,你可以通过向配置中添加条目,使名称中包含“dirt”的所有物品完全无重量。
配置文件支持 ModMenu,允许在游戏内修改,同时也更加用户友好。
默认情况下,配置文件会将一些明显物品的重量调整为预设值,以节省你设置模组的时间,但如果你愿意,也可以移除这些预设值。
以下是防止空气为用户背包增加重量的配置条目示例:
{
"text": "Air",
"modifier": 0.0,
"type": "PLAIN"
}
注意:将配置中的 weightModifiersAreMultiplicative 布尔值设置为 false 不会阻止此条目的重量被设为零。
每个配置条目包含三个字段:
text:模组将使用此文本来判断给定物品是否应调整其重量。
modifier:默认情况下,该值会将物品的重量乘以这个数值。但如果 weightModifiersAreMultiplicative 为 false,则该值会直接加到物品的重量上。
type:指定模组应如何使用 text 字段来检查物品是否符合修饰符条件。它有四个可能的值:PLAIN(模组仅检查 text 是否包含在物品 ID 中)、REGEX(模组将 text 编译为正则表达式,并检查物品 ID 是否匹配)、ITEM(模组精确检查物品 ID 是否与 text 完全一致),以及 TAG(检查物品是否包含在指定的标签中)。
例如,如果我希望只有 another_mod:sludgeball 的重量变为正常值的十分之一,我会创建如下条目:
{
"text": "another_mod:sludgeball",
"modifier": 0.1,
"type": "ITEM"
}
weightPunishments 是配置文件内的另一个条目列表。
惩罚条目类似于以下内容:
{
"type": "SPEED",
"value": 0.9,
"begin": 0.8,
"scaleWithWeight": true
}
此条目设定当玩家负重超过最大负重的 80% 时,其速度降至原始速度的 90%。scaleWithWeight 的布尔值决定了随着玩家负重增加,效果会逐渐增强。
Player Weight
Player Weight is a Minecraft fabric mod that adds weight values to all items, along with configurable penalties for breaching weight thresholds.
Player Weight is required on the server, and optionally the client.
Configuration
Player Weight is config-driven; you can change all (reasonable) aspects of the mod using the config.
For example, you could make every item with 'dirt' in its name completely weightless, by adding an entry to the config.
The config has support for ModMenu, allowing in-game modification as well as being more user-friendly.
By default, the config adjusts the weight of some obvious items to a predetermined value to save you time setting the mod up, however you are free to remove the preset values if you like.
Below is the config entry that prevents air from adding weight to the user's inventory.
{
"text": "Air",
"modifier": 0.0,
"type": "PLAIN"
}
Note: setting the weightModifiersAreMultiplicative true/false value in the config to false will not prevent this entry, specifically, from having its weight set to zero.
In each config entry, there are three fields:
text: This is the text that the mod will use to determine if a given item should have its weight modified
modifier: By default, this value will multiply an item's weight by this amount. However, should weightModifiersAreMultiplicative be false, this will add to the item's weight instead
type: This specifies how the mod should use the text field in checking if an item is valid for the modifier. It has four possible values: PLAIN, where the mod will simply check if text is contained within the item's ID, REGEX, where the mod will compile text as a regular expression and check if the item's ID matches, ITEM, where the mod will check if the item's ID matches text exactly, and finally, TAG, where it will check if an item is contained within a given tag.
For example, if I wanted only another_mod:sludgeball to have 1/10th of the weight it normally would, I would create an entry like this:
{
"text": "another_mod:sludgeball",
"modifier": 0.1,
"type": "ITEM"
}
weightPunishments is another list of entries inside the config file.
A punishment entry looks something like this:
{
"type": "SPEED",
"value": 0.9,
"begin": 0.8,
"scaleWithWeight": true
}
This entry sets a player's speed to 90% of their original speed when their weight exceeds 80% of their maximum. The scaleWithWeight true/false value makes the effect become more and more pronounced the more weight the player tacks on.
评论 0
登录后参与评分
还没有评论,来抢沙发吧