promotional bannermobile promotional banner
premium banner
Grant potion effects to your items

Description

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.1
  • NeoForge 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, nbt matches 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 nbt in the JSON
  • internally, that matcher is checked against the item's custom_data component

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 rules matchers
  • sets and set_bonuses
  • loot_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, or rarity

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 item or #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 KubeJS or CraftTweaker

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: