在使用服务端模式时,客户端部分是可选的,默认情况下需要安装客户端部分。
服务端部分始终必需
Adventure Bags 是一款完全可定制的战利品袋模组,让你能够轻松为整合包生成战利品,或者如果你只是想在世界中获得更多战利品。只需右键点击即可获利,满足你内心对战利品的渴望。
主要功能
- 4 种稀有度等级
- 更改箱子中每个 Adventure Bags 的战利品生成概率
- 自由添加或移除袋子中的战利品
- 支持固定和随机数量,并支持 NBT/组件支持
- 轻松添加或移除其他战利品表
- 可制作成更高等级(仅限完整功能模式)
- 可以在纯 Vanilla 客户端下完全在服务端运行
服务端功能是如何工作的
非常简单,如果配置设置为在启动时加载为服务端模式,该模组将不会加载新物品(这通常会阻止 Vanilla 客户端加入),而是仅使用 Vanilla 物品(可配置),默认情况下这些是 4 种不同的染料。这些物品被添加到战利品表中以替代 Adventure Bags,但现在具有自定义模型数据和自定义名称,当使用该物品时会检查这些数据以确保它是真正的袋子而不是普通物品。因此,通过利用 Vanilla 功能而不添加新数据,允许模组完全在服务端运行。
内置战利品表
普通冒险袋
"2-16 minecraft:moss_block",
"16 minecraft:torch",
"minecraft:chest",
"1-8 minecraft:emerald",
"1-16 minecraft:coal",
"6-16 minecraft:arrow",
"1-4 minecraft:amethyst_shard",
"1-6 minecraft:raw_iron",
"1-6 minecraft:raw_copper",
"1-4 minecraft:raw_gold",
"minecraft:iron_shovel",
"minecraft:iron_helmet",
"minecraft:iron_boots",
"4-8 minecraft:cooked_porkchop",
"minecraft:bucket",
"16 minecraft:clay",
"12 minecraft:feather",
"6 minecraft:gunpowder",
"4-8 minecraft:bread",
"16 minecraft:string",
"6 minecraft:leather",
"2 minecraft:book",
"2-4 minecraft:bone",
"4-8 minecraft:cooked_cod",
"4-8 minecraft:cooked_salmon",
"2-6 minecraft:ink_sac",
"1-4 minecraft:cocoa_beans",
"minecraft:cake",
"4-16 minecraft:cookie",
"4-16 minecraft:melon_slice",
"2-12 minecraft:dried_kelp",
"4-8 minecraft:cooked_beef",
"4-8 minecraft:cooked_chicken",
"1-4 minecraft:experience_bottle",
"4-8 minecraft:baked_potato",
"4-8 minecraft:cooked_rabbit",
"minecraft:iron_horse_armor",
"minecraft:name_tag",
"minecraft:lead",
"4-8 minecraft:cooked_mutton"
稀有冒险袋
"minecraft:spore_blossom",
"minecraft:emerald_block",
"1-4 minecraft:hay_block",
"minecraft:saddle",
"2-6 minecraft:iron_ingot",
"2-6 minecraft:copper_ingot",
"1-4 minecraft:gold_ingot",
"minecraft:iron_chestplate",
"minecraft:iron_leggings",
"minecraft:iron_pickaxe",
"minecraft:iron_sword",
"minecraft:iron_hoe",
"minecraft:iron_axe",
"minecraft:golden_apple",
"1-4 minecraft:slime_ball",
"2-8 minecraft:glowstone_dust",
"1-3 minecraft:ender_pearl",
"1-3 minecraft:blaze_rod",
"1-3 minecraft:ghast_tear",
"1-3 minecraft:magma_cream",
"2-4 minecraft:pumpkin_pie",
"4-12 minecraft:firework_rocket",
"minecraft:golden_horse_armor",
"1-4 minecraft:chorus_fruit",
"minecraft:nautilus_shell",
"minecraft:brush"
史诗冒险袋
"minecraft:lapis_block",
"1-2 minecraft:diamond",
"minecraft:diamond_helmet",
"minecraft:diamond_boots",
"minecraft:diamond_axe",
"minecraft:diamond_shovel",
"minecraft:diamond_hoe",
"minecraft:enchanted_golden_apple",
"minecraft:blaze_spawn_egg",
"minecraft:cave_spider_spawn_egg",
"minecraft:creeper_spawn_egg",
"minecraft:drowned_spawn_egg",
"minecraft:enderman_spawn_egg",
"minecraft:endermite_spawn_egg",
"minecraft:skeleton_spawn_egg",
"minecraft:witch_spawn_egg",
"minecraft:wither_skeleton_spawn_egg",
"minecraft:zombie_spawn_egg",
"minecraft:dragon_head",
"minecraft:diamond_horse_armor",
"minecraft:heart_of_the_sea",
"1-3 minecraft:echo_shard",
"1-3 minecraft:frogspawn",
"1-6 minecraft:coal_ore",
"minecraft:diamond_ore",
"1-4 minecraft:redstone_ore",
"1-6 minecraft:gold_ore",
"1-8 minecraft:iron_ore",
"1-4 minecraft:lapis_ore",
"1-4 minecraft:emerald_ore"
传奇冒险袋
"minecraft:spawner",
"1-3 minecraft:netherite_scrap",
"minecraft:diamond_sword",
"minecraft:diamond_pickaxe",
"minecraft:diamond_chestplate",
"minecraft:diamond_leggings",
"minecraft:skeleton_skull",
"minecraft:wither_skeleton_skull",
"minecraft:player_head",
"minecraft:zombie_head",
"minecraft:creeper_head",
"minecraft:piglin_head",
"minecraft:nether_star",
"minecraft:end_crystal",
"minecraft:dragon_breath",
"minecraft:trident",
"minecraft:totem_of_undying",
"minecraft:budding_amethyst",
"minecraft:dragon_egg",
"minecraft:diamond_block",
"1-3 minecraft:iron_block",
"1-2 minecraft:gold_block",
"minecraft:netherite_ingot"
配置设置
配置设置相当简单,默认情况下,如果你只玩原版游戏,你不需要做太多工作。你可以直接使用默认设置,这将确保上述内置战利品表的正常使用。
然而,如果你正在制作整合包,你可能希望自定义它以包含来自其他模组的物品。这也相当简单。你可以使用 Mod Menu 集成(推荐)或直接编辑配置文件。要将新物品添加到袋子的战利品表中,你需要知道命名空间和物品 ID,例如 "minecraft:diamond_block" 就是来自 minecraft 的钻石块。
袋子战利品表
袋子战利品表支持以下格式 (minAmount)-(maxAmount) [namespace:item_id](NBT/Component),其中括号 () 中的内容是可选的,方括号 [] 中的内容是必需的(数量和组件是可选的,物品 ID 是必需的)。
从 v2.0.0 及更高版本开始,它使用自定义数据处理。你可以使用这个网站进行辅助配置。
对于低于 v2.0.0 的版本,你需要使用来自 1.20.4 的 NBT 格式,你可以使用 McStacker。网站上的 /give 选项会为你生成正确的数据。只需从输出中复制即可(仅复制物品之后的 NBT 数据。复制整个输出会导致无效条目)
示例:
minecraft:diamond_block
3 minecraft:diamond_block
1-8 minecraft:diamond_block
- 随机生成 1 到 8 个钻石块(包含 1 和 8)
- (v2.0.0+)
minecraft:diamond_sword{"name":"Shiny Blue Thing"}
- 一个名为 "Shiny Blue Thing" 的钻石剑
minecraft:diamond_block{display:{Name:'{"text":"Shiny Blue Thing"}'}}
- 一个名为 "Shiny Blue Thing" 的钻石块
战利品表生成
在战利品表中包含或排除用于生成袋子的战利品表也很简单。只需将战利品表路径放入列表中即可。战利品表必须位于 data/[namespace]/loot_table/ 文件夹中。例如 chests/simple_dungeon,它位于 data/minecraft/loot_table/chests/simple_dungeon.json。这也适用于任何模组的战利品表(不仅限于 chests 文件夹)。
袋子生成几率
你可以通过设置介于 1.0 和 0.0(0.00001)之间的值来改变袋子在战利品表中的稀有度。1.0 表示 100%,而 0.0 表示几乎不可能(或者尽可能接近但不完全将其从列表中移除)。默认情况下,普通为 0.8(80%),稀有为 0.4(40%),史诗为 0.15(15%),传说为 0.08(8%)。
服务端选项
上述大部分内容解释得很清楚,但也非常直接。切换到仅服务端模式将防止模组加载任何超出原版范围的自定义/额外数据,这通常会导致注册表问题。它将使用下面列出的物品作为冒险包,通过自定义名称和模型数据确保它们与默认的原版物品不同。如果提供的物品无效,则会回退到彩色染料。
即使输入错误,游戏仍能正常运行,它只会将无效输入的打印错误日志记录到 Log 文件中。如果你没有得到预期的结果,请检查那里。你可以在配置中使用调试模式(必须在文件中手动设置为 true)以获取更多信息。
配置示例
示例配置文件位于 config/adventure-loot.json5
{
"Debug": false,
"DefaultOptions": "Disabled",
"CommonChance": 0.8,
"RareChance": 0.4,
"EpicChance": 0.15,
"LegendaryChance": 0.08,
"CommonLoot": [
"minecraft:moss_block",
"12 minecraft:diamond",
"4-9 minecraft:gold_ingot ",
"minecraft:diamond_chestplate{display:{Name:'{\"text\":\"fancy chestplate\"}'},Enchantments:[{id:\"minecraft:protection\",lvl:69s}]}",
"minecraft:chest{BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:cake\",Count:1b,tag:{display:{Name:'{\"text\":\"Hoef\\'s Favourite\",\"color\":\"white\",\"bold\":true}',Lore:['{\"text\":\"Just a little squashed\",\"color\":\"light_purple\",\"italic\":true}']}}}],Lock:\"Flight Licence\"}}"
],
"RareLoot": [
"40 minecraft:iron_ingot"
],
"EpicLoot": [
"9-64 minecraft:diamond"
],
"LegendaryLoot": [
"minecraft:diamond_chestplate"
],
"TablesToExclude": [
"chests/simple_dungeon",
"chests/village/village_mason"
],
"TablesToAdd": [
"entities/cow"
],
"ServerSideOnly": false,
"ServerSideCommonItem": "minecraft:white_dye",
"ServerSideRareItem": "minecraft:blue_dye",
"ServerSideEpicItem": "minecraft:red_dye",
"ServerSideLegendaryItem": "minecraft:purple_dye"
}
欢迎在其他整合包中使用此模组,但请保持在 Modrinth 生态系统中下载,不要重新上传
其他模组
Client side is optional when using server-side mode, by default Client-side is required.
Server-side is always required
Adventure Bags is a fully customizable Loot Bag Mod allowing you to easily generate Loot for Modpacks or even if you just want more Loot in your world. Simply right-click and profit while satisfying your inner loot goblin
Key Features
- 4 Rarity Tiers
- Change Generation Rates of each Adventure Bags in Chests
- Add or Remove Loot from Bags freely
- Supports static and random Amounts with NBT/Component support
- Add or Remove other Loot-tables easily
- Craftable to higher tiers (Full Function Mode Only)
- Can function completely Server-side with Vanilla Clients
How does the Server-side feature work
Rather simply, if the config is set to load as Server-side on start the Mod won't load new Items (which would normally prevent Vanilla Clients from joining) and will instead just Vanilla Items (configurable), by default these would be 4 different dyes. These Items are added to the loot-tables in place of the Adventure Bags but now with Custom Model Data & Custom Name, this data is all checked when using the Item to ensure it's an actual Bag and not just a normal Item. Thus allowing the Mod to run completely server-sided by making use of Vanilla functions and not adding new data.
Built-in Loot-tables
Common Adventure Bag
"2-16 minecraft:moss_block",
"16 minecraft:torch",
"minecraft:chest",
"1-8 minecraft:emerald",
"1-16 minecraft:coal",
"6-16 minecraft:arrow",
"1-4 minecraft:amethyst_shard",
"1-6 minecraft:raw_iron",
"1-6 minecraft:raw_copper",
"1-4 minecraft:raw_gold",
"minecraft:iron_shovel",
"minecraft:iron_helmet",
"minecraft:iron_boots",
"4-8 minecraft:cooked_porkchop",
"minecraft:bucket",
"16 minecraft:clay",
"12 minecraft:feather",
"6 minecraft:gunpowder",
"4-8 minecraft:bread",
"16 minecraft:string",
"6 minecraft:leather",
"2 minecraft:book",
"2-4 minecraft:bone",
"4-8 minecraft:cooked_cod",
"4-8 minecraft:cooked_salmon",
"2-6 minecraft:ink_sac",
"1-4 minecraft:cocoa_beans",
"minecraft:cake",
"4-16 minecraft:cookie",
"4-16 minecraft:melon_slice",
"2-12 minecraft:dried_kelp",
"4-8 minecraft:cooked_beef",
"4-8 minecraft:cooked_chicken",
"1-4 minecraft:experience_bottle",
"4-8 minecraft:baked_potato",
"4-8 minecraft:cooked_rabbit",
"minecraft:iron_horse_armor",
"minecraft:name_tag",
"minecraft:lead",
"4-8 minecraft:cooked_mutton"
Rare Adventure Bag
"minecraft:spore_blossom",
"minecraft:emerald_block",
"1-4 minecraft:hay_block",
"minecraft:saddle",
"2-6 minecraft:iron_ingot",
"2-6 minecraft:copper_ingot",
"1-4 minecraft:gold_ingot",
"minecraft:iron_chestplate",
"minecraft:iron_leggings",
"minecraft:iron_pickaxe",
"minecraft:iron_sword",
"minecraft:iron_hoe",
"minecraft:iron_axe",
"minecraft:golden_apple",
"1-4 minecraft:slime_ball",
"2-8 minecraft:glowstone_dust",
"1-3 minecraft:ender_pearl",
"1-3 minecraft:blaze_rod",
"1-3 minecraft:ghast_tear",
"1-3 minecraft:magma_cream",
"2-4 minecraft:pumpkin_pie",
"4-12 minecraft:firework_rocket",
"minecraft:golden_horse_armor",
"1-4 minecraft:chorus_fruit",
"minecraft:nautilus_shell",
"minecraft:brush"
Epic Adventure Bag
"minecraft:lapis_block",
"1-2 minecraft:diamond",
"minecraft:diamond_helmet",
"minecraft:diamond_boots",
"minecraft:diamond_axe",
"minecraft:diamond_shovel",
"minecraft:diamond_hoe",
"minecraft:enchanted_golden_apple",
"minecraft:blaze_spawn_egg",
"minecraft:cave_spider_spawn_egg",
"minecraft:creeper_spawn_egg",
"minecraft:drowned_spawn_egg",
"minecraft:enderman_spawn_egg",
"minecraft:endermite_spawn_egg",
"minecraft:skeleton_spawn_egg",
"minecraft:witch_spawn_egg",
"minecraft:wither_skeleton_spawn_egg",
"minecraft:zombie_spawn_egg",
"minecraft:dragon_head",
"minecraft:diamond_horse_armor",
"minecraft:heart_of_the_sea",
"1-3 minecraft:echo_shard",
"1-3 minecraft:frogspawn",
"1-6 minecraft:coal_ore",
"minecraft:diamond_ore",
"1-4 minecraft:redstone_ore",
"1-6 minecraft:gold_ore",
"1-8 minecraft:iron_ore",
"1-4 minecraft:lapis_ore",
"1-4 minecraft:emerald_ore"
Legendary Adventure Bag
"minecraft:spawner",
"1-3 minecraft:netherite_scrap",
"minecraft:diamond_sword",
"minecraft:diamond_pickaxe",
"minecraft:diamond_chestplate",
"minecraft:diamond_leggings",
"minecraft:skeleton_skull",
"minecraft:wither_skeleton_skull",
"minecraft:player_head",
"minecraft:zombie_head",
"minecraft:creeper_head",
"minecraft:piglin_head",
"minecraft:nether_star",
"minecraft:end_crystal",
"minecraft:dragon_breath",
"minecraft:trident",
"minecraft:totem_of_undying",
"minecraft:budding_amethyst",
"minecraft:dragon_egg",
"minecraft:diamond_block",
"1-3 minecraft:iron_block",
"1-2 minecraft:gold_block",
"minecraft:netherite_ingot"
Config Setup
Setting up the Config is rather simple, by default if you just play vanilla you won't have to do much. You can just use the default settings which will make sure of the built-in loot-tables above.
If you are working on a modpack however, you may want to customize it to include other items from Mods. This is rather simple still. You can use the Mod Menu intergration (recommended) or edit the config file directly. To add a new Item into the Bags loot-table you will need to know the Namespace and Item Id for example "minecraft:diamond_block" would be a Diamond Block from minecraft.
Bag Loot-tables
The Bag Loot-tables support the following format (minAmount)-(maxAmount) [namespace:item_id](NBT/Component) with formatting those surrounded by () are optional and [] are required (amounts and components are optional, item ids are required).
For v2.0.0 and beyond, it uses a custom data handling. You can use this site
For versions below v2.0.0, you need to use NBT formats from 1.20.4, you can use McStacker. The /give option on the site will give you the correct data. Just copy it from the output (Only copy the NBT data after the item. Copying whole output will caues invalid entries)
Examples:
minecraft:diamond_block
- a single Block of Diamond
3 minecraft:diamond_block
1-8 minecraft:diamond_block
- randomly between 1 and 8 Block of Diamonds (1 and 8 included)
- (v2.0.0+)
minecraft:diamond_sword{"name":"Shiny Blue Thing"}
- a Block of Diamond with the name "Shiny Blue Thing"
minecraft:diamond_block{display:{Name:'{"text":"Shiny Blue Thing"}'}}
- a Block of Diamond with the name "Shiny Blue Thing"
Generation Loot-tables
Including and Excluding loot-tables for the Bags to generate in is also simple. Just put the Loot-table path into the list and that's it. The Loot-table must be included in the data/[namespace]/loot_table/ folder. For example chests/simple_dungeon which is located data/minecraft/loot_table/chests/simple_dungeon.json. This should work with any Mod Loot-tables as well (It is not limited to just the chests folder).
Bag Generation Chances
You can change the rarity of Bags generating in the Loot-table with value between 1.0 and 0.0 (0.00001). 1.0 being 100% and 0.0 being not all (or at least as close as you can get to it without completely removing it from the list). By default the Common is 0.8 (80%), Rare 0.4 (40%), Epic 0.15 (15%) and Legendary 0.08 (8%).
Server-side Options
Most of this explained aboved, but it's straight forward as well. Switching to Server-side only mode will prevent the Mod from loading any custom/extra data outside of vanilla which would normally cause registry issues. It will use the Items stated below the option as Adventure Bags by using Custom Names & Model Data to ensure it's different from the default Vanilla Items. If the provided Item is invalid it'll default back to the Coloured Dyes
The game will still function fine if you input incorrectly, it will simply print an error for the invalid input into the Log, so if you aren't getting your result, be sure to check there. You can use debug mode in the config (must set to true manually in the file) for more information
Config Example
Example Configuration File located in config/adventure-loot.json5
{
"Debug": false,
"DefaultOptions": "Disabled",
"CommonChance": 0.8,
"RareChance": 0.4,
"EpicChance": 0.15,
"LegendaryChance": 0.08,
"CommonLoot": [
"minecraft:moss_block",
"12 minecraft:diamond",
"4-9 minecraft:gold_ingot ",
"minecraft:diamond_chestplate{display:{Name:'{\"text\":\"fancy chestplate\"}'},Enchantments:[{id:\"minecraft:protection\",lvl:69s}]}",
"minecraft:chest{BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:cake\",Count:1b,tag:{display:{Name:'{\"text\":\"Hoef\\'s Favourite\",\"color\":\"white\",\"bold\":true}',Lore:['{\"text\":\"Just a little squashed\",\"color\":\"light_purple\",\"italic\":true}']}}}],Lock:\"Flight Licence\"}}"
],
"RareLoot": [
"40 minecraft:iron_ingot"
],
"EpicLoot": [
"9-64 minecraft:diamond"
],
"LegendaryLoot": [
"minecraft:diamond_chestplate"
],
"TablesToExclude": [
"chests/simple_dungeon",
"chests/village/village_mason"
],
"TablesToAdd": [
"entities/cow"
],
"ServerSideOnly": false,
"ServerSideCommonItem": "minecraft:white_dye",
"ServerSideRareItem": "minecraft:blue_dye",
"ServerSideEpicItem": "minecraft:red_dye",
"ServerSideLegendaryItem": "minecraft:purple_dye"
}
Feel free to use this mod in other modpacks but keep the download within the Modrinth Ecosystem and do not reupload
Other Mods
评论 0
登录后参与评分
还没有评论,来抢沙发吧