Magic Find
Magic Find 是一个玩家属性,根据玩家拥有的点数数量,为来自容器和实体的战利品表增加额外奖励。
(它不会替换原始战利品。)
功能
- ✨ 通过 Datapack 为任何宝箱或实体的战利品表添加额外奖励。
- ? 激活时播放特殊音效。由 Magic Find 添加到容器中的物品会在视觉上以剪影标记。
- ? 包含一个奖励系统,为完成的成就授予 Magic Find 点数(仅授予 Magic Find 点数)。
工作原理
当玩家打开容器或击败配置的实体时,Magic Find 会检查玩家的当前点数以及分配给该战利品表的配置。
如果触发激活,模组会选择并将额外奖励添加到空槽位中,同时保持原始战利品完整。
玩家会听到激活音效,且添加的物品会有视觉标记。
配置文件位置
将 JSON 文件放置在:
data/magicfind/mf_inject/
示例:
data/magicfind/mf_inject/my_rewards.json
添加或更改文件后使用 /reload 命令重载。
配置示例
{
"target": "minecraft:chests/simple_dungeon",
"replace": false,
"rolls_by_mf": {
"0": { "min": 1, "max": 1 },
"2200": { "min": 1, "max": 2 },
"3750": { "min": 1, "max": 3 }
},
"pool": [
{
"item": "minecraft:iron_ingot",
"count_min": 2,
"count_max": 5,
"required_mf": 0,
"weight": 40
},
{
"item": "minecraft:diamond",
"count_min": 1,
"count_max": 2,
"required_mf": 1650,
"weight": 10
}
]
}
配置选项
target
接收额外奖励的战利品表。
"target": "minecraft:chests/simple_dungeon"
请使用完整的战利品表 ID,包括命名空间。
示例:
minecraft:chests/simple_dungeon
minecraft:chests/abandoned_mineshaft
minecraft:chests/end_city_treasure
minecraft:entities/zombie
rolls_by_mf
控制额外奖励的抽取次数。
"rolls_by_mf": {
"0": { "min": 1, "max": 1 },
"2200": { "min": 1, "max": 2 },
"3750": { "min": 1, "max": 3 }
},
使用玩家达到的最高 Magic Find 阈值。在此示例中:
- 从
0 开始:1 次额外抽取。
- 从
2200 开始:1 到 2 次额外抽取。
- 从
3750 开始:1 到 3 次额外抽取。
数字表示固定的抽取次数。min 和 max 表示随机范围。
pool
可添加的奖励列表。
每个奖励使用以下格式:
{
"item": "minecraft:diamond",
"count_min": 1,
"count_max": 2,
"required_mf": 1650,
"weight": 10
}
item: 物品 ID。
count_min: 最小数量。
count_max: 最大数量。
required_mf: 解锁该奖励所需的 Magic Find 点数。
weight: 相对选中概率。
权重为 20 的奖励被选中的频率是权重为 10 且符合条件的奖励的两倍。
创建自定义奖励
创建一个适合你所修改容器的奖励池。例如:
- 在工具相关容器中添加工具和材料。
- 在武器相关容器中添加武器和战斗装备。
- 在下界容器中增添下界资源。
- 在末地容器中增添末地资源。
- 在生存容器中增添食物和补给品。
对于更强的奖励使用更高的 required_mf 值,对于更稀有的奖励使用更低的 weight 值。
Magic Find 进阶
玩家可以通过以下方式获得 Magic Find 点数:
- 符合条件的进度(Advancements)。
- 配置的实体击杀。
更高的 Magic Find 可以解锁更好的奖励并增加额外抽取的次数。
Datapacks
可以通过 Datapack 使用相同的路径添加配置:
<datapack>/data/magicfind/mf_inject/my_rewards.json
Datapack 允许你添加或更改奖励,而无需修改模组的 Java 代码。
兼容性
Magic Find 支持原版战利品表、模组战利品表和 Lootr 容器。Magic Find 进阶系统需要 Attribute Core。
? 加入我们的 Discord 社区
你有新的想法、对我的模组的改进建议,或者发现了 Bug?这里是分享它们的完美场所!
在我们的 Discord 社区中,你可以:
? 提交关于改进模组的提案和建议。
?️ 报告问题和 Bug,以便我们一起修复它们。
? 展示你的创造力:你可以自由地将我的模组用于你自己的整合包中。
? 在服务器中分享你的整合包,并向社区展示你独特的风格。
这个空间旨在让我们共同成长,怀着对制作模组和整合包的尊重与热情。你的贡献永远受到欢迎!
Magic Find
Magic Find is a player attribute that adds extra rewards to loot tables from containers and entities depending on the number of points the player has.
(It does not replace the original loot.)
Features
- ✨ Adds additional rewards to any loot table for chests or entities via Datapack.
- ? Plays a special sound when activated. Items added by Magic Find inside containers are visually marked with a silhouette.
- ? Includes a reward system that grants Magic Find points for completed achievements (only Magic Find points are awarded).
How It Works
When a player opens a container or defeats a configured entity, Magic Find checks the player’s current points and the configuration assigned to that loot table.
If activation occurs, the mod selects and adds extra rewards into empty slots, keeping the original loot intact.
The player hears an activation sound, and the added items are visually marked.
Configuration Location
Place JSON files in:
data/magicfind/mf_inject/
Example:
data/magicfind/mf_inject/my_rewards.json
Use /reload after adding or changing a file.
Configuration Example
{
"target": "minecraft:chests/simple_dungeon",
"replace": false,
"rolls_by_mf": {
"0": { "min": 1, "max": 1 },
"2200": { "min": 1, "max": 2 },
"3750": { "min": 1, "max": 3 }
},
"pool": [
{
"item": "minecraft:iron_ingot",
"count_min": 2,
"count_max": 5,
"required_mf": 0,
"weight": 40
},
{
"item": "minecraft:diamond",
"count_min": 1,
"count_max": 2,
"required_mf": 1650,
"weight": 10
}
]
}
Configuration Options
target
The loot table that receives bonus rewards.
"target": "minecraft:chests/simple_dungeon"
Use the complete loot table ID, including its namespace.
Examples:
minecraft:chests/simple_dungeon
minecraft:chests/abandoned_mineshaft
minecraft:chests/end_city_treasure
minecraft:entities/zombie
rolls_by_mf
Controls the number of bonus reward rolls.
"rolls_by_mf": {
"0": { "min": 1, "max": 1 },
"2200": { "min": 1, "max": 2 },
"3750": { "min": 1, "max": 3 }
},
The highest Magic Find threshold reached by the player is used. In this example:
- From
0: 1 bonus roll.
- From
2200: 1 to 2 bonus rolls.
- From
3750: 1 to 3 bonus rolls.
A number creates a fixed amount of rolls. min and max create a random range.
pool
The list of rewards that can be added.
Each reward uses:
{
"item": "minecraft:diamond",
"count_min": 1,
"count_max": 2,
"required_mf": 1650,
"weight": 10
}
item: the item ID.
count_min: minimum amount.
count_max: maximum amount.
required_mf: Magic Find required to unlock the reward.
weight: relative chance of selection.
A reward with weight 20 is selected twice as often as an eligible reward with weight 10.
Creating Your Own Rewards
Create a pool that fits the container you are modifying. For example:
- Add tools and materials to a tool-related container.
- Add weapons and combat equipment to a weapon-related container.
- Add Nether resources to a Nether container.
- Add End resources to an End container.
- Add food and supplies to a survival container.
Use higher required_mf values for stronger rewards and lower weight values for rarer rewards.
Magic Find Progression
Players can gain Magic Find from:
- Eligible advancements.
- Configured entity kills.
Higher Magic Find can unlock better rewards and increase the number of bonus rolls.
Datapacks
Configurations can be added through a datapack using the same path:
<datapack>/data/magicfind/mf_inject/my_rewards.json
Datapacks allow you to add or change rewards without modifying the mod's Java code.
Compatibility
Magic Find supports vanilla loot tables, modded loot tables and Lootr containers. Attribute Core is required for the Magic Find progression system.
? Join Our Discord Community
Do you have new ideas, improvements for my mods, or have you found a bug? This is the perfect place to share them!
In our Discord community you can:
? Submit proposals and suggestions for improving the mods.
?️ Report problems and bugs so we can fix them together.
? Show your creativity: you're free to use my mods in your own modpacks.
? Share your modpack on the server and show the community your unique style.
This space is designed for us to grow together, with respect and enthusiasm for creating mods and modpacks. Your contribution is always welcome!
评论 0
登录后参与评分
还没有评论,来抢沙发吧