Big Salmon
Big Salmon 是一款模组,提供高度可定制的鲑鱼生成尺寸,并支持为大型鲑鱼自定义战利品表。默认设置及随附的数据包实现了与《Minecraft:基岩版》中鲑鱼尺寸和鲑鱼战利品表的兼容。
功能
- 鲑鱼会按照模组配置文件中设定的权重随机生成不同尺寸。
- 对于尺寸大于或等于模配置文件中定义的大型鲑鱼阈值的鲑鱼,添加
Big:1b NBT 标签;对于小于上述阈值的鲑鱼,添加 Big:0b NBT 标签。
- 默认配置实现了与《Minecraft:基岩版》鲑鱼尺寸的兼容。
- 默认鲑鱼尺寸及其概率权重如下:
- 小型鲑鱼(尺寸为 0.35714)(宽 0.25 格),概率为 31.5%(权重 315)。
- 中型鲑鱼(尺寸为 0.71428)(宽 0.5 格),概率为 52.6%(权重 526)。
- 大型鲑鱼(尺寸为 1.07142)(宽 0.75 格),概率为 15.7%(权重 157)。
- 随附的数据包实现了与《Minecraft:基岩版》鲑鱼战利品表的兼容。
- 鲑鱼有 25% 的几率掉落骨头。
- 小型和中型鲑鱼最多掉落 1 根骨头。
- 大型鲑鱼最多掉落 2 根骨头。
- 鲑鱼不会掉落骨粉。
- 使用水桶拾取鲑鱼或使用装有鲑鱼的水桶放置时,鲑鱼会保留其原有尺寸。
- 可通过配置 GUI 实时修改模组配置(需要 Mod Menu)。
- 满足服务器模组配置中设定权限要求的客户端可以修改服务器端的模组配置。
- 此模组可仅在服务器上运行(安装了此模组的服务器不需要在客户端安装此模组)。
支持平台
Big Salmon 目前适用于 Minecraft:Java Edition 1.21 至 1.21.1 版本的 Fabric。
安装
前置条件
获取 Big Salmon 模组文件 .jar
安装 Big Salmon 模组文件
获得 Big Salmon 模组文件 .jar 后,将其移动到您 Fabric Loader 安装文件夹中的 mods 文件夹内。
有关安装 Fabric 模组的更多信息,请参阅这些 Fabric Player Guides。
配置
配置 GUI(需要 Mod Menu)
如果安装了 Mod Menu 模组,可以通过 主菜单或游戏菜单 > 模组 > Big Salmon > Configure... 访问配置界面。如果连接到服务器(局域网或专用服务器),能否通过配置界面修改配置的权限可能会受到服务器配置的约束。
如果从配置界面修改配置,更改会立即应用并保存到配置文件中(无需重启 Minecraft 客户端或服务器)。
配置文件
配置文件应以文件名 bigsalmon.json 存储在 Minecraft 安装目录或服务器文件夹中的 config 文件夹内。要从配置文件重新加载配置,需要重启 Minecraft 客户端或服务器。
如果配置文件不存在,模组将回退到默认配置。
默认配置
bigsalmon.json
{
"enabled": false,
"customizer_client": "op",
"any_client_can_read_config": false,
"big_salmon_size_threshold": 1.07142,
"size_weights": [
{
"size": 0.35714,
"weight": 315
},
{
"size": 0.71428,
"weight": 526
},
{
"size": 1.07142,
"weight": 157
}
]
}
配置项说明
如果缺少任何这些成员(不包括 size_weight 元素),模组将使用该成员的默认值。
enabled (true 或 false):是否启用模组(鲑鱼将以随机尺寸生成,并被赋予相应的 Big:0b 或 Big:1b NBT 标签)。
customizer_client ("none"、"op" 或 "none"):当模组在服务器上运行时(局域网或专用服务器),分别表示是否允许任何人、仅等级为 4 的运算符、或禁止任何人修改配置。
any_client_can_read_config (true 或 false):当模组在服务器上运行时(局域网或专用服务器),无论根据 customizer_client 是否具有权限,是否允许任何人查看配置。
big_salmon_size_threshold(取值范围为 0.0625 到 16.0(包含两端),且大于或等于 size_weights 中某个 size 的值):尺寸达到此阈值或更大的鲑鱼将被赋予 Big:1b NBT 标签,否则将被赋予 Big:0b NBT 标签。
size_weights(由包含 size(取值范围 0.0625 到 16.0)和 weight(至少为 1)的成员组成的数组):一个包含鲑鱼尺寸(标量值,用于指示相对于其默认高度 0.4 格和宽度 0.7 格的缩放比例)及其关联概率权重的数组。
修改鲑鱼战利品表
要修改鲑鱼的战利品表,必须在 fabric 数据包之后加载另一个包含自定义鲑鱼战利品表的数据包。要在 fabric 数据包之后加载数据包,请运行 /datapack enable <数据包名称> after fabric。有关创建数据包和战利品表的信息,请参阅 Minecraft Wiki 的 数据包 和 战利品表 页面。
在战利品表中使用 Big NBT 标签
要在战利品表中使用自定义的 Big NBT,需要在战利品表池条目中添加一个带有 nbt 谓词 {Big:<big value>b} 的 minecraft:entity_properties 条件。有关战利品表的更多信息,请参阅 Minecraft Wiki 的 战利品表 页面。如需示例实现,请参见 此模组对 Minecraft: Bedrock Edition 鲑鱼战利品表的实现。
还原鲑鱼战利品表更改
要将鲑鱼战利品表的更改还原至原版 Minecraft: Java Edition 的鲑鱼战利品表,请运行:
/datapack disable vanilla
/datapack enable vanilla after fabric
警告: 这还将还原由任何其他当前安装的 Fabric 模组对原版内容所做的资源更改。如果安装了其他 Fabric 模组,请参阅如何 修改鲑鱼战利品表。
许可证
Big Salmon 采用 GNU LGPLv3 许可。
免责声明
非官方 Minecraft 产品。未经 Mojang 或微软批准或认可。
Big Salmon
Big Salmon is a mod that provides highly customizable salmon spawning sizes with support for custom loot table for big salmon. The default settings and included datapack provide parity with Minecraft: Bedrock Edition salmon sizes and salmon loot table.
Features
- Salmon spawn with a weighted random size determined by the mod config.
- Adds the
Big:1b NBT tag to salmon of size greater than or equal to the big salmon size threshold defined in the mod config. Adds the Big:0b NBT tag to salmon of size smaller than the aforementioned threshold.
- The default config provides parity with Minecraft: Bedrock Edition salmon sizes.
- The default salmon sizes and the sizes' probability weights are:
- Small salmon (size of 0.35714) (0.25 blocks wide) with a probability of 31.5% (weight of 315).
- Medium salmon (size of 0.71428) (0.5 blocks wide) with a probability of 52.6% (weight of 526).
- Big salmon (size of 1.07142) (0.75 blocks wide) with a probability of 15.7% (weight of 157).
- The included datapack provides parity with Minecraft: Bedrock Edition salmon loot table.
- Salmon have a 25% chance of dropping bones.
- Small and medium salmon drop at most 1 bone.
- Big salmon drop at most 2 bones.
- Salmon do not drop bonemeal.
- Salmon retain their sizes when picked up with a water bucket and when placed down with a bucket of salmon
- Mod config may be modified in realtime using the config GUI (requires Mod Menu).
- Server mod config may be modified by clients who meet permission requirements set in the server mod config.
- This mod may be run solely on the server (client-side installation of this mod is not required on servers with this mod installed).
Supported Platforms
Big Salmon is currently available for Fabric on Minecraft: Java Edition version 1.21 to 1.21.1.
Installation
Prerequisites
Obtaining the Big Salmon mod file .jar
- Download the Big Salmon mod file
.jar from Modrinth.
Installing the Big Salmon mod file
Once you have the Big Salmon mod file .jar, move it into the mods folder in your Fabric Loader installation folder.
For more information on installing Fabric mods, check out these Fabric Player Guides.
Configuration
Config GUI (requires Mod Menu)
If the Mod Menu mod is installed, the config GUI may be accessed through Main Menu or Game Menu > Mods > Big Salmon > Configure.... If connected to a server (LAN or dedicated), permission to modify the config from the config GUI may be limited depending on the server config.
Changes are applied and saved to the config file immediately if the config is modified from the config GUI (the Minecraft client or server does not need to be restarted).
Config file
The config file should be stored with the filename bigsalmon.json in the folder config in the Minecraft installation or server folder. To reload the config from the config file, the Minecraft client or server needs to be restarted.
If the config file is not present, the mod will revert to the default config.
Default config
bigsalmon.json
{
"enabled": false,
"customizer_client": "op",
"any_client_can_read_config": false,
"big_salmon_size_threshold": 1.07142,
"size_weights": [
{
"size": 0.35714,
"weight": 315
},
{
"size": 0.71428,
"weight": 526
},
{
"size": 1.07142,
"weight": 157
}
]
}
Config members
If any of these members (excluding size_weight elements) are missing, the mod will use the default value for that member.
enabled (true or false): whether the mod is enabled (salmon spawn with random sizes and are given their respective Big:0b or Big:1b NBT tags).
customizer_client ("none", "op", or "none"): when the mod is running on a server (LAN or dedicated), whether anyone, only level 4 operators, or nobody respectively, may modify the config.
any_client_can_read_config (true or false): when the mod is running on a server (LAN or dedicated), whether anyone may view the config regardless of if they have permission to do so according to customizer_client.
big_salmon_size_threshold (0.0625 to 16.0 (inclusive) and greater than or equal to one of the size values in size_weights): salmon of this size or greater are given the Big:1b NBT tag, otherwise they are given the Big:0b NBT tag.
size_weights (array of elements with members size (0.0625 to 16.0) and weight (at least 1)): an array of salmon sizes (scalar values indicating how much to scale the size of salmon from their default size of 0.4 blocks tall and 0.7 block wide) with their associated probability weights.
Modifying the salmon loot table
To modify the salmon loot table, another datapack with a custom salmon loot table must be loaded after the fabric datapack. To load a datapack after the fabric datapack, run /datapack enable <datapack name> after fabric. For information on creating datapacks and loot tables, see the Minecraft Wiki's Data pack and Loot table pages.
Using the Big NBT tag in a loot table
To use the custom Big NBT in a loot table, a minecraft:entity_properties condition with an nbt predicate of {Big:<big value>b} must be added to a loot table pool entry. For more information on loot tables, see the Minecraft Wiki's Loot table page. For an example implementation, see this mod's implementation of the Minecraft: Bedrock Edition salmon loot table.
Reverting the salmon loot table changes
To revert the salmon loot table changes to the vanilla Minecraft: Java Edition salmon loot table, run:
/datapack disable vanilla
/datapack enable vanilla after fabric
WARNING: This will also revert any resource changes to vanilla content made by any other currently installed Fabric mods. If any other Fabric mods are installed, see how to modify the salmon loot table instead.
License
Big Salmon is licensed under GNU LGPLv3.
Disclaimer
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.
评论 0
登录后参与评分
还没有评论,来抢沙发吧