截图
介绍
Potion Effects Set
Datapack-driven item potion effects, set bonuses, Curios support, and loot table injections.
This project exists in two versions:
Forge 1.20.1NeoForge 1.21.1
Both versions share the same core idea and almost the same datapack workflow, so pack makers can use one system across both branches.
What The Mod Does
With this mod, you can:
- give passive effects while an item is equipped
- give on-hit effects when the player attacks
- give on-hurt effects when the player takes damage
- target one item, many items through tags, or special variants through
nbt - create tiered sets such as 2-piece, 3-piece, and 4-piece bonuses
- count Curios pieces, including duplicate accessories such as two matching rings
- inject custom rewards into existing loot tables without replacing them
Versions
Forge Version
- Loader:
Forge - Minecraft:
1.20.1 - Branch/mod:
Potion Effects Set
Important note:
- in the Forge version,
nbtmatches normal item NBT data
NeoForge Version
- Loader:
NeoForge - Minecraft:
1.21.1 - Branch/mod:
Neo Pot Effect Set
Important note:
- in the NeoForge version, you still write
nbtin the JSON - internally, that matcher is checked against the item’s
custom_datacomponent
That means the config format stays familiar, even though Minecraft changed how custom item data is stored.
Shared Datapack Features
Both versions support:
- exact item entries like
minecraft:diamond_sword - root tag entries like
#mymod:guardian_armor - advanced
rulesmatchers setsandset_bonusesloot_table_injections
Quick Example
{
"minecraft:diamond_sword": {
"on_hit_effects": [
{
"effect": "minecraft:poison",
"amplifier": 1,
"duration": 100,
"chance": 0.3,
"slot": "mainhand"
}
]
}
}
This applies Poison II for 5 seconds with a 30% chance when the sword hits in the main hand.
Tags
Use tags when many items should share the same effect setup.
{
"#mymod:guardian_armor": {
"passive_effects": [
{
"effect": "minecraft:resistance",
"amplifier": 0,
"permanent": true
}
]
}
}
Special Variants With rules
Use rules when the same base item can exist in different variants.
{
"rules": [
{
"match": {
"item": "minecraft:diamond_chestplate",
"nbt": {
"pem": {
"set_id": "guardian"
}
}
},
"passive_effects": [
{
"effect": "minecraft:resistance",
"amplifier": 1,
"permanent": true,
"slot": "chest"
}
]
}
]
}
Recommended pattern:
- store your custom data under your own root, such as
pem - use fields like
set_id,role,variant, orrarity
Sets
Sets let you unlock stronger bonuses as more matching pieces are equipped.
{
"sets": [
{
"id": "guardian",
"display_name": "Guardian Set",
"piece_match": {
"tag": "mymod:guardian_set"
},
"tiers": [
{
"required_pieces": 2,
"passive_effects": [
{
"effect": "minecraft:resistance",
"amplifier": 0,
"permanent": true
}
]
},
{
"required_pieces": 4,
"passive_effects": [
{
"effect": "minecraft:resistance",
"amplifier": 1,
"permanent": true
},
{
"effect": "minecraft:absorption",
"amplifier": 0,
"permanent": true
}
]
}
]
}
]
}
Set counting includes:
- main hand
- offhand
- armor
- Curios
Curios note:
- duplicate matching accessories count separately
- two matching rings can count as two set pieces
Loot Table Injections
The mod can add your custom items into existing loot tables without replacing them.
Inject a custom loot table
{
"inject": [
{
"targets": [
"minecraft:chests/simple_dungeon",
"minecraft:chests/abandoned_mineshaft"
],
"loot_table": "mypack:chests/arcane_rewards",
"rolls": 1,
"chance": 0.25
}
]
}
Inject items directly
{
"inject": [
{
"targets": ["minecraft:chests/simple_dungeon"],
"rolls": 1,
"chance": 0.2,
"items": [
{
"item": "minecraft:totem_of_undying",
"name": "Offhand Totem",
"nbt": {
"pem": {
"role": "offhand_totem"
}
}
}
]
}
]
}
How Players Obtain Custom Items
Simple rule:
- if you use exact
itemor#tag, players can obtain the base item normally - if you use
nbt, the game needs some way to generate that special variant
Common ways to generate those items:
- loot tables
- loot injections
- functions
- advancement rewards
- scripting mods like
KubeJSorCraftTweaker
Conflict Rules
If multiple active sources grant the same mob effect:
- they do not stack as multiple copies
- the strongest one wins
- higher amplifier wins first
That means a 2-piece set can give Strength I, and a 4-piece tier can upgrade that to Strength II, while another set can still coexist if it gives a different effect like Speed.
Tooltips
Tooltips can show:
- direct effects on the item
- matching set bonuses
- current set piece count when player context is available
Summary
If you want one datapack-driven system for:
- equipment-based potion effects
- item tags
- custom item variants
- set bonuses
- Curios counting
- survival-friendly loot integration
this mod is built for exactly that.
For a more detailed tutorial and extra help, join the Discord:
- https://discord.gg/sZ64CgX3JN { “effect”: “minecraft:regeneration”, “amplifier”: 1, “duration”: 100, “chance”: 0.5, “slot”: “chest” } ] }
}
</details>
<details>
<summary><strong>👟 Example: Speed Boots</strong></summary>
Gives Speed II while worn.
{
“minecraft:golden_boots”: {
“passive_effects”: [
{
“effect”: “minecraft:speed”,
“amplifier”: 1,
“permanent”: true,
“slot”: “feet”
}
]
}
}
</details>
<details>
<summary><strong>💍 Example: Invisibility Ring (Curios)</strong></summary>
Grants Invisibility while worn in a 'ring' slot.
{
“curios:ring_gold”: {
“passive_effects”: [
{
“effect”: “minecraft:invisibility”,
“amplifier”: 0,
“permanent”: true,
“slot”: “ring”,
“is_curio”: true
}
]
}
}
</details>
---
## **🔧 Configuration Guide**
### **📁 Location**
`world/datapacks/<name>/data/potioneffectsmodify/potion_effects/your_file.json`
### **⚙️ Options**
| Property | Type | Description |
| :--- | :--- | :--- |
| `effect` | ID | The potion effect ID (e.g., `minecraft:strength`) |
| `amplifier` | Int | Level of the effect (0 = Level I, 1 = Level II) |
| `duration` | Int | Duration in ticks (20 ticks = 1 second) |
| `chance` | Float | Probability (0.0 to 1.0) for On Hit/On Hurt |
| `slot` | String | Required slot (`mainhand`, `head`, `feet`, `curios:ring`, etc.) |
| `permanent`| Bool | If true, effect refreshes automatically (for passive) |
| `is_curio` | Bool | Set to `true` if targeting a Curios slot |
---
## **📦 Installation**
1. **Download** the mod and place it in your `mods` folder.
2. *(Optional)* Install **Curios API** if you want accessory support.
3. **Launch** the game.
4. **Create** your JSON configs in a datapack (see examples above).
5. Run `/reload` in-game to apply changes instantly!
---
Please join our Discord for support, suggestions, or to share your configs!
[](https://discord.gg/sZ64CgX3JN)
常见问题
Potion Effects Set 支持哪些 Minecraft 版本?
Potion Effects Set 支持 Minecraft Java 版 1.20.1–1.21.11,共 17 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Potion Effects Set 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Etema 的其他作品
查看全部 →Attribute Modify
这个模组可以修改原版物品和 Curios 饰品的属性。想增强或削弱武器或饰品?只需制作一个数据包即可。
Daily Boss – More Bosses
Add more bosses and config for Daily Boss
Daily Boss – More Boss Config
Add more config for Daily Boss
Daily Boss X Mowzie’s Mob
Compat Daily Boss with Mowzie Mob
评论
登录后评论和评分